s3:smbd: pass smbXsrv_connection explicitly to fake_sendfile()
[Samba.git] / source4 / selftest / tests.py
blobce728f93a30fa1908c57146726bccb73166dd85d
1 #!/usr/bin/python
2 # This script generates a list of testsuites that should be run as part of
3 # the Samba 4 test suite.
5 # The output of this script is parsed by selftest.pl, which then decides
6 # which of the tests to actually run. It will, for example, skip all tests
7 # listed in selftest/skip or only run a subset during "make quicktest".
9 # The idea is that this script outputs all of the tests of Samba 4, not
10 # just those that are known to pass, and list those that should be skipped
11 # or are known to fail in selftest/skip or selftest/knownfail. This makes it
12 # very easy to see what functionality is still missing in Samba 4 and makes
13 # it possible to run the testsuite against other servers, such as Samba 3 or
14 # Windows that have a different set of features.
16 # The syntax for a testsuite is "-- TEST --" on a single line, followed
17 # by the name of the test, the environment it needs and the command to run, all
18 # three separated by newlines. All other lines in the output are considered
19 # comments.
21 import os, sys
22 sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../../selftest"))
23 import selftesthelpers
24 from selftesthelpers import *
26 print >>sys.stderr, "OPTIONS %s" % " ".join(smbtorture4_options)
28 def plansmbtorture4testsuite(name, env, options, modname=None):
29 return selftesthelpers.plansmbtorture4testsuite(name, env, options,
30 target='samba4', modname=modname)
32 samba4srcdir = source4dir()
33 samba4bindir = bindir()
34 validate = os.getenv("VALIDATE", "")
35 if validate:
36 validate_list = [validate]
37 else:
38 validate_list = []
40 nmblookup4 = binpath('nmblookup4')
41 smbclient4 = binpath('smbclient4')
43 bbdir = os.path.join(srcdir(), "testprogs/blackbox")
45 # Simple tests for LDAP and CLDAP
46 for options in ['-U"$USERNAME%$PASSWORD" --option=socket:testnonblock=true', '-U"$USERNAME%$PASSWORD"', '-U"$USERNAME%$PASSWORD" -k yes', '-U"$USERNAME%$PASSWORD" -k no', '-U"$USERNAME%$PASSWORD" -k no --sign', '-U"$USERNAME%$PASSWORD" -k no --encrypt', '-U"$USERNAME%$PASSWORD" -k yes --encrypt', '-U"$USERNAME%$PASSWORD" -k yes --sign']:
47 plantestsuite("samba4.ldb.ldap with options %s(dc)" % options, "dc", "%s/test_ldb.sh ldap $SERVER %s" % (bbdir, options))
49 # see if we support ADS on the Samba3 side
50 try:
51 config_h = os.environ["CONFIG_H"]
52 except KeyError:
53 config_h = os.path.join(samba4bindir, "default/include/config.h")
55 # see if we support ldaps
56 f = open(config_h, 'r')
57 try:
58 have_tls_support = ("ENABLE_GNUTLS 1" in f.read())
59 finally:
60 f.close()
62 if have_tls_support:
63 for options in ['-U"$USERNAME%$PASSWORD"']:
64 plantestsuite("samba4.ldb.ldaps with options %s(dc)" % options, "dc",
65 "%s/test_ldb.sh ldaps $SERVER_IP %s" % (bbdir, options))
67 for options in ['-U"$USERNAME%$PASSWORD"']:
68 plantestsuite("samba4.ldb.ldapi with options %s(dc:local)" % options, "dc:local",
69 "%s/test_ldb.sh ldapi $PREFIX_ABS/dc/private/ldapi %s" % (bbdir, options))
71 for t in smbtorture4_testsuites("ldap."):
72 plansmbtorture4testsuite(t, "dc", '-U"$USERNAME%$PASSWORD" //$SERVER_IP/_none_')
74 ldbdir = os.path.join(srcdir(), "lib/ldb")
75 # Don't run LDB tests when using system ldb, as we won't have ldbtest installed
76 if os.path.exists(os.path.join(samba4bindir, "ldbtest")):
77 plantestsuite("ldb.base", "none", "%s/tests/test-tdb-subunit.sh %s" % (ldbdir, samba4bindir))
78 else:
79 skiptestsuite("ldb.base", "Using system LDB, ldbtest not available")
81 # Tests for RPC
83 # add tests to this list as they start passing, so we test
84 # that they stay passing
85 ncacn_np_tests = ["rpc.schannel", "rpc.join", "rpc.lsa", "rpc.dssetup", "rpc.altercontext", "rpc.netlogon", "rpc.handles", "rpc.samsync", "rpc.samba3-sessionkey", "rpc.samba3-getusername", "rpc.samba3-lsa", "rpc.samba3-bind", "rpc.samba3-netlogon", "rpc.asyncbind", "rpc.lsalookup", "rpc.lsa-getuser", "rpc.schannel2", "rpc.authcontext"]
86 ncalrpc_tests = ["rpc.schannel", "rpc.join", "rpc.lsa", "rpc.dssetup", "rpc.altercontext", "rpc.netlogon", "rpc.drsuapi", "rpc.asyncbind", "rpc.lsalookup", "rpc.lsa-getuser", "rpc.schannel2", "rpc.authcontext"]
87 drs_rpc_tests = smbtorture4_testsuites("drs.rpc")
88 ncacn_ip_tcp_tests = ["rpc.schannel", "rpc.join", "rpc.lsa", "rpc.dssetup", "rpc.netlogon", "rpc.asyncbind", "rpc.lsalookup", "rpc.lsa-getuser", "rpc.schannel2", "rpc.authcontext", "rpc.samr.passwords.validate"] + drs_rpc_tests
89 slow_ncacn_np_tests = ["rpc.samlogon", "rpc.samr.users", "rpc.samr.large-dc", "rpc.samr.users.privileges", "rpc.samr.passwords", "rpc.samr.passwords.pwdlastset", "rpc.samr.passwords.lockout", "rpc.samr.passwords.badpwdcount"]
90 slow_ncacn_ip_tcp_tests = ["rpc.samr", "rpc.cracknames"]
92 all_rpc_tests = ncalrpc_tests + ncacn_np_tests + ncacn_ip_tcp_tests + slow_ncacn_np_tests + slow_ncacn_ip_tcp_tests + ["rpc.lsa.secrets", "rpc.pac", "rpc.samba3-sharesec", "rpc.countcalls"]
94 # Make sure all tests get run
95 rpc_tests = smbtorture4_testsuites("rpc.")
96 auto_rpc_tests = filter(lambda t: t not in all_rpc_tests, rpc_tests)
98 for bindoptions in ["seal,padcheck"] + validate_list + ["bigendian"]:
99 for transport in ["ncalrpc", "ncacn_np", "ncacn_ip_tcp"]:
100 env = "dc"
101 if transport == "ncalrpc":
102 tests = ncalrpc_tests
103 env = "dc:local"
104 elif transport == "ncacn_np":
105 tests = ncacn_np_tests
106 elif transport == "ncacn_ip_tcp":
107 tests = ncacn_ip_tcp_tests
108 else:
109 raise AssertionError("invalid transport %r"% transport)
110 for t in tests:
111 plansmbtorture4testsuite(t, env, ["%s:$SERVER[%s]" % (transport, bindoptions), '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.%s on %s with %s" % (t, transport, bindoptions))
112 plansmbtorture4testsuite('rpc.samba3-sharesec', env, ["%s:$SERVER[%s]" % (transport, bindoptions), '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN', '--option=torture:share=tmp'], "samba4.rpc.samba3.sharesec on %s with %s" % (transport, bindoptions))
114 #Plugin S4 DC tests (confirms named pipe auth forwarding). This can be expanded once kerberos is supported in the plugin DC
116 for bindoptions in ["seal,padcheck"] + validate_list + ["bigendian"]:
117 for t in ncacn_np_tests:
118 env = "plugin_s4_dc"
119 transport = "ncacn_np"
120 plansmbtorture4testsuite(t, env, ["%s:$SERVER[%s]" % (transport, bindoptions), '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.%s with %s" % (t, bindoptions))
122 for bindoptions in [""] + validate_list + ["bigendian"]:
123 for t in auto_rpc_tests:
124 plansmbtorture4testsuite(t, "dc", ["$SERVER[%s]" % bindoptions, '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.%s with %s" % (t, bindoptions))
126 t = "rpc.countcalls"
127 plansmbtorture4testsuite(t, "dc:local", ["$SERVER[%s]" % bindoptions, '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], modname="samba4.%s" % t)
129 for transport in ["ncacn_np", "ncacn_ip_tcp"]:
130 env = "dc"
131 if transport == "ncacn_np":
132 tests = slow_ncacn_np_tests
133 elif transport == "ncacn_ip_tcp":
134 tests = slow_ncacn_ip_tcp_tests
135 else:
136 raise AssertionError("Invalid transport %r" % transport)
137 for t in tests:
138 plansmbtorture4testsuite(t, env, ["%s:$SERVER" % transport, '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.%s on %s" % (t, transport))
140 # Tests for the DFS referral calls implementation
141 for t in smbtorture4_testsuites("dfs."):
142 plansmbtorture4testsuite(t, "dc", '//$SERVER/ipc\$ -U$USERNAME%$PASSWORD')
143 plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER/ipc\$ -U$USERNAME%$PASSWORD')
145 # Tests for the NET API (net.api.become.dc tested below against all the roles)
146 net_tests = filter(lambda x: "net.api.become.dc" not in x, smbtorture4_testsuites("net."))
147 for t in net_tests:
148 plansmbtorture4testsuite(t, "dc", '$SERVER[%s] -U$USERNAME%%$PASSWORD -W$DOMAIN' % validate)
150 # Tests for session keys and encryption of RPC pipes
151 # FIXME: Integrate these into a single smbtorture test
153 transport = "ncacn_np"
154 for env in ["dc", "s3dc"]:
155 for ntlmoptions in [
156 "-k no --option=usespnego=yes",
157 "-k no --option=usespnego=yes --option=ntlmssp_client:128bit=no",
158 "-k no --option=usespnego=yes --option=ntlmssp_client:56bit=yes",
159 "-k no --option=usespnego=yes --option=ntlmssp_client:56bit=no",
160 "-k no --option=usespnego=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=yes",
161 "-k no --option=usespnego=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=no",
162 "-k no --option=usespnego=yes --option=clientntlmv2auth=yes",
163 "-k no --option=usespnego=yes --option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no",
164 "-k no --option=usespnego=yes --option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=yes",
165 "-k no --option=usespnego=no --option=clientntlmv2auth=yes",
166 "-k no --option=gensec:spnego=no --option=clientntlmv2auth=yes",
167 "-k no --option=usespnego=no"]:
168 name = "rpc.lsa.secrets on %s with with %s" % (transport, ntlmoptions)
169 plansmbtorture4testsuite('rpc.lsa.secrets', env, ["%s:$SERVER[]" % (transport), ntlmoptions, '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN', '--option=gensec:target_hostname=$NETBIOSNAME'], "samba4.%s" % name)
170 plantestsuite("samba.blackbox.pdbtest(%s)" % env, "%s:local" % env, [os.path.join(bbdir, "test_pdbtest.sh"), '$SERVER', "$PREFIX", "pdbtest", smbclient4, '$SMB_CONF_PATH', configuration])
171 plantestsuite("samba.blackbox.pdbtest.winbind(%s)" % env, "%s:local" % env, [os.path.join(bbdir, "test_pdbtest.sh"), '$SERVER', "$PREFIX", "pdbtest2", smbclient4, '$SMB_CONF_PATH', configuration + " --option='authmethods=wbc'"])
173 plantestsuite("samba.blackbox.pdbtest.s4winbind(dc)", "dc:local", [os.path.join(bbdir, "test_pdbtest.sh"), '$SERVER', "$PREFIX", "pdbtest3", smbclient4, '$SMB_CONF_PATH', configuration + " --option='authmethods=samba4:winbind'"])
174 plantestsuite("samba.blackbox.pdbtest.s4winbind_wbclient(dc)", "dc:local", [os.path.join(bbdir, "test_pdbtest.sh"), '$SERVER', "$PREFIX", "pdbtest4", smbclient4, '$SMB_CONF_PATH', configuration + " --option='authmethods=samba4:winbind_wbclient'"])
176 transports = ["ncacn_np", "ncacn_ip_tcp"]
178 #Kerberos varies between functional levels, so it is important to check this on all of them
179 for env in ["dc", "fl2000dc", "fl2003dc", "fl2008r2dc", "plugin_s4_dc"]:
180 transport = "ncacn_np"
181 plansmbtorture4testsuite('rpc.pac', env, ["%s:$SERVER[]" % (transport, ), '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.rpc.pac on %s" % (transport,))
182 plansmbtorture4testsuite('rpc.lsa.secrets', env, ["%s:$SERVER[]" % (transport, ), '-k', 'yes', '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN', '--option=gensec:target_hostname=$NETBIOSNAME', 'rpc.lsa.secrets'], "samba4.rpc.lsa.secrets on %s with Kerberos" % (transport,))
183 plansmbtorture4testsuite('rpc.lsa.secrets', env, ["%s:$SERVER[]" % (transport, ), '-k', 'yes', '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN', "--option=clientusespnegoprincipal=yes", '--option=gensec:target_hostname=$NETBIOSNAME'], "samba4.rpc.lsa.secrets on %s with Kerberos - use target principal" % (transport,))
184 plansmbtorture4testsuite('rpc.lsa.secrets.none*', env, ["%s:$SERVER" % transport, '-k', 'yes', '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN', "--option=gensec:fake_gssapi_krb5=yes", '--option=gensec:gssapi_krb5=no', '--option=gensec:target_hostname=$NETBIOSNAME'], "samba4.rpc.lsa.secrets on %s with Kerberos - use Samba3 style login" % transport)
185 plansmbtorture4testsuite('rpc.lsa.secrets.none*', env, ["%s:$SERVER" % transport, '-k', 'yes', '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN', "--option=clientusespnegoprincipal=yes", '--option=gensec:fake_gssapi_krb5=yes', '--option=gensec:gssapi_krb5=no', '--option=gensec:target_hostname=$NETBIOSNAME'], "samba4.rpc.lsa.secrets on %s with Kerberos - use Samba3 style login, use target principal" % transport)
186 for transport in transports:
187 plansmbtorture4testsuite('rpc.echo', env, ["%s:$SERVER[]" % (transport,), '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.rpc.echo on %s" % (transport, ))
189 # Echo tests test bulk Kerberos encryption of DCE/RPC
190 for bindoptions in ["connect", "spnego", "spnego,sign", "spnego,seal"] + validate_list + ["padcheck", "bigendian", "bigendian,seal"]:
191 echooptions = "--option=socket:testnonblock=True --option=torture:quick=yes -k yes"
192 plansmbtorture4testsuite('rpc.echo', env, ["%s:$SERVER[%s]" % (transport, bindoptions), echooptions, '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.rpc.echo on %s with %s and %s" % (transport, bindoptions, echooptions))
193 plansmbtorture4testsuite("net.api.become.dc", env, '$SERVER[%s] -U$USERNAME%%$PASSWORD -W$DOMAIN' % validate)
195 for bindoptions in ["sign", "seal"]:
196 plansmbtorture4testsuite('rpc.backupkey', "dc", ["ncacn_np:$SERVER[%s]" % ( bindoptions), '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.rpc.backupkey with %s" % (bindoptions))
198 for transport in transports:
199 for bindoptions in ["sign", "seal"]:
200 for ntlmoptions in [
201 "--option=ntlmssp_client:ntlm2=yes --option=torture:quick=yes",
202 "--option=ntlmssp_client:ntlm2=no --option=torture:quick=yes",
203 "--option=ntlmssp_client:ntlm2=yes --option=ntlmssp_client:128bit=no --option=torture:quick=yes",
204 "--option=ntlmssp_client:ntlm2=no --option=ntlmssp_client:128bit=no --option=torture:quick=yes",
205 "--option=ntlmssp_client:ntlm2=yes --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes",
206 "--option=ntlmssp_client:ntlm2=no --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes",
207 "--option=clientntlmv2auth=yes --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes",
208 "--option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:keyexchange=yes --option=torture:quick=yes",
209 "--option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes"]:
210 if transport == "ncalrpc":
211 env = "dc:local"
212 else:
213 env = "dc"
214 plansmbtorture4testsuite('rpc.echo', env, ["%s:$SERVER[%s]" % (transport, bindoptions), ntlmoptions, '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.rpc.echo on %s with %s and %s" % (transport, bindoptions, ntlmoptions))
216 plansmbtorture4testsuite('rpc.echo', "dc", ['ncacn_np:$SERVER[smb2]', '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.rpc.echo on ncacn_np over smb2")
218 plansmbtorture4testsuite('ntp.signd', "dc:local", ['ncacn_np:$SERVER', '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.ntp.signd")
220 nbt_tests = smbtorture4_testsuites("nbt.")
221 for t in nbt_tests:
222 plansmbtorture4testsuite(t, "dc", "//$SERVER/_none_ -U\"$USERNAME%$PASSWORD\"")
224 # Tests against the NTVFS POSIX backend
225 ntvfsargs = ["--option=torture:sharedelay=10000", "--option=torture:oplocktimeout=3", "--option=torture:writetimeupdatedelay=50000"]
227 smb2 = smbtorture4_testsuites("smb2.")
228 #The QFILEINFO-IPC test needs to be on ipc$
229 raw = filter(lambda x: "raw.qfileinfo.ipc" not in x, smbtorture4_testsuites("raw."))
230 base = smbtorture4_testsuites("base.")
232 netapi = smbtorture4_testsuites("netapi.")
234 libsmbclient = smbtorture4_testsuites("libsmbclient.")
236 for t in base + raw + smb2 + netapi + libsmbclient:
237 plansmbtorture4testsuite(t, "dc", ['//$SERVER/tmp', '-U$USERNAME%$PASSWORD'] + ntvfsargs)
239 plansmbtorture4testsuite("raw.qfileinfo.ipc", "dc", '//$SERVER/ipc\$ -U$USERNAME%$PASSWORD')
241 for t in smbtorture4_testsuites("rap."):
242 plansmbtorture4testsuite(t, "dc", '//$SERVER/IPC\$ -U$USERNAME%$PASSWORD')
244 # Tests against the NTVFS CIFS backend
245 for t in base + raw:
246 plansmbtorture4testsuite(t, "dc", ['//$NETBIOSNAME/cifs', '-U$USERNAME%$PASSWORD', '--kerberos=yes'] + ntvfsargs, modname="samba4.ntvfs.cifs.krb5.%s" % t)
248 # Test NTVFS CIFS backend with S4U2Self and S4U2Proxy
249 t = "base.unlink"
250 plansmbtorture4testsuite(t, "dc", ['//$NETBIOSNAME/cifs', '-U$USERNAME%$PASSWORD', '--kerberos=no'] + ntvfsargs, "samba4.ntvfs.cifs.ntlm.%s" % t)
251 plansmbtorture4testsuite(t, "rpc_proxy", ['//$NETBIOSNAME/cifs_to_dc', '-U$DC_USERNAME%$DC_PASSWORD', '--kerberos=yes'] + ntvfsargs, "samba4.ntvfs.cifs.krb5.%s" % t)
252 plansmbtorture4testsuite(t, "rpc_proxy", ['//$NETBIOSNAME/cifs_to_dc', '-U$DC_USERNAME%$DC_PASSWORD', '--kerberos=no'] + ntvfsargs, "samba4.ntvfs.cifs.ntlm.%s" % t)
254 plansmbtorture4testsuite('echo.udp', 'dc:local', '//$SERVER/whatever')
256 # Local tests
257 for t in smbtorture4_testsuites("local."):
258 #The local.resolve test needs a name to look up using real system (not emulated) name routines
259 plansmbtorture4testsuite(t, "none", "ncalrpc:localhost")
261 # Confirm these tests with the system iconv too
262 for t in ["local.convert_string_handle", "local.convert_string", "local.ndr"]:
263 options = "ncalrpc: --option='iconv:use_builtin_handlers=false'"
264 plansmbtorture4testsuite(t, "none", options,
265 modname="samba4.%s.system.iconv" % t)
267 tdbtorture4 = binpath("tdbtorture")
268 if os.path.exists(tdbtorture4):
269 plantestsuite("tdb.stress", "none", valgrindify(tdbtorture4))
270 else:
271 skiptestsuite("tdb.stress", "Using system TDB, tdbtorture not available")
273 plansmbtorture4testsuite("drs.unit", "none", "ncalrpc:")
275 # Pidl tests
276 for f in sorted(os.listdir(os.path.join(samba4srcdir, "../pidl/tests"))):
277 if f.endswith(".pl"):
278 planperltestsuite("pidl.%s" % f[:-3], os.path.normpath(os.path.join(samba4srcdir, "../pidl/tests", f)))
280 # DNS tests
281 planpythontestsuite("fl2003dc", "samba.tests.dns")
282 for t in smbtorture4_testsuites("dns_internal."):
283 plansmbtorture4testsuite(t, "dc:local", '//$SERVER/whavever')
285 # Local tests
286 for t in smbtorture4_testsuites("dlz_bind9."):
287 #The dlz_bind9 tests needs to look at the DNS database
288 plansmbtorture4testsuite(t, "chgdcpass:local", ["ncalrpc:$SERVER", '-U$USERNAME%$PASSWORD'])
290 planpythontestsuite("s3dc", "samba.tests.libsmb_samba_internal");
292 # Blackbox Tests:
293 # tests that interact directly with the command-line tools rather than using
294 # the API. These mainly test that the various command-line options of commands
295 # work correctly.
297 for env in ["s3member", "s4member", "dc", "chgdcpass"]:
298 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])
300 plantestsuite("samba4.blackbox.samba_tool(dc:local)", "dc:local", [os.path.join(samba4srcdir, "utils/tests/test_samba_tool.sh"), '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', '$DOMAIN', smbclient4])
301 plantestsuite("samba4.blackbox.pkinit(dc:local)", "dc:local", [os.path.join(bbdir, "test_pkinit.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', '$PREFIX', "aes256-cts-hmac-sha1-96", smbclient4, configuration])
302 plantestsuite("samba4.blackbox.kinit(dc:local)", "dc:local", [os.path.join(bbdir, "test_kinit.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', '$PREFIX', "aes256-cts-hmac-sha1-96", smbclient4, configuration])
303 plantestsuite("samba4.blackbox.kinit(fl2000dc:local)", "fl2000dc:local", [os.path.join(bbdir, "test_kinit.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', '$PREFIX', "arcfour-hmac-md5", smbclient4, configuration])
304 plantestsuite("samba4.blackbox.kinit(fl2008r2dc:local)", "fl2008r2dc:local", [os.path.join(bbdir, "test_kinit.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', '$PREFIX', "aes256-cts-hmac-sha1-96", smbclient4, configuration])
305 plantestsuite("samba4.blackbox.ktpass(dc)", "dc", [os.path.join(bbdir, "test_ktpass.sh"), '$PREFIX'])
306 plantestsuite("samba4.blackbox.passwords(dc:local)", "dc:local", [os.path.join(bbdir, "test_passwords.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', "$PREFIX", smbclient4])
307 plantestsuite("samba4.blackbox.export.keytab(dc:local)", "dc:local", [os.path.join(bbdir, "test_export_keytab.sh"), '$SERVER', '$USERNAME', '$REALM', '$DOMAIN', "$PREFIX", smbclient4])
308 plantestsuite("samba4.blackbox.cifsdd(dc)", "dc", [os.path.join(samba4srcdir, "client/tests/test_cifsdd.sh"), '$SERVER', '$USERNAME', '$PASSWORD', "$DOMAIN"])
309 plantestsuite("samba4.blackbox.nmblookup(dc)", "dc", [os.path.join(samba4srcdir, "utils/tests/test_nmblookup.sh"), '$NETBIOSNAME', '$NETBIOSALIAS', '$SERVER', '$SERVER_IP', nmblookup4])
310 plantestsuite("samba4.blackbox.locktest(dc)", "dc", [os.path.join(samba4srcdir, "torture/tests/test_locktest.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$DOMAIN', '$PREFIX'])
311 plantestsuite("samba4.blackbox.masktest", "dc", [os.path.join(samba4srcdir, "torture/tests/test_masktest.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$DOMAIN', '$PREFIX'])
312 plantestsuite("samba4.blackbox.gentest(dc)", "dc", [os.path.join(samba4srcdir, "torture/tests/test_gentest.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$DOMAIN', "$PREFIX"])
313 plantestsuite("samba4.blackbox.rfc2307_mapping(dc:local)", "dc:local", [os.path.join(samba4srcdir, "../nsswitch/tests/test_rfc2307_mapping.sh"), '$DOMAIN', '$USERNAME', '$PASSWORD', "$SERVER", "$UID_RFC2307TEST", "$GID_RFC2307TEST", configuration])
314 plantestsuite("samba4.blackbox.chgdcpass", "chgdcpass", [os.path.join(bbdir, "test_chgdcpass.sh"), '$SERVER', "CHGDCPASS\$", '$REALM', '$DOMAIN', '$PREFIX', "aes256-cts-hmac-sha1-96", '$SELFTEST_PREFIX/chgdcpass', smbclient4])
315 plantestsuite("samba4.blackbox.samba_upgradedns(chgdcpass:local)", "chgdcpass:local", [os.path.join(bbdir, "test_samba_upgradedns.sh"), '$SERVER', '$REALM', '$PREFIX', '$SELFTEST_PREFIX/chgdcpass'])
316 plantestsuite_loadlist("samba4.rpc.echo against NetBIOS alias", "dc", [valgrindify(smbtorture4), "$LISTOPT", 'ncacn_np:$NETBIOSALIAS', '-U$DOMAIN/$USERNAME%$PASSWORD', 'rpc.echo'])
318 # Tests using the "Simple" NTVFS backend
319 for t in ["base.rw1"]:
320 plansmbtorture4testsuite(t, "dc", ["//$SERVER/simple", '-U$USERNAME%$PASSWORD'], modname="samba4.ntvfs.simple.%s" % t)
322 # Domain S4member Tests
323 plansmbtorture4testsuite('rpc.echo', "s4member", ['ncacn_np:$NETBIOSNAME', '-U$NETBIOSNAME/$USERNAME%$PASSWORD'], "samba4.rpc.echo against s4member server with local creds")
324 plansmbtorture4testsuite('rpc.echo', "s4member", ['ncacn_np:$NETBIOSNAME', '-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'], "samba4.rpc.echo against s4member server with domain creds")
325 plansmbtorture4testsuite('rpc.samr', "s4member", ['ncacn_np:$NETBIOSNAME', '-U$NETBIOSNAME/$USERNAME%$PASSWORD'], "samba4.rpc.samr against s4member server with local creds")
326 plansmbtorture4testsuite('rpc.samr.users', "s4member", ['ncacn_np:$NETBIOSNAME', '-U$NETBIOSNAME/$USERNAME%$PASSWORD'], "samba4.rpc.samr.users against s4member server with local creds",)
327 plansmbtorture4testsuite('rpc.samr.passwords', "s4member", ['ncacn_np:$NETBIOSNAME', '-U$NETBIOSNAME/$USERNAME%$PASSWORD'], "samba4.rpc.samr.passwords against s4member server with local creds")
328 plantestsuite("samba4.blackbox.smbclient against s4member server with local creds", "s4member", [os.path.join(samba4srcdir, "client/tests/test_smbclient.sh"), '$NETBIOSNAME', '$USERNAME', '$PASSWORD', '$NETBIOSNAME', '$PREFIX', smbclient4])
330 # RPC Proxy
331 plansmbtorture4testsuite("rpc.echo", "rpc_proxy", ['ncacn_ip_tcp:$NETBIOSNAME', '-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'], modname="samba4.rpc.echo against rpc proxy with domain creds")
333 # Tests SMB signing
334 for mech in [
335 "-k no",
336 "-k no --option=usespnego=no",
337 "-k no --option=gensec:spengo=no",
338 "-k yes",
339 "-k yes --option=gensec:fake_gssapi_krb5=yes --option=gensec:gssapi_krb5=no"]:
340 for signing in ["--signing=on", "--signing=required"]:
341 signoptions = "%s %s" % (mech, signing)
342 name = "smb.signing on with %s" % signoptions
343 plansmbtorture4testsuite('base.xcopy', "dc", ['//$NETBIOSNAME/xcopy_share', signoptions, '-U$USERNAME%$PASSWORD'], modname="samba4.%s" % name)
345 for mech in [
346 "-k no",
347 "-k no --option=usespnego=no",
348 "-k no --option=gensec:spengo=no",
349 "-k yes"]:
350 signoptions = "%s --signing=off" % mech
351 name = "smb.signing disabled on with %s" % signoptions
352 plansmbtorture4testsuite('base.xcopy', "s4member", ['//$NETBIOSNAME/xcopy_share', signoptions, '-U$DC_USERNAME%$DC_PASSWORD'], "samba4.%s domain-creds" % name)
353 plansmbtorture4testsuite('base.xcopy', "s3member", ['//$NETBIOSNAME/xcopy_share', signoptions, '-U$DC_USERNAME%$DC_PASSWORD'], "samba4.%s domain-creds" % name)
354 plansmbtorture4testsuite('base.xcopy', "plugin_s4_dc", ['//$NETBIOSNAME/xcopy_share', signoptions, '-U$USERNAME%$PASSWORD'], "samba4.%s" % name)
355 plansmbtorture4testsuite('base.xcopy', "plugin_s4_dc",
356 ['//$NETBIOSNAME/xcopy_share', signoptions, '-U$DC_USERNAME%$DC_PASSWORD'], "samba4.%s administrator" % name)
358 plantestsuite("samba4.blackbox.bogusdomain", "s3member", ["testprogs/blackbox/bogus.sh", "$NETBIOSNAME", "xcopy_share", '$USERNAME', '$PASSWORD', '$DC_USERNAME', '$DC_PASSWORD', smbclient4])
359 for mech in [
360 "-k no",
361 "-k no --option=usespnego=no",
362 "-k no --option=gensec:spengo=no"]:
363 signoptions = "%s --signing=off" % mech
364 plansmbtorture4testsuite('base.xcopy', "s4member", ['//$NETBIOSNAME/xcopy_share', signoptions, '-U$NETBIOSNAME/$USERNAME%$PASSWORD'], modname="samba4.smb.signing on with %s local-creds" % signoptions)
366 plansmbtorture4testsuite('base.xcopy', "dc", ['//$NETBIOSNAME/xcopy_share', '-k', 'no', '--signing=yes', '-U%'], modname="samba4.smb.signing --signing=yes anon")
367 plansmbtorture4testsuite('base.xcopy', "dc", ['//$NETBIOSNAME/xcopy_share', '-k', 'no', '--signing=required', '-U%'], modname="samba4.smb.signing --signing=required anon")
368 plansmbtorture4testsuite('base.xcopy', "s4member", ['//$NETBIOSNAME/xcopy_share', '-k', 'no', '--signing=no', '-U%'], modname="samba4.smb.signing --signing=no anon")
371 wb_opts = ["--option=\"torture:strict mode=no\"", "--option=\"torture:timelimit=1\"", "--option=\"torture:winbindd_separator=/\"", "--option=\"torture:winbindd_netbios_name=$SERVER\"", "--option=\"torture:winbindd_netbios_domain=$DOMAIN\""]
373 winbind_ad_client_tests = smbtorture4_testsuites("winbind.struct") + smbtorture4_testsuites("winbind.pac")
374 winbind_wbclient_tests = smbtorture4_testsuites("winbind.wbclient")
375 for env in ["plugin_s4_dc", "s4member", "s3member"]:
376 for t in winbind_ad_client_tests:
377 plansmbtorture4testsuite(t, "%s:local" % env, wb_opts + ['//$SERVER/tmp', '--realm=$REALM', '--machine-pass', '--option=torture:addc=$DC_SERVER'])
379 for env in ["s3dc", "fl2003dc"]:
380 for t in winbind_wbclient_tests:
381 plansmbtorture4testsuite(t, "%s:local" % env, '//$SERVER/tmp -U$DC_USERNAME%$DC_PASSWORD')
383 for env in ["s3dc", "member", "plugin_s4_dc", "dc", "s3member", "s4member"]:
384 tests = ["--ping", "--separator",
385 "--own-domain",
386 "--all-domains",
387 "--trusted-domains",
388 "--domain-info=BUILTIN",
389 "--domain-info=$DOMAIN",
390 "--online-status",
391 "--online-status --domain=BUILTIN",
392 "--online-status --domain=$DOMAIN",
393 "--check-secret --domain=$DOMAIN",
394 "--change-secret --domain=$DOMAIN",
395 "--check-secret --domain=$DOMAIN",
396 "--online-status --domain=$DOMAIN",
397 "--domain-users",
398 "--domain-groups",
399 "--name-to-sid=$DC_USERNAME",
400 "--name-to-sid=$DOMAIN/$DC_USERNAME",
401 "--user-info=$DOMAIN/$DC_USERNAME",
402 "--user-groups=$DOMAIN/$DC_USERNAME",
403 "--authenticate=$DOMAIN/$DC_USERNAME%$DC_PASSWORD",
404 "--allocate-uid",
405 "--allocate-gid"]
407 for t in tests:
408 plantestsuite("samba.wbinfo_simple.(%s:local).%s" % (env, t), "%s:local" % env, [os.path.join(srcdir(), "nsswitch/tests/test_wbinfo_simple.sh"), t])
410 plantestsuite(
411 "samba.wbinfo_sids2xids.(%s:local)" % env, "%s:local" % env,
412 [os.path.join(samba3srcdir, "script/tests/test_wbinfo_sids2xids.sh")])
414 plantestsuite(
415 "samba.ntlm_auth.diagnostics(%s:local)" % env, "%s:local" % env,
416 [os.path.join(samba3srcdir, "script/tests/test_ntlm_auth_diagnostics.sh"), ntlm_auth3, '$DOMAIN', '$DC_USERNAME', '$DC_PASSWORD', configuration])
418 plantestsuite("samba.ntlm_auth.(%s:local)" % env, "%s:local" % env, [os.path.join(samba3srcdir, "script/tests/test_ntlm_auth_s3.sh"), valgrindify(python), samba3srcdir, ntlm_auth3, '$DOMAIN', '$DC_USERNAME', '$DC_PASSWORD', configuration])
421 nsstest4 = binpath("nsstest")
422 for env in ["plugin_s4_dc", "dc", "s4member", "s3dc", "s3member", "member"]:
423 if os.path.exists(nsstest4):
424 plantestsuite("samba.nss.test using winbind(%s)" % env, env, [os.path.join(bbdir, "nsstest.sh"), nsstest4, os.path.join(samba4bindir, "default/nsswitch/libnss-winbind.so")])
425 else:
426 skiptestsuite("samba.nss.test using winbind(%s)" % env, "nsstest not available")
428 subunitrun = valgrindify(python) + " " + os.path.join(samba4srcdir, "scripting/bin/subunitrun")
429 def planoldpythontestsuite(env, module, name=None, extra_path=[], environ={}, extra_args=[]):
430 environ = dict(environ)
431 py_path = list(extra_path)
432 if py_path:
433 environ["PYTHONPATH"] = ":".join(["$PYTHONPATH"] + py_path)
434 args = ["%s=%s" % item for item in environ.iteritems()]
435 args += [subunitrun, "$LISTOPT", module]
436 args += extra_args
437 if name is None:
438 name = module
439 plantestsuite(name, env, args)
441 planoldpythontestsuite("dc:local", "samba.tests.gensec", extra_args=['-U"$USERNAME%$PASSWORD"'])
442 planoldpythontestsuite("none", "simple", extra_path=["%s/lib/tdb/python/tests" % srcdir()], name="tdb.python")
443 planpythontestsuite("dc:local", "samba.tests.dcerpc.sam")
444 planpythontestsuite("dc:local", "samba.tests.dsdb")
445 planpythontestsuite("dc:local", "samba.tests.dcerpc.bare")
446 planpythontestsuite("dc:local", "samba.tests.dcerpc.unix")
447 planpythontestsuite("dc:local", "samba.tests.dcerpc.srvsvc")
448 planpythontestsuite("dc:local", "samba.tests.samba_tool.timecmd")
450 # We run this test against both AD DC implemetnations because it is
451 # the only test we have of GPO get/set behaviour, and this involves
452 # the file server as well as the LDAP server.
453 planpythontestsuite("dc:local", "samba.tests.samba_tool.gpo")
454 planpythontestsuite("plugin_s4_dc:local", "samba.tests.samba_tool.gpo")
456 planpythontestsuite("dc:local", "samba.tests.samba_tool.processes")
457 planpythontestsuite("dc:local", "samba.tests.samba_tool.user")
458 planpythontestsuite("dc:local", "samba.tests.samba_tool.group")
459 planpythontestsuite("plugin_s4_dc:local", "samba.tests.samba_tool.ntacl")
461 planpythontestsuite("dc:local", "samba.tests.dcerpc.rpcecho")
462 planoldpythontestsuite("dc:local", "samba.tests.dcerpc.registry", extra_args=['-U"$USERNAME%$PASSWORD"'])
463 planoldpythontestsuite("dc", "samba.tests.dcerpc.dnsserver", extra_args=['-U"$USERNAME%$PASSWORD"'])
464 planoldpythontestsuite("plugin_s4_dc", "samba.tests.dcerpc.dnsserver", extra_args=['-U"$USERNAME%$PASSWORD"'])
465 plantestsuite("samba4.ldap.python(dc)", "dc", [python, os.path.join(samba4srcdir, "dsdb/tests/python/ldap.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN'])
466 plantestsuite("samba4.tokengroups.python(dc)", "dc:local", [python, os.path.join(samba4srcdir, "dsdb/tests/python/token_group.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN'])
467 plantestsuite("samba4.sam.python(dc)", "dc", [python, os.path.join(samba4srcdir, "dsdb/tests/python/sam.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN'])
468 planoldpythontestsuite("dc", "dsdb_schema_info",
469 extra_path=[os.path.join(samba4srcdir, 'dsdb/tests/python')],
470 name="samba4.schemaInfo.python(dc)",
471 extra_args=['-U"$DOMAIN/$DC_USERNAME%$DC_PASSWORD"'])
472 plantestsuite("samba4.urgent_replication.python(dc)", "dc:local", [python, os.path.join(samba4srcdir, "dsdb/tests/python/urgent_replication.py"), '$PREFIX_ABS/dc/private/sam.ldb'], allow_empty_output=True)
473 plantestsuite("samba4.ldap.dirsync.python(dc)", "dc", [python, os.path.join(samba4srcdir, "dsdb/tests/python/dirsync.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN'])
474 plantestsuite("samba4.ldap.sites.python(dc)", "dc", [python, os.path.join(samba4srcdir, "dsdb/tests/python/sites.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN'])
475 for env in ["dc", "fl2000dc", "fl2003dc", "fl2008r2dc"]:
476 plantestsuite("samba4.ldap_schema.python(%s)" % env, env, [python, os.path.join(samba4srcdir, "dsdb/tests/python/ldap_schema.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN'])
477 plantestsuite("samba4.ldap.possibleInferiors.python(%s)" % env, env, [python, os.path.join(samba4srcdir, "dsdb/samdb/ldb_modules/tests/possibleinferiors.py"), "ldap://$SERVER", '-U"$USERNAME%$PASSWORD"', "-W$DOMAIN"])
478 plantestsuite("samba4.ldap.secdesc.python(%s)" % env, env, [python, os.path.join(samba4srcdir, "dsdb/tests/python/sec_descriptor.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN'])
479 plantestsuite("samba4.ldap.acl.python(%s)" % env, env, [python, os.path.join(samba4srcdir, "dsdb/tests/python/acl.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN'])
480 if env != "fl2000dc":
481 # This test makes excessive use of the "userPassword" attribute which
482 # isn't available on DCs with Windows 2000 domain function level -
483 # therefore skip it in that configuration
484 plantestsuite("samba4.ldap.passwords.python(%s)" % env, env, [python, os.path.join(samba4srcdir, "dsdb/tests/python/passwords.py"), "$SERVER", '-U"$USERNAME%$PASSWORD"', "-W$DOMAIN"])
485 plantestsuite("samba4.ldap.password_lockout.python(%s)" % env, env, [python, os.path.join(samba4srcdir, "dsdb/tests/python/password_lockout.py"), "$SERVER", '-U"$USERNAME%$PASSWORD"', "-W$DOMAIN", "--realm=$REALM"])
487 planpythontestsuite("dc:local", "samba.tests.upgradeprovisionneeddc")
488 planpythontestsuite("plugin_s4_dc:local", "samba.tests.posixacl")
489 plantestsuite("samba4.deletetest.python(dc)", "dc", ['PYTHONPATH="$PYTHONPATH:%s/lib/subunit/python:%s/lib/testtools"' % (srcdir(), srcdir()),
490 python, os.path.join(samba4srcdir, "dsdb/tests/python/deletetest.py"),
491 '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN'])
492 plantestsuite("samba4.blackbox.samba3dump", "none", [python, os.path.join(samba4srcdir, "scripting/bin/samba3dump"), os.path.join(samba4srcdir, "../testdata/samba3")], allow_empty_output=True)
493 plantestsuite("samba4.blackbox.upgrade", "none", ["PYTHON=%s" % python, os.path.join(samba4srcdir, "setup/tests/blackbox_s3upgrade.sh"), '$PREFIX/provision'])
494 plantestsuite("samba4.blackbox.provision.py", "none", ["PYTHON=%s" % python, os.path.join(samba4srcdir, "setup/tests/blackbox_provision.sh"), '$PREFIX/provision'])
495 plantestsuite("samba4.blackbox.upgradeprovision.current", "none", ["PYTHON=%s" % python, os.path.join(samba4srcdir, "setup/tests/blackbox_upgradeprovision.sh"), '$PREFIX/provision'])
496 plantestsuite("samba4.blackbox.setpassword.py", "none", ["PYTHON=%s" % python, os.path.join(samba4srcdir, "setup/tests/blackbox_setpassword.sh"), '$PREFIX/provision'])
497 plantestsuite("samba4.blackbox.newuser.py", "none", ["PYTHON=%s" % python, os.path.join(samba4srcdir, "setup/tests/blackbox_newuser.sh"), '$PREFIX/provision'])
498 plantestsuite("samba4.blackbox.group.py", "none", ["PYTHON=%s" % python, os.path.join(samba4srcdir, "setup/tests/blackbox_group.sh"), '$PREFIX/provision'])
499 plantestsuite("samba4.blackbox.spn.py(dc:local)", "dc:local", ["PYTHON=%s" % python, os.path.join(samba4srcdir, "setup/tests/blackbox_spn.sh"), '$PREFIX/dc'])
500 plantestsuite("samba4.ldap.bind(dc)", "dc", [python, os.path.join(srcdir(), "auth/credentials/tests/bind.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"'])
502 # This makes sure we test the rid allocation code
503 t = "rpc.samr.large-dc"
504 plansmbtorture4testsuite(t, "vampire_dc", ['$SERVER', '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], modname=("samba4.%s.one" % t))
505 plansmbtorture4testsuite(t, "vampire_dc", ['$SERVER', '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], modname="samba4.%s.two" % t)
507 # some RODC testing
508 for env in ['rodc']:
509 plansmbtorture4testsuite('rpc.echo', env, ['ncacn_np:$SERVER', "-k", "yes", '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], modname="samba4.rpc.echo")
510 plansmbtorture4testsuite('rpc.echo', "%s:local" % env, ['ncacn_np:$SERVER', "-k", "yes", '-P', '--workgroup=$DOMAIN'], modname="samba4.rpc.echo")
511 plantestsuite("samba4.blackbox.provision-backend", "none", ["PYTHON=%s" % python, os.path.join(samba4srcdir, "setup/tests/blackbox_provision-backend.sh"), '$PREFIX/provision'])
513 # Test renaming the DC
514 plantestsuite("samba4.blackbox.renamedc.sh", "none", ["PYTHON=%s" % python, os.path.join(bbdir, "renamedc.sh"), '$PREFIX/provision'])
516 # Demote the vampire DC, it must be the last test on the VAMPIRE DC
517 for env in ['vampire_dc', 'promoted_dc']:
519 # DRS python tests
520 planoldpythontestsuite(env, "samba.tests.blackbox.samba_tool_drs",
521 environ={'DC1': '$DC_SERVER', 'DC2': '$%s_SERVER' % env.upper()},
522 extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
523 planoldpythontestsuite("%s:local" % env, "replica_sync",
524 extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
525 name="samba4.drs.replica_sync.python(%s)" % env,
526 environ={'DC1': '$DC_SERVER', 'DC2': '$%s_SERVER' % env.upper()},
527 extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
528 planoldpythontestsuite(env, "delete_object",
529 extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
530 name="samba4.drs.delete_object.python(%s)" % env,
531 environ={'DC1': '$DC_SERVER', 'DC2': '$%s_SERVER' % env.upper()},
532 extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
533 planoldpythontestsuite(env, "fsmo",
534 name="samba4.drs.fsmo.python(%s)" % env,
535 extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
536 environ={'DC1': "$DC_SERVER", 'DC2': '$%s_SERVER' % env.upper()},
537 extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
538 planoldpythontestsuite(env, "repl_schema",
539 extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
540 name="samba4.drs.repl_schema.python(%s)" % env,
541 environ={'DC1': "$DC_SERVER", 'DC2': '$%s_SERVER' % env.upper()},
542 extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
544 plantestsuite("samba4.blackbox.samba_tool_demote(%s)" % env, env, [os.path.join(samba4srcdir, "utils/tests/test_demote.sh"), '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', '$DOMAIN', '$DC_SERVER', '$PREFIX/%s' % env, smbclient4])
546 for env in ["dc", "s4member", "rodc", "promoted_dc", "plugin_s4_dc", "s3member"]:
547 plantestsuite("samba.blackbox.wbinfo(%s:local)" % env, "%s:local" % env, [os.path.join(samba4srcdir, "../nsswitch/tests/test_wbinfo.sh"), '$DOMAIN', '$DC_USERNAME', '$DC_PASSWORD', env])
549 # TODO: Verifying the databases really should be a part of the
550 # environment teardown.
551 # check the databases are all OK. PLEASE LEAVE THIS AS THE LAST TEST
552 for env in ["dc", "fl2000dc", "fl2003dc", "fl2008r2dc", 'vampire_dc', 'promoted_dc']:
553 plantestsuite("samba4.blackbox.dbcheck(%s)" % env, env + ":local" , ["PYTHON=%s" % python, os.path.join(bbdir, "dbcheck.sh"), '$PREFIX/provision', configuration])