From: Douglas Bagnall Date: Thu, 8 Aug 2024 23:48:06 +0000 (+1200) Subject: s4:drs:test:getncchanges skips some tests with reserved_usn = 0 X-Git-Tag: tdb-1.4.13~1269 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7dac035896b368bf3a86acf58260eef39d195d19;p=thirdparty%2Fsamba.git s4:drs:test:getncchanges skips some tests with reserved_usn = 0 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 Reviewed-by: Jennifer Sutton --- diff --git a/selftest/knownfail.d/getncchanges b/selftest/knownfail.d/getncchanges index 04760f59891..7288309c32a 100644 --- a/selftest/knownfail.d/getncchanges +++ b/selftest/knownfail.d/getncchanges @@ -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\( diff --git a/source4/torture/drs/python/getncchanges.py b/source4/torture/drs/python/getncchanges.py index eb21a67bfa7..bef5fc9b27c 100644 --- a/source4/torture/drs/python/getncchanges.py +++ b/source4/torture/drs/python/getncchanges.py @@ -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"""