]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:drs:test:getncchanges skips some tests with reserved_usn = 0
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Thu, 8 Aug 2024 23:48:06 +0000 (11:48 +1200)
committerDouglas Bagnall <dbagnall@samba.org>
Wed, 28 Aug 2024 04:24:39 +0000 (04:24 +0000)
These tests are not affected by the reserved_usn change, so there is
no need to run them twice.

The test_repl_get_tgt_multivalued_links fails with or without
reserved_usn set to zero, but it fails differently in either case.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15701

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <josutton@catalyst.net.nz>
selftest/knownfail.d/getncchanges
source4/torture/drs/python/getncchanges.py

index 04760f59891af930e9fce002cd40ff0fab0b31b1..7288309c32a5dce382c7dfcdd6a0dc601ec1b6b6 100644 (file)
@@ -7,11 +7,5 @@ samba4.drs.getncchanges.python\(promoted_dc\).getncchanges.DrsReplicaSyncIntegri
 # Samba chooses to always increment the USN for the NC root at the point where it would otherwise show up.
 samba4.drs.getncchanges.python\(.*\).getncchanges.DrsReplicaSyncIntegrityTestCase.test_repl_nc_is_first_nc_change_only\(
 
-# These failures are repeated in the tests where the client forces
-# reserved_usn to zero, emulating Azure AD. DrsReplicaSyncFakeAzureAdTests
-samba4.drs.getncchanges.python\(promoted_dc\).getncchanges.DrsReplicaSyncFakeAzureAdTests.test_repl_get_tgt\(promoted_dc\)
-samba4.drs.getncchanges.python\(promoted_dc\).getncchanges.DrsReplicaSyncFakeAzureAdTests.test_repl_get_tgt_chain\(promoted_dc\)
-samba4.drs.getncchanges.python\(promoted_dc\).getncchanges.DrsReplicaSyncFakeAzureAdTests.test_repl_get_tgt_and_anc\(promoted_dc\)
+# test_repl_get_tgt_multivalued_links also fails with DrsReplicaSyncFakeAzureAdTests on promoted_dc
 samba4.drs.getncchanges.python\(promoted_dc\).getncchanges.DrsReplicaSyncFakeAzureAdTests.test_repl_get_tgt_multivalued_links\(promoted_dc\)
-# Samba chooses to always increment the USN for the NC root at the point where it would otherwise show up.
-samba4.drs.getncchanges.python\(.*\).getncchanges.DrsReplicaSyncFakeAzureAdTests.test_repl_nc_is_first_nc_change_only\(
index eb21a67bfa782cfaffd7cc2e1a77daaa11094277..bef5fc9b27c40dcd70d36e09742eb441c5e3d0a7 100644 (file)
@@ -1427,6 +1427,43 @@ class DrsReplicaSyncFakeAzureAdTests(DrsReplicaSyncIntegrityTestCase):
         if hwm is not None:
             hwm.reserved_usn = 0
 
+    SKIPPED_TESTS = {
+        "test_repl_get_tgt",
+        "test_repl_get_tgt_and_anc",
+        "test_repl_get_tgt_chain",
+        "test_do_full_repl_mix_no_overlap",
+        "test_do_full_repl_no_overlap",
+        "test_do_full_repl_no_overlap_get_anc",
+        "test_DummyDN_valid_GUID_full_repl",
+        "test_InvalidNC_DummyDN_InvalidGUID_full_repl",
+        "test_repl_get_anc_link_attr",
+        "test_repl_integrity_cross_partition_links",
+        "test_repl_integrity_cross_partition_links_with_tgt",
+        "test_repl_integrity_get_anc",
+        "test_repl_integrity_obj_reanimation",
+        "test_repl_integrity_src_obj_deletion",
+        "test_repl_integrity_tgt_obj_deletion",
+        "test_repl_nc_is_first",
+        "test_repl_nc_is_first_mid",
+        "test_repl_nc_is_first_nc_change_only", # xfail in parent
+        "test_repl_nc_is_first_no_change",
+        "test_repl_nc_is_first_start_zero",
+        "test_repl_nc_is_first_start_zero_nc_change",
+    }
+
+    def setUp(self):
+        # Only some tests behave any differently with the zeroed
+        # reserved_usn. The getncchanges tests are quite slow, so it
+        # is worth skipping unnecessary tests.
+        #
+        # If you think a test is worth running here, add it to the
+        # list.
+        testname = self.id().rsplit(".", 1)[1]
+        if testname in self.SKIPPED_TESTS:
+            self.skipTest("Probably not affected by reserved_usn = 0")
+
+        super().setUp()
+
 
 class DcConnection:
     """Helper class to track a connection to another DC"""