import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../../selftest"))
import selftesthelpers
-from selftesthelpers import *
+from selftesthelpers import bindir, srcdir, binpath, python
+from selftesthelpers import configuration, plantestsuite
+from selftesthelpers import planpythontestsuite, planperltestsuite
+from selftesthelpers import plantestsuite_loadlist, extra_python
+from selftesthelpers import skiptestsuite, source4dir, valgrindify
+from selftesthelpers import smbtorture4_options, smbtorture4_testsuites
+from selftesthelpers import smbtorture4, ntlm_auth3, samba3srcdir
+
print("OPTIONS %s" % " ".join(smbtorture4_options), file=sys.stderr)
bbdir = os.path.join(srcdir(), "testprogs/blackbox")
+# alias to highlight what tests we want to run against a DC with SMBv1 disabled
+smbv1_disabled_testenv = "restoredc"
+
# Simple tests for LDAP and CLDAP
for auth_type in ['', '-k no', '-k yes']:
for auth_level in ['--option=clientldapsaslwrapping=plain', '--sign', '--encrypt']:
else:
skiptestsuite("ldb.base", "Using system LDB, ldbtest not available")
+plantestsuite_loadlist("samba4.tests.attr_from_server.python(ad_dc_ntvfs)",
+ "ad_dc_ntvfs:local",
+ [python, os.path.join(samba4srcdir, "dsdb/tests/python/attr_from_server.py"),
+ '$PREFIX_ABS/ad_dc_ntvfs/private/sam.ldb', '$LOADLIST', '$LISTOPT'])
+
# Tests for RPC
# add tests to this list as they start passing, so we test
ntvfsargs = ["--option=torture:sharedelay=100000", "--option=torture:oplocktimeout=3", "--option=torture:writetimeupdatedelay=500000"]
# Filter smb2 tests that should not run against ad_dc_ntvfs
-smb2_s3only = ["smb2.change_notify_disabled", "smb2.dosmode", "smb2.credits", "smb2.kernel-oplocks"]
+smb2_s3only = [
+ "smb2.change_notify_disabled",
+ "smb2.dosmode",
+ "smb2.credits",
+ "smb2.kernel-oplocks",
+ "smb2.durable-v2-delay",
+ "smb2.aio_delay",
+]
smb2 = [x for x in smbtorture4_testsuites("smb2.") if x not in smb2_s3only]
# The QFILEINFO-IPC test needs to be on ipc$
-raw = filter(lambda x: "raw.qfileinfo.ipc" not in x, smbtorture4_testsuites("raw."))
+raw = list(filter(lambda x: "raw.qfileinfo.ipc" not in x, smbtorture4_testsuites("raw.")))
base = smbtorture4_testsuites("base.")
netapi = smbtorture4_testsuites("netapi.")
plansmbtorture4testsuite(t, "ad_dc_ntvfs", ['//$SERVER/tmp', '-U$USERNAME%$PASSWORD'] + ntvfsargs)
libsmbclient = smbtorture4_testsuites("libsmbclient.")
+protocols = [ 'NT1', 'SMB3' ]
for t in libsmbclient:
- libsmbclient_testargs = ["--option=torture:smburl=smb://$USERNAME:$PASSWORD@$SERVER/tmp",
- "--option=torture:replace_smbconf=%s/testdata/samba3/smb_new.conf" % srcdir()]
- plansmbtorture4testsuite(t, "ad_dc", ['//$SERVER/tmp', '-U$USERNAME%$PASSWORD'] + libsmbclient_testargs)
+ url = "smb://$USERNAME:$PASSWORD@$SERVER/tmp"
+ if t == "libsmbclient.list_shares":
+ url = "smb://$USERNAME:$PASSWORD@$SERVER"
+
+ for proto in protocols:
+ libsmbclient_testargs = ["--option=torture:smburl=" + url,
+ "--option=torture:replace_smbconf=%s/testdata/samba3/smb_new.conf" % srcdir(),
+ "--option=torture:clientprotocol=%s" % proto]
+ plansmbtorture4testsuite(t, "ad_dc", ['//$SERVER/tmp', '-U$USERNAME%$PASSWORD'] + libsmbclient_testargs, "samba4.%s.%s" % (t, proto))
plansmbtorture4testsuite("raw.qfileinfo.ipc", "ad_dc_ntvfs", '//$SERVER/ipc\$ -U$USERNAME%$PASSWORD')
plantestsuite("samba4.blackbox.samba_tool(ad_dc_ntvfs:local)", "ad_dc_ntvfs:local", [os.path.join(samba4srcdir, "utils/tests/test_samba_tool.sh"), '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', '$DOMAIN', smbclient4])
plantestsuite("samba4.blackbox.net_rpc_user(ad_dc)", "ad_dc", [os.path.join(bbdir, "test_net_rpc_user.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$DOMAIN'])
+plantestsuite("samba4.blackbox.test_primary_group", "ad_dc:local", [os.path.join(bbdir, "test_primary_group.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$DOMAIN', '$PREFIX_ABS'])
+
if have_heimdal_support:
for env in ["ad_dc_ntvfs", "ad_dc"]:
plantestsuite("samba4.blackbox.pkinit(%s:local)" % env, "%s:local" % env, [os.path.join(bbdir, "test_pkinit_heimdal.sh"), '$SERVER', 'pkinit', '$PASSWORD', '$REALM', '$DOMAIN', '$PREFIX/%s' % env, "aes256-cts-hmac-sha1-96", smbclient4, configuration])
plantestsuite("samba4.blackbox.trust_token", "fl2003dc", [os.path.join(bbdir, "test_trust_token.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', '$DOMSID', '$TRUST_USERNAME', '$TRUST_PASSWORD', '$TRUST_REALM', '$TRUST_DOMAIN', '$TRUST_DOMSID', 'external'])
plantestsuite("samba4.blackbox.ktpass(ad_dc_ntvfs)", "ad_dc_ntvfs", [os.path.join(bbdir, "test_ktpass.sh"), '$PREFIX/ad_dc_ntvfs'])
plantestsuite("samba4.blackbox.password_settings(ad_dc_ntvfs:local)", "ad_dc_ntvfs:local", [os.path.join(bbdir, "test_password_settings.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', "$PREFIX/ad_dc_ntvfs"])
+plantestsuite("samba4.blackbox.trust_user_account", "fl2008r2dc:local", [os.path.join(bbdir, "test_trust_user_account.sh"), '$PREFIX', '$REALM', '$DOMAIN', '$TRUST_REALM', '$TRUST_DOMAIN'])
plantestsuite("samba4.blackbox.cifsdd(ad_dc_ntvfs)", "ad_dc_ntvfs", [os.path.join(samba4srcdir, "client/tests/test_cifsdd.sh"), '$SERVER', '$USERNAME', '$PASSWORD', "$DOMAIN"])
plantestsuite("samba4.blackbox.nmblookup(ad_dc_ntvfs)", "ad_dc_ntvfs", [os.path.join(samba4srcdir, "utils/tests/test_nmblookup.sh"), '$NETBIOSNAME', '$NETBIOSALIAS', '$SERVER', '$SERVER_IP', nmblookup4])
plantestsuite("samba4.blackbox.locktest(ad_dc_ntvfs)", "ad_dc_ntvfs", [os.path.join(samba4srcdir, "torture/tests/test_locktest.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$DOMAIN', '$PREFIX'])
plantestsuite("samba4.blackbox.client_etypes_legacy(ad_dc:client)", "ad_dc:client", [os.path.join(bbdir, "test_client_etypes.sh"), '$DC_SERVER', '$DC_USERNAME', '$DC_PASSWORD', '$PREFIX_ABS', 'legacy', '23'])
plantestsuite("samba4.blackbox.client_etypes_strong(ad_dc:client)", "ad_dc:client", [os.path.join(bbdir, "test_client_etypes.sh"), '$DC_SERVER', '$DC_USERNAME', '$DC_PASSWORD', '$PREFIX_ABS', 'strong', '17_18'])
plantestsuite("samba4.blackbox.net_ads_dns(ad_member:local)", "ad_member:local", [os.path.join(bbdir, "test_net_ads_dns.sh"), '$DC_SERVER', '$DC_USERNAME', '$DC_PASSWORD', '$REALM', '$USERNAME', '$PASSWORD'])
+plantestsuite("samba4.blackbox.samba-tool_ntacl(ad_member:local)", "ad_member:local", [os.path.join(bbdir, "test_samba-tool_ntacl.sh"), '$PREFIX'])
plantestsuite_loadlist("samba4.rpc.echo against NetBIOS alias", "ad_dc_ntvfs", [valgrindify(smbtorture4), "$LISTOPT", "$LOADLIST", 'ncacn_np:$NETBIOSALIAS', '-U$DOMAIN/$USERNAME%$PASSWORD', 'rpc.echo'])
+# json tests hook into ``chgdcpass'' to make them run in contributor CI on
+# gitlab
+planpythontestsuite("chgdcpass", "samba.tests.blackbox.netads_json")
# Tests using the "Simple" NTVFS backend
for t in ["base.rw1"]:
planoldpythontestsuite("ad_dc_ntvfs:local", "samba.tests.gensec", extra_args=['-U"$USERNAME%$PASSWORD"'], py3_compatible=True)
-planoldpythontestsuite("none", "simple", extra_path=["%s/lib/tdb/python/tests" % srcdir()], name="tdb.python")
+planoldpythontestsuite("none", "simple", extra_path=["%s/lib/tdb/python/tests" % srcdir()], name="tdb.python", py3_compatible=True)
planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.dcerpc.sam", py3_compatible=True)
planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.dsdb", py3_compatible=True)
-planpythontestsuite("none", "samba.tests.dsdb_lock")
+planpythontestsuite("none", "samba.tests.dsdb_lock", py3_compatible=True)
planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.dcerpc.bare", py3_compatible=True)
-planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.dcerpc.unix")
+planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.dcerpc.unix", py3_compatible=True)
planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.dcerpc.srvsvc")
-planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.timecmd")
-planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.join")
+planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.timecmd", py3_compatible=True)
+planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.join", py3_compatible=True)
-planpythontestsuite("none", "samba.tests.samba_tool.visualize")
+planpythontestsuite("none", "samba.tests.samba_tool.visualize", py3_compatible=True)
# test fsmo show
for env in ["ad_dc_ntvfs", "fl2000dc", "fl2003dc", "fl2008r2dc"]:
- planpythontestsuite(env + ":local", "samba.tests.samba_tool.fsmo")
+ planpythontestsuite(env + ":local", "samba.tests.samba_tool.fsmo", py3_compatible=True)
# test user.edit
for env in ["ad_dc:local", "ad_dc_ntvfs:local", "fl2000dc:local", "fl2003dc:local", "fl2008r2dc:local"]:
# We run this test against both AD DC implemetnations because it is
# the only test we have of GPO get/set behaviour, and this involves
# the file server as well as the LDAP server.
-planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.gpo")
-planpythontestsuite("ad_dc:local", "samba.tests.samba_tool.gpo")
-
-planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.processes")
-planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.user")
-planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.user_wdigest")
-planpythontestsuite("ad_dc:local", "samba.tests.samba_tool.user")
-planpythontestsuite("ad_dc:local", "samba.tests.samba_tool.user_virtualCryptSHA")
-planpythontestsuite("chgdcpass:local", "samba.tests.samba_tool.user_check_password_script")
-planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.group")
-planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.ou")
-planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.computer")
-planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.forest")
-planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.schema")
-planpythontestsuite("ad_dc:local", "samba.tests.samba_tool.ntacl")
-planpythontestsuite("none", "samba.tests.samba_tool.provision_password_check")
-planpythontestsuite("none", "samba.tests.samba_tool.help")
-planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.passwordsettings")
+planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.gpo", py3_compatible=True)
+planpythontestsuite("ad_dc:local", "samba.tests.samba_tool.gpo", py3_compatible=True)
+
+planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.processes", py3_compatible=True)
+planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.user", py3_compatible=True)
+planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.user_wdigest", py3_compatible=True)
+planpythontestsuite("ad_dc:local", "samba.tests.samba_tool.user", py3_compatible=True)
+planpythontestsuite("ad_dc:local", "samba.tests.samba_tool.user_virtualCryptSHA", py3_compatible=True)
+planpythontestsuite("chgdcpass:local", "samba.tests.samba_tool.user_check_password_script", py3_compatible=True)
+planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.group", py3_compatible=True)
+planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.ou", py3_compatible=True)
+planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.computer", py3_compatible=True)
+planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.forest", py3_compatible=True)
+planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.schema", py3_compatible=True)
+planpythontestsuite("ad_dc:local", "samba.tests.samba_tool.ntacl", py3_compatible=True)
+planpythontestsuite("none", "samba.tests.samba_tool.provision_password_check", py3_compatible=True)
+planpythontestsuite("none", "samba.tests.samba_tool.help", py3_compatible=True)
+planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.passwordsettings", py3_compatible=True)
# Run these against chgdcpass to share the runtime load
-planpythontestsuite("chgdcpass:local", "samba.tests.samba_tool.sites")
-planpythontestsuite("chgdcpass:local", "samba.tests.samba_tool.dnscmd")
+planpythontestsuite("chgdcpass:local", "samba.tests.samba_tool.sites", py3_compatible=True)
+planpythontestsuite("chgdcpass:local", "samba.tests.samba_tool.dnscmd", py3_compatible=True)
# Run this against chgdcpass to ensure at least one python3 test
# against this autobuild target (samba-ad-dc-2)
"ad_dc:local", "samba.tests.ntacls_backup",
extra_args=['-U"$USERNAME%$PASSWORD"'], py3_compatible=True)
-planoldpythontestsuite("ad_dc_ntvfs", "samba.tests.dcerpc.dnsserver", extra_args=['-U"$USERNAME%$PASSWORD"'])
-planoldpythontestsuite("ad_dc", "samba.tests.dcerpc.dnsserver", extra_args=['-U"$USERNAME%$PASSWORD"'])
-planoldpythontestsuite("chgdcpass", "samba.tests.dcerpc.raw_protocol", extra_args=['-U"$USERNAME%$PASSWORD"'])
+planoldpythontestsuite("ad_dc_ntvfs", "samba.tests.dcerpc.dnsserver", extra_args=['-U"$USERNAME%$PASSWORD"'], py3_compatible=True)
+planoldpythontestsuite("ad_dc", "samba.tests.dcerpc.dnsserver", extra_args=['-U"$USERNAME%$PASSWORD"'], py3_compatible=True)
+planoldpythontestsuite("chgdcpass", "samba.tests.dcerpc.raw_protocol", extra_args=['-U"$USERNAME%$PASSWORD"'], py3_compatible=True)
if have_heimdal_support:
planoldpythontestsuite("ad_dc:local", "samba.tests.auth_log", extra_args=['-U"$USERNAME%$PASSWORD"'],
environ={'CLIENT_IP': '127.0.0.11',
planoldpythontestsuite("fl2008r2dc:local",
"samba.tests.getdcname",
- extra_args=['-U"$USERNAME%$PASSWORD"'])
+ extra_args=['-U"$USERNAME%$PASSWORD"'],
+ py3_compatible=True)
planoldpythontestsuite("ad_dc",
"samba.tests.net_join_no_spnego",
- extra_args=['-U"$USERNAME%$PASSWORD"'])
+ extra_args=['-U"$USERNAME%$PASSWORD"'],
+ py3_compatible=True)
planoldpythontestsuite("ad_dc",
"samba.tests.net_join",
- extra_args=['-U"$USERNAME%$PASSWORD"'])
+ extra_args=['-U"$USERNAME%$PASSWORD"'],
+ py3_compatible=True)
# Need to test the password hashing in multiple environments to ensure that
# all the possible options are covered
#
# ad_dc:local functional_level >= 2008, gpg keys available
planoldpythontestsuite("ad_dc:local",
"samba.tests.password_hash_gpgme",
- extra_args=['-U"$USERNAME%$PASSWORD"'])
+ extra_args=['-U"$USERNAME%$PASSWORD"'], py3_compatible=True)
# ad_dc_ntvfs:local functional level >= 2008, gpg keys not available
planoldpythontestsuite("ad_dc_ntvfs:local",
"samba.tests.password_hash_fl2008",
- extra_args=['-U"$USERNAME%$PASSWORD"'])
+ extra_args=['-U"$USERNAME%$PASSWORD"'], py3_compatible=True)
# fl2003dc:local functional level < 2008, gpg keys not available
planoldpythontestsuite("fl2003dc:local",
"samba.tests.password_hash_fl2003",
- extra_args=['-U"$USERNAME%$PASSWORD"'])
+ extra_args=['-U"$USERNAME%$PASSWORD"'], py3_compatible=True)
# ad_dc: wDigest values over ldap
planoldpythontestsuite("ad_dc",
"samba.tests.password_hash_ldap",
- extra_args=['-U"$USERNAME%$PASSWORD"'])
-planoldpythontestsuite("ad_dc:local",
- "samba.tests.domain_backup",
- extra_args=['-U"$USERNAME%$PASSWORD"'])
+ extra_args=['-U"$USERNAME%$PASSWORD"'], py3_compatible=True)
+
+for env in ["ad_dc", smbv1_disabled_testenv]:
+ planoldpythontestsuite(env + ":local", "samba.tests.domain_backup",
+ extra_args=['-U"$USERNAME%$PASSWORD"'])
+
planoldpythontestsuite("none",
"samba.tests.domain_backup_offline")
# Encrypted secrets
# encrypt secret values on disk.
planoldpythontestsuite("ad_dc:local",
"samba.tests.encrypted_secrets",
- extra_args=['-U"$USERNAME%$PASSWORD"'])
+ extra_args=['-U"$USERNAME%$PASSWORD"'], py3_compatible=True)
planoldpythontestsuite("vampire_dc:local",
"samba.tests.encrypted_secrets",
- extra_args=['-U"$USERNAME%$PASSWORD"'])
+ extra_args=['-U"$USERNAME%$PASSWORD"'], py3_compatible=True)
# The fl2000dc environment is provisioned with the --plaintext_secrets option
# so this test will fail, which proves the secrets are not being encrypted.
# There is an entry in known_fail.d.
planoldpythontestsuite("fl2000dc:local",
"samba.tests.encrypted_secrets",
- extra_args=['-U"$USERNAME%$PASSWORD"'])
+ extra_args=['-U"$USERNAME%$PASSWORD"'], py3_compatible=True)
planpythontestsuite("none",
"samba.tests.lsa_string",
for env in ["ad_dc_ntvfs", "vampire_dc", "promoted_dc"]:
planoldpythontestsuite(env,
"samba.tests.py_credentials",
- extra_args=['-U"$USERNAME%$PASSWORD"'])
+ extra_args=['-U"$USERNAME%$PASSWORD"'], py3_compatible=True)
planoldpythontestsuite("ad_dc_ntvfs",
"samba.tests.emulate.traffic",
- extra_args=['-U"$USERNAME%$PASSWORD"'])
+ extra_args=['-U"$USERNAME%$PASSWORD"'], py3_compatible=True)
planoldpythontestsuite("ad_dc_ntvfs",
"samba.tests.emulate.traffic_packet",
- extra_args=['-U"$USERNAME%$PASSWORD"'])
+ extra_args=['-U"$USERNAME%$PASSWORD"'], py3_compatible=True)
planoldpythontestsuite("ad_dc_ntvfs",
"samba.tests.blackbox.traffic_replay",
- extra_args=['-U"$USERNAME%$PASSWORD"'])
+ extra_args=['-U"$USERNAME%$PASSWORD"'], py3_compatible=True)
planoldpythontestsuite("ad_dc_ntvfs",
"samba.tests.blackbox.traffic_learner",
- extra_args=['-U"$USERNAME%$PASSWORD"'])
+ extra_args=['-U"$USERNAME%$PASSWORD"'], py3_compatible=True)
planoldpythontestsuite("ad_dc_ntvfs",
"samba.tests.blackbox.traffic_summary",
- extra_args=['-U"$USERNAME%$PASSWORD"'])
+ extra_args=['-U"$USERNAME%$PASSWORD"'], py3_compatible=True)
planoldpythontestsuite("none", "samba.tests.loadparm")
#
for env in ["ad_dc_ntvfs:local", "ad_dc:local",
"fl2003dc:local", "fl2008r2dc:local",
"promoted_dc:local"]:
- planoldpythontestsuite(env, "samba.tests.blackbox.smbcontrol")
+ planoldpythontestsuite(env, "samba.tests.blackbox.smbcontrol", py3_compatible=True)
plantestsuite_loadlist("samba4.ldap.python(ad_dc_ntvfs)", "ad_dc_ntvfs", [python, os.path.join(samba4srcdir, "dsdb/tests/python/ldap.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
plantestsuite_loadlist("samba4.tokengroups.krb5.python(ad_dc_ntvfs)", "ad_dc_ntvfs:local", [python, os.path.join(samba4srcdir, "dsdb/tests/python/token_group.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '-k', 'yes', '$LOADLIST', '$LISTOPT'])
planoldpythontestsuite("ad_dc_ntvfs", "dsdb_schema_info",
extra_path=[os.path.join(samba4srcdir, 'dsdb/tests/python')],
name="samba4.schemaInfo.python(ad_dc_ntvfs)",
- extra_args=['-U"$DOMAIN/$DC_USERNAME%$DC_PASSWORD"'])
+ extra_args=['-U"$DOMAIN/$DC_USERNAME%$DC_PASSWORD"'], py3_compatible=True)
-planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.dsdb_schema_attributes")
+planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.dsdb_schema_attributes", py3_compatible=True)
plantestsuite_loadlist("samba4.urgent_replication.python(ad_dc_ntvfs)", "ad_dc_ntvfs:local", [python, os.path.join(samba4srcdir, "dsdb/tests/python/urgent_replication.py"), '$PREFIX_ABS/ad_dc_ntvfs/private/sam.ldb', '$LOADLIST', '$LISTOPT'])
plantestsuite_loadlist("samba4.ldap.dirsync.python(ad_dc_ntvfs)", "ad_dc_ntvfs", [python, os.path.join(samba4srcdir, "dsdb/tests/python/dirsync.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
["PYTHON=%s" % python,
os.path.join(bbdir, "ldapcmp_restoredc.sh"),
'$PREFIX_ABS/backupfromdc', '$PREFIX_ABS/%s' % env])
+
+# we also test joining backupfromdc here, as it's a bit special in that it
+# doesn't have Default-First-Site-Name
+for env in ['backupfromdc', 'offlinebackupdc', 'restoredc', 'renamedc',
+ 'labdc']:
# basic test that we can join the testenv DC
plantestsuite("samba4.blackbox.join_ldapcmp", env,
["PYTHON=%s" % python, os.path.join(bbdir, "join_ldapcmp.sh")])
extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
name="samba4.drs.replica_sync_rodc.python(rodc)",
environ={'DC1': '$DC_SERVER', 'DC2': '$RODC_DC_SERVER'},
- extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
+ extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'],
+ py3_compatible=True)
planoldpythontestsuite("ad_dc_ntvfs", "password_settings",
extra_path=[os.path.join(samba4srcdir, 'dsdb/tests/python')],
- name="samba4.ldap.password_settings.python",
- extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
+ name="samba4.ldap.passwordsettings.python",
+ extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'],
+ py3_compatible=True)
for env in ["ad_dc_ntvfs", "fl2000dc", "fl2003dc", "fl2008r2dc"]:
plantestsuite_loadlist("samba4.ldap_schema.python(%s)" % env, env, [python, os.path.join(samba4srcdir, "dsdb/tests/python/ldap_schema.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
planoldpythontestsuite(env, "tombstone_reanimation",
name="samba4.tombstone_reanimation.python",
environ={'TEST_SERVER': '$SERVER', 'TEST_USERNAME': '$USERNAME', 'TEST_PASSWORD': '$PASSWORD'},
- extra_path=[os.path.join(samba4srcdir, 'dsdb/tests/python')]
+ extra_path=[os.path.join(samba4srcdir, 'dsdb/tests/python')], py3_compatible=True
)
# this is a basic sanity-check of Kerberos/NTLM user login
"$SERVER", '-U"$USERNAME%$PASSWORD"', "-W$DOMAIN", "--realm=$REALM",
'$LOADLIST', '$LISTOPT'])
-planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.upgradeprovisionneeddc")
+planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.upgradeprovisionneeddc", py3_compatible=True)
planpythontestsuite("ad_dc:local", "samba.tests.posixacl", py3_compatible=True)
planpythontestsuite("ad_dc_no_nss:local", "samba.tests.posixacl", py3_compatible=True)
plantestsuite_loadlist("samba4.deletetest.python(ad_dc_ntvfs)", "ad_dc_ntvfs", [python, os.path.join(samba4srcdir, "dsdb/tests/python/deletetest.py"),
plansmbtorture4testsuite('rpc.echo', "%s:local" % env, ['ncacn_np:$SERVER', "-k", "yes", '-P', '--workgroup=$DOMAIN'], modname="samba4.rpc.echo")
plansmbtorture4testsuite('rpc.echo', "%s:local" % env, ['ncacn_np:$SERVER', "-k", "no", '-Utestallowed\ account%$DC_PASSWORD', '--workgroup=$DOMAIN'], modname="samba4.rpc.echo.testallowed")
plansmbtorture4testsuite('rpc.echo', "%s:local" % env, ['ncacn_np:$SERVER', "-k", "no", '-Utestdenied%$DC_PASSWORD', '--workgroup=$DOMAIN'], modname="samba4.rpc.echo.testdenied")
- plantestsuite("samba4.blackbox.smbclient(%s:local)" % env, "%s:local" % env, [os.path.join(samba4srcdir, "utils/tests/test_smbclient.sh"), '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', '$DOMAIN', smbclient4])
+ plantestsuite("samba4.blackbox.smbclient(%s:local)" % env, "%s:local" % env, [os.path.join(samba4srcdir, "utils/tests/test_smbclient.sh"), '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', '$DOMAIN', binpath('smbclient')])
-planpythontestsuite("rodc:local", "samba.tests.samba_tool.rodc")
+planpythontestsuite("rodc:local", "samba.tests.samba_tool.rodc", py3_compatible=True)
plantestsuite("samba.blackbox.rpcclient_samlogon", "rodc:local", [os.path.join(samba3srcdir, "script/tests/test_rpcclient_samlogon.sh"),
"$DC_USERNAME", "$DC_PASSWORD", "ncacn_np:$SERVER", configuration])
extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
name="samba4.drs.ridalloc_exop.python(%s)" % env,
environ={'DC1': "$DC_SERVER", 'DC2': '$%s_SERVER' % env.upper()},
- extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
+ extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'],
+ py3_compatible=True)
for env in ['vampire_dc', 'promoted_dc']:
planoldpythontestsuite("%s:local" % env, "samba_tool_drs",
extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
name="samba4.drs.samba_tool_drs.python(%s)" % env,
environ={'DC1': '$DC_SERVER', 'DC2': '$%s_SERVER' % env.upper()},
- extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
+ extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'],
+ py3_compatible=True)
planoldpythontestsuite("%s:local" % env, "samba_tool_drs_showrepl",
extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
name="samba4.drs.samba_tool_drs_showrepl.python(%s)" % env,
environ={'DC1': '$DC_SERVER', 'DC2': '$%s_SERVER' % env.upper()},
- extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
+ extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'],
+ py3_compatible=True)
planoldpythontestsuite("%s:local" % env, "replica_sync",
extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
name="samba4.drs.replica_sync.python(%s)" % env,
environ={'DC1': '$DC_SERVER', 'DC2': '$%s_SERVER' % env.upper()},
- extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
+ extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'],
+ py3_compatible=True)
planoldpythontestsuite(env, "delete_object",
extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
name="samba4.drs.delete_object.python(%s)" % env,
environ={'DC1': '$DC_SERVER', 'DC2': '$%s_SERVER' % env.upper()},
- extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
+ extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'],
+ py3_compatible=True)
planoldpythontestsuite(env, "fsmo",
name="samba4.drs.fsmo.python(%s)" % env,
extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
environ={'DC1': "$DC_SERVER", 'DC2': '$%s_SERVER' % env.upper()},
- extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
+ extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'],
+ py3_compatible=True)
planoldpythontestsuite(env, "repl_move",
extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
name="samba4.drs.repl_move.python(%s)" % env,
environ={'DC1': "$DC_SERVER", 'DC2': '$%s_SERVER' % env.upper()},
- extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
+ extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'],
+ py3_compatible=True)
planoldpythontestsuite(env, "getnc_exop",
extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
name="samba4.drs.getnc_exop.python(%s)" % env,
environ={'DC1': "$DC_SERVER", 'DC2': '$%s_SERVER' % env.upper()},
- extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
+ extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'],
+ py3_compatible=True)
planoldpythontestsuite(env, "getnc_unpriv",
extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
name="samba4.drs.getnc_unpriv.python(%s)" % env,
environ={'DC1': "$DC_SERVER", 'DC2': '$%s_SERVER' % env.upper()},
- extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
+ extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'],
+ py3_compatible=True)
planoldpythontestsuite(env, "linked_attributes_drs",
extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
name="samba4.drs.linked_attributes_drs.python(%s)" % env,
extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
name="samba4.drs.link_conflicts.python(%s)" % env,
environ={'DC1': "$DC_SERVER", 'DC2': '$%s_SERVER' % env.upper()},
- extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
+ extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'],
+ py3_compatible=True)
for env in ['vampire_dc', 'promoted_dc', 'vampire_2000_dc']:
planoldpythontestsuite(env, "repl_schema",
extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
name="samba4.drs.repl_schema.python(%s)" % env,
environ={'DC1': "$DC_SERVER", 'DC2': '$%s_SERVER' % env.upper()},
- extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
+ extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'],
+ py3_compatible=True)
# A side-effect of the getncchanges tests is that they will create hundreds of
# tombstone objects, so run them last to avoid interferring with (and slowing
extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
name="samba4.drs.getncchanges.python(%s)" % env,
environ={'DC1': "$DC_SERVER", 'DC2': '$%s_SERVER' % env.upper()},
- extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
+ extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'],
+ py3_compatible=True)
for env in ['ad_dc_ntvfs']:
planoldpythontestsuite(env, "repl_rodc",
extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
name="samba4.drs.repl_rodc.python(%s)" % env,
environ={'DC1': "$DC_SERVER", 'DC2': '$DC_SERVER'},
- extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
+ extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'],
+ py3_compatible=True)
planoldpythontestsuite(env, "samba.tests.join",
name="samba.tests.join.python(%s)" % env,
- extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
+ extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'],
+ py3_compatible=True)
planoldpythontestsuite(env, "cracknames",
extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
name="samba4.drs.cracknames.python(%s)" % env,
environ={'DC1': "$DC_SERVER", 'DC2': '$DC_SERVER'},
- extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
+ extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'],
+ py3_compatible=True)
planoldpythontestsuite("chgdcpass:local", "samba.tests.blackbox.samba_dnsupdate",
environ={'DNS_SERVER_IP': '$SERVER_IP'})
env = "promoted_dc"
plansmbtorture4testsuite('krb5.kdc', env, ['ncacn_np:$SERVER_IP', "-k", "yes", '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN', '--realm=$REALM'],
"samba4.krb5.kdc with specified account")
+plansmbtorture4testsuite('krb5.kdc', env, ['ncacn_np:$SERVER_IP', "-k", "yes", '-Utestupnspn%$PASSWORD', '--workgroup=$DOMAIN', '--realm=$REALM',
+ '--option=torture:expect_machine_account=true',
+ '--option=torture:krb5-upn=http/testupnspn.$DNSNAME@$REALM',
+ '--option=torture:krb5-hostname=testupnspn.$DNSNAME',
+ '--option=torture:krb5-service=http'],
+ "samba4.krb5.kdc with account having identical UPN and SPN")
for env in ["rodc", "promoted_dc", "fl2000dc", "fl2008r2dc"]:
'TEST_PASSWORD': '$PASSWORD',
'TEST_ENV': env
},
- extra_path=[os.path.join(srcdir(), "samba/python"), ]
- )
- planpythontestsuite(env, "samba.tests.samba_tool.visualize_drs")
+ extra_path=[os.path.join(srcdir(), "samba/python"), ],
+ py3_compatible=True)
+ planpythontestsuite(env, "samba.tests.samba_tool.visualize_drs", py3_compatible=True)
-planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.kcc.kcc_utils")
+planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.kcc.kcc_utils", py3_compatible=True)
for env in ["simpleserver", "fileserver", "nt4_dc", "ad_dc", "ad_dc_ntvfs",
"ad_member", "offlinebackupdc", "restoredc", "renamedc", "labdc"]:
planoldpythontestsuite(env, "netlogonsvc",
extra_path=[os.path.join(srcdir(), 'python/samba/tests')],
- name="samba.tests.netlogonsvc.python(%s)" % env)
+ name="samba.tests.netlogonsvc.python(%s)" % env,
+ py3_compatible=True)
for env in ["ktest", "ad_member", "ad_dc_no_ntlm"]:
planoldpythontestsuite(env, "ntlmdisabled",
extra_path=[os.path.join(srcdir(), 'python/samba/tests')],
- name="samba.tests.ntlmdisabled.python(%s)" % env)
+ name="samba.tests.ntlmdisabled.python(%s)" % env,
+ py3_compatible=True)
# Demote the vampire DC, it must be the last test each DC, before the dbcheck
for env in ['vampire_dc', 'promoted_dc', 'rodc']:
'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.
+#
+planoldpythontestsuite("ad_dc_ntvfs:local",
+ "samba.tests.blackbox.bug13653",
+ extra_args=['-U"$USERNAME%$PASSWORD"'],
+ environ={'TEST_ENV': 'ad_dc_ntvfs'},
+ py3_compatible=True)
+planoldpythontestsuite("ad_dc:local",
+ "samba.tests.blackbox.bug13653",
+ extra_args=['-U"$USERNAME%$PASSWORD"'],
+ environ={'TEST_ENV': 'ad_dc'},
+ py3_compatible=True)
# cmocka tests not requiring a specific environment
#
plantestsuite("samba4.dsdb.samdb.ldb_modules.unique_object_sids", "none",
[os.path.join(bindir(), "test_unique_object_sids")])
-plantestsuite("samba4.dsdb.samdb.ldb_modules.encrypted_secrets", "none",
- [os.path.join(bindir(), "test_encrypted_secrets")])
+plantestsuite("samba4.dsdb.samdb.ldb_modules.encrypted_secrets.tdb", "none",
+ [os.path.join(bindir(), "test_encrypted_secrets_tdb")])
+plantestsuite("samba4.dsdb.samdb.ldb_modules.encrypted_secrets.mdb", "none",
+ [os.path.join(bindir(), "test_encrypted_secrets_mdb")])
plantestsuite("lib.audit_logging.audit_logging", "none",
[os.path.join(bindir(), "audit_logging_test")])
plantestsuite("lib.audit_logging.audit_logging.errors", "none",
[os.path.join(bindir(), "test_group_audit")])
plantestsuite("samba4.dsdb.samdb.ldb_modules.group_audit.errors", "none",
[os.path.join(bindir(), "test_group_audit_errors")])
+plantestsuite("samba4.dcerpc.dnsserver.dnsutils", "none",
+ [os.path.join(bindir(), "test_rpc_dns_server_dnsutils")])
+
+# process restart and limit tests, these break the environment so need to run
+# in their own specific environment
+planoldpythontestsuite("preforkrestartdc:local",
+ "samba.tests.prefork_restart",
+ extra_path=[
+ os.path.join(srcdir(), 'python/samba/tests')],
+ extra_args=['-U"$USERNAME%$PASSWORD"'],
+ name="samba.tests.prefork_restart",
+ py3_compatible=True)
+planoldpythontestsuite("proclimitdc:local",
+ "samba.tests.process_limits",
+ extra_path=[
+ os.path.join(srcdir(), 'python/samba/tests')],
+ extra_args=['-U"$USERNAME%$PASSWORD"'],
+ environ={'CLIENT_IP': '127.0.0.11',
+ 'SOCKET_WRAPPER_DEFAULT_IFACE': 11},
+ name="samba.tests.process_limits",
+ py3_compatible=True)