From: Douglas Bagnall Date: Thu, 27 Nov 2025 02:42:22 +0000 (+1300) Subject: s4:selftest: move tests that want to be last, last X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b430f42c34762b4d7ba0e6b6b31671326691ac3;p=thirdparty%2Fsamba.git s4:selftest: move tests that want to be last, last These tests want to run last because they do a dbcheck to ensure no earlier test caused corruption. There are also some tests that want to run second last. Signed-off-by: Douglas Bagnall Reviewed-by: Martin Schwenke Autobuild-User(master): Douglas Bagnall Autobuild-Date(master): Thu Nov 27 22:40:02 UTC 2025 on atb-devel-224 --- diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py index 7c9b1aee37b..70ab36c868a 100755 --- a/source4/selftest/tests.py +++ b/source4/selftest/tests.py @@ -2238,24 +2238,6 @@ for env in ["ktest", "ad_member", "ad_dc_no_ntlm"]: extra_path=[os.path.join(srcdir(), 'python/samba/tests')], name="samba.tests.ntlmdisabled.python(%s)" % env) -# Demote the vampire DC, it must be the last test each DC, before the dbcheck -for env in ['vampire_dc', 'promoted_dc', 'rodc']: - planoldpythontestsuite(env, "samba.tests.samba_tool.demote", - name="samba.tests.samba_tool.demote", - environ={ - 'CONFIGFILE': '$PREFIX/%s/etc/smb.conf' % env - }, - extra_args=['-U"$USERNAME%$PASSWORD"'], - extra_path=[os.path.join(srcdir(), "samba/python")] - ) -# TODO: Verifying the databases really should be a part of the -# environment teardown. -# check the databases are all OK. PLEASE LEAVE THIS AS THE LAST TEST -for env in ["ad_dc", "fl2000dc", "fl2003dc", "fl2008r2dc", - 'vampire_dc', 'promoted_dc', 'backupfromdc', 'restoredc', - 'renamedc', 'offlinebackupdc', 'labdc']: - plantestsuite("samba4.blackbox.dbcheck(%s)" % env, env + ":local", ["PYTHON=%s" % python, os.path.join(bbdir, "dbcheck.sh"), '$PREFIX/provision', configuration]) - # # Tests to verify bug 13653 https://bugzilla.samba.org/show_bug.cgi?id=13653 # ad_dc has an lmdb backend, ad_dc_ntvfs has a tdb backend. @@ -2352,3 +2334,72 @@ if 'WITH_SYSTEMD_USERDB' in config_hash: planpythontestsuite("ad_dc:local", "samba.tests.varlink.getuserrecord") planpythontestsuite("ad_dc:local", "samba.tests.varlink.getgrouprecord") planpythontestsuite("ad_dc:local", "samba.tests.varlink.getmemberships") + + + + + + + + + + + + + + + + + + + + + +# this space intentionally left blank. +# the tests below want to be last, but +# we keep forgetting. + + + + + + + + + + + + + + + + + + + + +# Demote the vampire DC, it must be the last test each DC, before the dbcheck +for env in ['vampire_dc', 'promoted_dc', 'rodc']: + planoldpythontestsuite(env, "samba.tests.samba_tool.demote", + name="samba.tests.samba_tool.demote", + environ={ + 'CONFIGFILE': '$PREFIX/%s/etc/smb.conf' % env + }, + extra_args=['-U"$USERNAME%$PASSWORD"'], + extra_path=[os.path.join(srcdir(), "samba/python")] + ) +# TODO: Verifying the databases really should be a part of the +# environment teardown. +# check the databases are all OK. PLEASE LEAVE THIS AS THE LAST TEST +for env in ["ad_dc", "fl2000dc", "fl2003dc", "fl2008r2dc", + 'vampire_dc', 'promoted_dc', 'backupfromdc', 'restoredc', + 'renamedc', 'offlinebackupdc', 'labdc']: + plantestsuite("samba4.blackbox.dbcheck(%s)" % env, env + ":local", + ["PYTHON=%s" % python, + os.path.join(bbdir, "dbcheck.sh"), + '$PREFIX/provision', + configuration]) + + +# DO NOT ADD TESTS HERE. +# The previous tests are meant to run last.