ee7841a492abb70d9cf4dd79a52b47801ca76c0d
[vlendec/samba-autobuild/.git] / source4 / selftest / tests.py
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.
4
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".
8
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.
15
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.
20
21 import os, sys
22 sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../../selftest"))
23 import selftesthelpers
24 from selftesthelpers import *
25
26 print >>sys.stderr, "OPTIONS %s" % " ".join(smbtorture4_options)
27
28 def plansmbtorture4testsuite(name, env, options, modname=None):
29     return selftesthelpers.plansmbtorture4testsuite(name, env, options,
30         target='samba4', modname=modname)
31
32 samba4srcdir = source4dir()
33 samba4bindir = bindir()
34 validate = os.getenv("VALIDATE", "")
35 if validate:
36     validate_list = [validate]
37 else:
38     validate_list = []
39
40 nmblookup4 = binpath('nmblookup4')
41 smbclient4 = binpath('smbclient4')
42
43 bbdir = os.path.join(srcdir(), "testprogs/blackbox")
44
45 # Simple tests for LDAP and CLDAP
46 for auth_type in ['', '-k no', '-k yes']:
47     for auth_level in ['--option=clientldapsaslwrapping=plain', '--sign', '--encrypt']:
48         creds = '-U"$USERNAME%$PASSWORD"'
49         options = creds + ' ' + auth_type + ' ' + auth_level
50         plantestsuite("samba4.ldb.ldap with options %r(ad_dc_ntvfs)" % options, "ad_dc_ntvfs", "%s/test_ldb.sh ldap $SERVER %s" % (bbdir, options))
51
52 # see if we support ADS on the Samba3 side
53 try:
54     config_h = os.environ["CONFIG_H"]
55 except KeyError:
56     config_h = os.path.join(samba4bindir, "default/include/config.h")
57
58 # check available features
59 config_hash = dict()
60 f = open(config_h, 'r')
61 try:
62     lines = f.readlines()
63     config_hash = dict((x[0], ' '.join(x[1:]))
64             for x in map(lambda line: line.strip().split(' ')[1:],
65                          filter(lambda line: (line[0:7] == '#define') and (len(line.split(' ')) > 2), lines)))
66 finally:
67     f.close()
68
69 have_tls_support = ("ENABLE_GNUTLS" in config_hash)
70 have_heimdal_support = ("SAMBA4_USES_HEIMDAL" in config_hash)
71 have_jansson_support = ("HAVE_JANSSON" in config_hash)
72
73 if have_tls_support:
74     for options in ['-U"$USERNAME%$PASSWORD"']:
75         plantestsuite("samba4.ldb.ldaps with options %s(ad_dc_ntvfs)" % options, "ad_dc_ntvfs",
76                 "%s/test_ldb.sh ldaps $SERVER_IP %s" % (bbdir, options))
77
78     creds_options = [
79         '--simple-bind-dn=$USERNAME@$REALM --password=$PASSWORD',
80     ]
81     peer_options = {
82         'SERVER_IP': '$SERVER_IP',
83         'SERVER_NAME': '$SERVER',
84         'SERVER.REALM': '$SERVER.$REALM',
85     }
86     tls_verify_options = [
87         '--option="tlsverifypeer=no_check"',
88         '--option="tlsverifypeer=ca_only"',
89         '--option="tlsverifypeer=ca_and_name_if_available"',
90         '--option="tlsverifypeer=ca_and_name"',
91         '--option="tlsverifypeer=as_strict_as_possible"',
92     ]
93
94     # we use :local for fl2008r2dc because of the self-signed certificate
95     for env in ["ad_dc_ntvfs", "fl2008r2dc:local"]:
96         for peer_key in peer_options.keys():
97             peer_val = peer_options[peer_key]
98             for creds in creds_options:
99                 for tls_verify in tls_verify_options:
100                     options = creds + ' ' + tls_verify
101                     plantestsuite("samba4.ldb.simple.ldaps with options %s %s(%s)" % (
102                                   peer_key, options, env), env,
103                                   "%s/test_ldb_simple.sh ldaps %s %s" % (bbdir, peer_val, options))
104
105 # test all "ldap server require strong auth" combinations
106 for env in ["ad_dc_ntvfs", "fl2008r2dc", "fl2003dc"]:
107     options = '--simple-bind-dn="$USERNAME@$REALM" --password="$PASSWORD"'
108     plantestsuite("samba4.ldb.simple.ldap with SIMPLE-BIND %s(%s)" % (options, env),
109                   env, "%s/test_ldb_simple.sh ldap $SERVER %s" % (bbdir, options))
110     if have_tls_support:
111         options += ' --option="tlsverifypeer=no_check"'
112         plantestsuite("samba4.ldb.simple.ldaps with SIMPLE-BIND %s(%s)" % (options, env),
113                       env, "%s/test_ldb_simple.sh ldaps $SERVER %s" % (bbdir, options))
114
115     auth_options = [
116         '--option=clientldapsaslwrapping=plain',
117         '--sign',
118         '--encrypt',
119         '-k yes --option=clientldapsaslwrapping=plain',
120         '-k yes --sign',
121         '-k yes --encrypt',
122         '-k no --option=clientldapsaslwrapping=plain',
123         '-k no --sign --option=ntlmssp_client:ldap_style_send_seal=no',
124         '-k no --sign',
125         '-k no --encrypt',
126     ]
127
128     for auth_option in auth_options:
129         options = '-U"$USERNAME%$PASSWORD"' + ' ' + auth_option
130         plantestsuite("samba4.ldb.simple.ldap with SASL-BIND %s(%s)" % (options, env),
131                       env, "%s/test_ldb_simple.sh ldap $SERVER %s" % (bbdir, options))
132     if have_tls_support:
133         options = '-U"$USERNAME%$PASSWORD" --option="tlsverifypeer=no_check"'
134         plantestsuite("samba4.ldb.simple.ldaps with SASL-BIND %s(%s)" % (options, env),
135                       env, "%s/test_ldb_simple.sh ldaps $SERVER %s" % (bbdir, options))
136
137 for options in ['-U"$USERNAME%$PASSWORD"']:
138     plantestsuite("samba4.ldb.ldapi with options %s(ad_dc_ntvfs:local)" % options, "ad_dc_ntvfs:local",
139             "%s/test_ldb.sh ldapi $PREFIX_ABS/ad_dc_ntvfs/private/ldapi %s" % (bbdir, options))
140
141 for t in smbtorture4_testsuites("ldap."):
142     plansmbtorture4testsuite(t, "ad_dc_ntvfs", '-U"$USERNAME%$PASSWORD" //$SERVER_IP/_none_')
143
144 ldbdir = os.path.join(srcdir(), "lib/ldb")
145 # Don't run LDB tests when using system ldb, as we won't have ldbtest installed
146 if os.path.exists(os.path.join(samba4bindir, "ldbtest")):
147     plantestsuite("ldb.base", "none", "%s/tests/test-tdb-subunit.sh %s" % (ldbdir, samba4bindir))
148 else:
149     skiptestsuite("ldb.base", "Using system LDB, ldbtest not available")
150
151 # Tests for RPC
152
153 # add tests to this list as they start passing, so we test
154 # that they stay passing
155 ncacn_np_tests = ["rpc.schannel", "rpc.join", "rpc.lsa", "rpc.dssetup", "rpc.altercontext", "rpc.netlogon", "rpc.netlogon.admin", "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"]
156 ncalrpc_tests = ["rpc.schannel", "rpc.join", "rpc.lsa", "rpc.dssetup", "rpc.altercontext", "rpc.netlogon", "rpc.netlogon.admin", "rpc.asyncbind", "rpc.lsalookup", "rpc.lsa-getuser", "rpc.schannel2", "rpc.authcontext"]
157 drs_rpc_tests = smbtorture4_testsuites("drs.rpc")
158 ncacn_ip_tcp_tests = ["rpc.schannel", "rpc.join", "rpc.lsa", "rpc.dssetup", "rpc.drsuapi", "rpc.drsuapi_w2k8", "rpc.netlogon", "rpc.netlogon.admin", "rpc.asyncbind", "rpc.lsalookup", "rpc.lsa-getuser", "rpc.schannel2", "rpc.authcontext", "rpc.samr.passwords.validate"] + drs_rpc_tests
159 slow_ncacn_np_tests = ["rpc.samlogon", "rpc.samr", "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"]
160 slow_ncacn_ip_tcp_tests = ["rpc.cracknames"]
161
162 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"]
163
164 # Make sure all tests get run
165 rpc_tests = smbtorture4_testsuites("rpc.")
166 auto_rpc_tests = filter(lambda t: t not in all_rpc_tests, rpc_tests)
167
168 for bindoptions in ["seal,padcheck"] + validate_list + ["bigendian"]:
169     for transport in ["ncalrpc", "ncacn_np", "ncacn_ip_tcp"]:
170         env = "ad_dc_ntvfs"
171         if transport == "ncalrpc":
172             tests = ncalrpc_tests
173             env = "ad_dc_ntvfs:local"
174         elif transport == "ncacn_np":
175             tests = ncacn_np_tests
176         elif transport == "ncacn_ip_tcp":
177             tests = ncacn_ip_tcp_tests
178         else:
179             raise AssertionError("invalid transport %r"% transport)
180         for t in tests:
181             plansmbtorture4testsuite(t, env, ["%s:$SERVER[%s]" % (transport, bindoptions), '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.%s on %s with %s" % (t, transport, bindoptions))
182         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))
183
184 #Plugin S4 DC tests (confirms named pipe auth forwarding).  This can be expanded once kerberos is supported in the plugin DC
185 #
186 for bindoptions in ["seal,padcheck"] + validate_list + ["bigendian"]:
187     for t in ncacn_np_tests:
188         env = "ad_dc"
189         transport = "ncacn_np"
190         plansmbtorture4testsuite(t, env, ["%s:$SERVER[%s]" % (transport, bindoptions), '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.%s with %s" % (t, bindoptions))
191
192 for bindoptions in [""] + validate_list + ["bigendian"]:
193     for t in auto_rpc_tests:
194         plansmbtorture4testsuite(t, "ad_dc_ntvfs", ["$SERVER[%s]" % bindoptions, '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.%s with %s" % (t, bindoptions))
195
196 t = "rpc.countcalls"
197 plansmbtorture4testsuite(t, "ad_dc_ntvfs:local", ["$SERVER[%s]" % bindoptions, '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], modname="samba4.%s" % t)
198
199 for transport in ["ncacn_np", "ncacn_ip_tcp"]:
200     env = "ad_dc_ntvfs"
201     if transport == "ncacn_np":
202         tests = slow_ncacn_np_tests
203     elif transport == "ncacn_ip_tcp":
204         tests = slow_ncacn_ip_tcp_tests
205     else:
206         raise AssertionError("Invalid transport %r" % transport)
207     for t in tests:
208         bindoptions = ''
209         if t == 'rpc.cracknames':
210             bindoptions = 'seal'
211         plansmbtorture4testsuite(t, env, ["%s:$SERVER[%s]" % (transport,bindoptions), '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.%s on %s with %s" % (t, transport, bindoptions))
212
213 # Tests for the DFS referral calls implementation
214 for t in smbtorture4_testsuites("dfs."):
215     plansmbtorture4testsuite(t, "ad_dc_ntvfs", '//$SERVER/ipc\$ -U$USERNAME%$PASSWORD')
216     plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/ipc\$ -U$USERNAME%$PASSWORD')
217
218 # Tests for the NET API (net.api.become.dc tested below against all the roles)
219 net_tests = filter(lambda x: "net.api.become.dc" not in x, smbtorture4_testsuites("net."))
220 for t in net_tests:
221     plansmbtorture4testsuite(t, "ad_dc_ntvfs", '$SERVER[%s] -U$USERNAME%%$PASSWORD -W$DOMAIN' % validate)
222
223 # Tests for session keys and encryption of RPC pipes
224 # FIXME: Integrate these into a single smbtorture test
225
226 transport = "ncacn_np"
227 for env in ["ad_dc_ntvfs", "nt4_dc"]:
228     for ntlmoptions in [
229         "-k no --option=clientusespnego=yes",
230         "-k no --option=clientusespnego=yes --option=ntlmssp_client:128bit=no",
231         "-k no --option=clientusespnego=yes --option=ntlmssp_client:56bit=yes",
232         "-k no --option=clientusespnego=yes --option=ntlmssp_client:56bit=no",
233         "-k no --option=clientusespnego=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=yes",
234         "-k no --option=clientusespnego=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=no",
235         "-k no --option=clientusespnego=yes --option=clientntlmv2auth=yes",
236         "-k no --option=clientusespnego=yes --option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no",
237         "-k no --option=clientusespnego=yes --option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=yes",
238         "-k no --option=clientusespnego=no --option=clientntlmv2auth=yes",
239         "-k no --option=gensec:spnego=no --option=clientntlmv2auth=yes",
240         "-k no --option=clientusespnego=no"]:
241         name = "rpc.lsa.secrets on %s with with %s" % (transport, ntlmoptions)
242         plansmbtorture4testsuite('rpc.lsa.secrets', env, ["%s:$SERVER[]" % (transport), ntlmoptions, '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN', '--option=gensec:target_hostname=$NETBIOSNAME'], "samba4.%s" % name)
243     plantestsuite("samba.blackbox.pdbtest(%s)" % env, "%s:local" % env, [os.path.join(bbdir, "test_pdbtest.sh"), '$SERVER', "$PREFIX", "pdbtest", smbclient4, '$SMB_CONF_PATH', configuration])
244
245 gpo = smbtorture4_testsuites("gpo.")
246 for t in gpo:
247     plansmbtorture4testsuite(t, 'ad_dc:local', ['//$SERVER/sysvol', '-U$USERNAME%$PASSWORD'])
248
249 transports = ["ncacn_np", "ncacn_ip_tcp"]
250
251 #Kerberos varies between functional levels, so it is important to check this on all of them
252 for env in ["ad_dc_ntvfs", "fl2000dc", "fl2003dc", "fl2008r2dc", "ad_dc"]:
253     transport = "ncacn_np"
254     plansmbtorture4testsuite('rpc.pac', env, ["%s:$SERVER[]" % (transport, ), '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.rpc.pac on %s" % (transport,))
255     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,))
256     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,))
257     plansmbtorture4testsuite('rpc.lsa.secrets', env, ["%s:$SERVER[target_principal=dcom/$NETBIOSNAME]" % (transport, ), '-k', 'yes', '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.rpc.lsa.secrets on %s with Kerberos - netbios name principal dcom" % (transport,))
258     plansmbtorture4testsuite('rpc.lsa.secrets', env, ["%s:$SERVER[target_principal=$NETBIOSNAME\$]" % (transport, ), '-k', 'yes', '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.rpc.lsa.secrets on %s with Kerberos - netbios name principal dollar" % (transport,))
259     plansmbtorture4testsuite('rpc.lsa.secrets', env, ["%s:$SERVER[target_principal=$NETBIOSNAME]" % (transport, ), '-k', 'yes', '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.rpc.lsa.secrets on %s with Kerberos - netbios name principal" % (transport,))
260     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)
261     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', '--option=gensec_krb5:send_authenticator_checksum=false'], "samba4.rpc.lsa.secrets on %s with Kerberos - use raw-krb5-no-authenticator-checksum style login" % transport)
262     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)
263
264     # Winreg tests test bulk Kerberos encryption of DCE/RPC
265     # We test rpc.winreg here too, because the winreg interface if
266     # handled by the source3/rpc_server code.
267     for bindoptions in ["connect", "packet", "krb5", "krb5,packet", "krb5,sign", "krb5,seal", "spnego", "spnego,packet", "spnego,sign", "spnego,seal"]:
268         plansmbtorture4testsuite('rpc.winreg', env, ["%s:$SERVER[%s]" % (transport, bindoptions), '-k', 'yes', '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.rpc.winreg on %s with %s" % (transport, bindoptions))
269
270     for transport in transports:
271         plansmbtorture4testsuite('rpc.echo', env, ["%s:$SERVER[]" % (transport,), '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.rpc.echo on %s" % (transport, ))
272
273         # Echo tests test bulk Kerberos encryption of DCE/RPC
274         for bindoptions in ["connect", "krb5", "krb5,sign", "krb5,seal", "spnego", "spnego,sign", "spnego,seal"] + validate_list + ["padcheck", "bigendian", "bigendian,seal"]:
275             echooptions = "--option=socket:testnonblock=True --option=torture:quick=yes -k yes"
276             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))
277     plansmbtorture4testsuite("net.api.become.dc", env, '$SERVER[%s] -U$USERNAME%%$PASSWORD -W$DOMAIN' % validate)
278
279 for bindoptions in ["sign", "seal"]:
280     plansmbtorture4testsuite('rpc.backupkey', "ad_dc_ntvfs", ["ncacn_np:$SERVER[%s]" % ( bindoptions), '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.rpc.backupkey with %s" % (bindoptions))
281
282 for transport in transports:
283     for bindoptions in ["sign", "seal"]:
284         for ntlmoptions in [
285         "--option=ntlmssp_client:ntlm2=yes --option=torture:quick=yes",
286         "--option=ntlmssp_client:ntlm2=no --option=torture:quick=yes",
287         "--option=ntlmssp_client:ntlm2=yes --option=ntlmssp_client:128bit=no --option=torture:quick=yes",
288         "--option=ntlmssp_client:ntlm2=no --option=ntlmssp_client:128bit=no --option=torture:quick=yes",
289         "--option=ntlmssp_client:ntlm2=yes --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes",
290         "--option=ntlmssp_client:ntlm2=no --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes",
291         "--option=clientntlmv2auth=yes --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes",
292         "--option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:keyexchange=yes --option=torture:quick=yes",
293         "--option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes"]:
294             if transport == "ncalrpc":
295                 env = "ad_dc_ntvfs:local"
296             else:
297                 env = "ad_dc_ntvfs"
298             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))
299
300 plansmbtorture4testsuite('rpc.echo', "ad_dc_ntvfs", ['ncacn_np:$SERVER[smb2]', '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.rpc.echo on ncacn_np over smb2")
301 for env in ["ad_dc", "nt4_dc"]:
302     plansmbtorture4testsuite('rpc.echo', env, ['60a15ec5-4de8-11d7-a637-005056a20182@ncacn_np:$SERVER[]', '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN', '--option=torture:quick=yes'], "samba4.rpc.echo on ncacn_np with object")
303     plansmbtorture4testsuite('rpc.echo', env, ['60a15ec5-4de8-11d7-a637-005056a20182@ncacn_ip_tcp:$SERVER[]', '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN', '--option=torture:quick=yes'], "samba4.rpc.echo on ncacn_ip_tcp with object")
304
305 plansmbtorture4testsuite('ntp.signd', "ad_dc_ntvfs:local", ['ncacn_np:$SERVER', '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.ntp.signd")
306
307 nbt_tests = smbtorture4_testsuites("nbt.")
308 for t in nbt_tests:
309     plansmbtorture4testsuite(t, "ad_dc_ntvfs", "//$SERVER/_none_ -U\"$USERNAME%$PASSWORD\"")
310
311 # Tests against the NTVFS POSIX backend
312 ntvfsargs = ["--option=torture:sharedelay=100000", "--option=torture:oplocktimeout=3", "--option=torture:writetimeupdatedelay=500000"]
313
314 # Filter smb2 tests that should not run against ad_dc_ntvfs
315 smb2_s3only = ["smb2.change_notify_disabled", "smb2.dosmode", "smb2.credits", "smb2.kernel-oplocks"]
316 smb2 = [x for x in smbtorture4_testsuites("smb2.") if x not in smb2_s3only]
317
318 #The QFILEINFO-IPC test needs to be on ipc$
319 raw = filter(lambda x: "raw.qfileinfo.ipc" not in x, smbtorture4_testsuites("raw."))
320 base = smbtorture4_testsuites("base.")
321
322 netapi = smbtorture4_testsuites("netapi.")
323
324 libsmbclient = smbtorture4_testsuites("libsmbclient.")
325
326 for t in base + raw + smb2 + netapi + libsmbclient:
327     plansmbtorture4testsuite(t, "ad_dc_ntvfs", ['//$SERVER/tmp', '-U$USERNAME%$PASSWORD'] + ntvfsargs)
328
329 plansmbtorture4testsuite("raw.qfileinfo.ipc", "ad_dc_ntvfs", '//$SERVER/ipc\$ -U$USERNAME%$PASSWORD')
330
331 for t in smbtorture4_testsuites("rap."):
332     plansmbtorture4testsuite(t, "ad_dc_ntvfs", '//$SERVER/IPC\$ -U$USERNAME%$PASSWORD')
333
334 # Tests against the NTVFS CIFS backend
335 for t in base + raw:
336     plansmbtorture4testsuite(t, "ad_dc_ntvfs", ['//$NETBIOSNAME/cifs', '-U$USERNAME%$PASSWORD', '--kerberos=yes'] + ntvfsargs, modname="samba4.ntvfs.cifs.krb5.%s" % t)
337
338 # Test NTVFS CIFS backend with S4U2Self and S4U2Proxy
339 t = "base.unlink"
340 plansmbtorture4testsuite(t, "ad_dc_ntvfs", ['//$NETBIOSNAME/cifs', '-U$USERNAME%$PASSWORD', '--kerberos=no'] + ntvfsargs, "samba4.ntvfs.cifs.ntlm.%s" % t)
341 plansmbtorture4testsuite(t, "rpc_proxy", ['//$NETBIOSNAME/cifs_to_dc', '-U$DC_USERNAME%$DC_PASSWORD', '--kerberos=yes'] + ntvfsargs, "samba4.ntvfs.cifs.krb5.%s" % t)
342 plansmbtorture4testsuite(t, "rpc_proxy", ['//$NETBIOSNAME/cifs_to_dc', '-U$DC_USERNAME%$DC_PASSWORD', '--kerberos=no'] + ntvfsargs, "samba4.ntvfs.cifs.ntlm.%s" % t)
343
344 plansmbtorture4testsuite('echo.udp', 'ad_dc_ntvfs:local', '//$SERVER/whatever')
345
346 # Local tests
347 for t in smbtorture4_testsuites("local."):
348     #The local.resolve test needs a name to look up using real system (not emulated) name routines
349     plansmbtorture4testsuite(t, "none", "ncalrpc:localhost")
350
351 # Confirm these tests with the system iconv too
352 for t in ["local.convert_string_handle", "local.convert_string", "local.ndr"]:
353     options = "ncalrpc: --option='iconv:use_builtin_handlers=false'"
354     plansmbtorture4testsuite(t, "none", options,
355         modname="samba4.%s.system.iconv" % t)
356
357 tdbtorture4 = binpath("tdbtorture")
358 if os.path.exists(tdbtorture4):
359     plantestsuite("tdb.stress", "none", valgrindify(tdbtorture4))
360 else:
361     skiptestsuite("tdb.stress", "Using system TDB, tdbtorture not available")
362
363 plansmbtorture4testsuite("drs.unit", "none", "ncalrpc:")
364
365 # Pidl tests
366 for f in sorted(os.listdir(os.path.join(samba4srcdir, "../pidl/tests"))):
367     if f.endswith(".pl"):
368         planperltestsuite("pidl.%s" % f[:-3], os.path.normpath(os.path.join(samba4srcdir, "../pidl/tests", f)))
369
370 # DNS tests
371 plantestsuite_loadlist("samba.tests.dns", "fl2003dc:local", [python, os.path.join(srcdir(), "python/samba/tests/dns.py"), '$SERVER', '$SERVER_IP', '--machine-pass', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
372 plantestsuite_loadlist("samba.tests.dns", "rodc:local", [python, os.path.join(srcdir(), "python/samba/tests/dns.py"), '$SERVER', '$SERVER_IP', '--machine-pass', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
373 plantestsuite_loadlist("samba.tests.dns", "vampire_dc:local", [python, os.path.join(srcdir(), "python/samba/tests/dns.py"), '$SERVER', '$SERVER_IP', '--machine-pass', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
374
375 plantestsuite_loadlist("samba.tests.dns_forwarder", "fl2003dc:local", [python, os.path.join(srcdir(), "python/samba/tests/dns_forwarder.py"), '$SERVER', '$SERVER_IP', '$DNS_FORWARDER1', '$DNS_FORWARDER2', '--machine-pass', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
376
377 plantestsuite_loadlist("samba.tests.dns_tkey", "fl2008r2dc", [python, os.path.join(srcdir(), "python/samba/tests/dns_tkey.py"), '$SERVER', '$SERVER_IP', '--machine-pass', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
378 plantestsuite_loadlist("samba.tests.dns_wildcard", "ad_dc", [python, os.path.join(srcdir(), "python/samba/tests/dns_wildcard.py"), '$SERVER', '$SERVER_IP', '--machine-pass', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
379
380 plantestsuite_loadlist("samba.tests.dns_invalid", "ad_dc", [python, os.path.join(srcdir(), "python/samba/tests/dns_invalid.py"), '$SERVER_IP', '--machine-pass', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
381
382 for t in smbtorture4_testsuites("dns_internal."):
383     plansmbtorture4testsuite(t, "ad_dc_ntvfs:local", '//$SERVER/whavever')
384
385 # Local tests
386 for t in smbtorture4_testsuites("dlz_bind9."):
387     #The dlz_bind9 tests needs to look at the DNS database
388     plansmbtorture4testsuite(t, "chgdcpass:local", ["ncalrpc:$SERVER", '-U$USERNAME%$PASSWORD'])
389
390 planpythontestsuite("nt4_dc", "samba.tests.libsmb_samba_internal");
391
392 # Blackbox Tests:
393 # tests that interact directly with the command-line tools rather than using
394 # the API. These mainly test that the various command-line options of commands
395 # work correctly.
396
397 for env in ["ad_member", "s4member", "ad_dc_ntvfs", "chgdcpass"]:
398     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])
399
400 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])
401 plantestsuite("samba4.blackbox.net_rpc_user(ad_dc)", "ad_dc", [os.path.join(bbdir, "test_net_rpc_user.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$DOMAIN'])
402
403 if have_heimdal_support:
404     for env in ["ad_dc_ntvfs", "ad_dc"]:
405         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])
406         plantestsuite("samba4.blackbox.pkinit_pac(%s:local)" % env, "%s:local" % env, [os.path.join(bbdir, "test_pkinit_pac_heimdal.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', '$PREFIX/%s' % env, "aes256-cts-hmac-sha1-96", configuration])
407     plantestsuite("samba4.blackbox.kinit(ad_dc_ntvfs:local)", "ad_dc_ntvfs:local", [os.path.join(bbdir, "test_kinit_heimdal.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', '$PREFIX', "aes256-cts-hmac-sha1-96", smbclient4, configuration])
408     plantestsuite("samba4.blackbox.kinit(fl2000dc:local)", "fl2000dc:local", [os.path.join(bbdir, "test_kinit_heimdal.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', '$PREFIX', "arcfour-hmac-md5", smbclient4, configuration])
409     plantestsuite("samba4.blackbox.kinit(fl2008r2dc:local)", "fl2008r2dc:local", [os.path.join(bbdir, "test_kinit_heimdal.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', '$PREFIX', "aes256-cts-hmac-sha1-96", smbclient4, configuration])
410     plantestsuite("samba4.blackbox.kinit_trust(fl2008r2dc:local)", "fl2008r2dc:local", [os.path.join(bbdir, "test_kinit_trusts_heimdal.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', '$TRUST_SERVER', '$TRUST_USERNAME', '$TRUST_PASSWORD', '$TRUST_REALM', '$TRUST_DOMAIN', '$PREFIX', "forest", "aes256-cts-hmac-sha1-96"])
411     plantestsuite("samba4.blackbox.kinit_trust(fl2003dc:local)", "fl2003dc:local", [os.path.join(bbdir, "test_kinit_trusts_heimdal.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', '$TRUST_SERVER', '$TRUST_USERNAME', '$TRUST_PASSWORD', '$TRUST_REALM', '$TRUST_DOMAIN', '$PREFIX', "external", "arcfour-hmac-md5"])
412     plantestsuite("samba4.blackbox.export.keytab(ad_dc_ntvfs:local)", "ad_dc_ntvfs:local", [os.path.join(bbdir, "test_export_keytab_heimdal.sh"), '$SERVER', '$USERNAME', '$REALM', '$DOMAIN', "$PREFIX", smbclient4])
413     plantestsuite("samba4.blackbox.kpasswd(ad_dc_ntvfs:local)", "ad_dc_ntvfs:local", [os.path.join(bbdir, "test_kpasswd_heimdal.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', "$PREFIX/ad_dc_ntvfs"])
414 else:
415     plantestsuite("samba4.blackbox.kinit(ad_dc_ntvfs:local)", "ad_dc_ntvfs:local", [os.path.join(bbdir, "test_kinit_mit.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', '$PREFIX', smbclient4, configuration])
416     plantestsuite("samba4.blackbox.kinit(fl2000dc:local)", "fl2000dc:local", [os.path.join(bbdir, "test_kinit_mit.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', '$PREFIX', smbclient4, configuration])
417     plantestsuite("samba4.blackbox.kinit(fl2008r2dc:local)", "fl2008r2dc:local", [os.path.join(bbdir, "test_kinit_mit.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', '$PREFIX', smbclient4, configuration])
418     plantestsuite("samba4.blackbox.kinit_trust(fl2008r2dc:local)", "fl2008r2dc:local", [os.path.join(bbdir, "test_kinit_trusts_mit.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', '$TRUST_SERVER', '$TRUST_USERNAME', '$TRUST_PASSWORD', '$TRUST_REALM', '$TRUST_DOMAIN', '$PREFIX', "forest"])
419     plantestsuite("samba4.blackbox.kinit_trust(fl2003dc:local)", "fl2003dc:local", [os.path.join(bbdir, "test_kinit_trusts_mit.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', '$TRUST_SERVER', '$TRUST_USERNAME', '$TRUST_PASSWORD', '$TRUST_REALM', '$TRUST_DOMAIN', '$PREFIX', "external"])
420     plantestsuite("samba4.blackbox.export.keytab(ad_dc_ntvfs:local)", "ad_dc_ntvfs:local", [os.path.join(bbdir, "test_export_keytab_mit.sh"), '$SERVER', '$USERNAME', '$REALM', '$DOMAIN', "$PREFIX", smbclient4])
421     plantestsuite("samba4.blackbox.kpasswd(ad_dc_ntvfs:local)", "ad_dc_ntvfs:local", [os.path.join(bbdir, "test_kpasswd_mit.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', "$PREFIX/ad_dc_ntvfs"])
422
423 plantestsuite("samba4.blackbox.trust_ntlm", "fl2008r2dc:local", [os.path.join(bbdir, "test_trust_ntlm.sh"), '$SERVER_IP', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', '$TRUST_USERNAME', '$TRUST_PASSWORD', '$TRUST_REALM', '$TRUST_DOMAIN', 'forest', 'auto', 'NT_STATUS_LOGON_FAILURE'])
424 plantestsuite("samba4.blackbox.trust_ntlm", "fl2003dc:local", [os.path.join(bbdir, "test_trust_ntlm.sh"), '$SERVER_IP', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', '$TRUST_USERNAME', '$TRUST_PASSWORD', '$TRUST_REALM', '$TRUST_DOMAIN', 'external', 'auto', 'NT_STATUS_LOGON_FAILURE'])
425 plantestsuite("samba4.blackbox.trust_ntlm", "ad_member:local", [os.path.join(bbdir, "test_trust_ntlm.sh"), '$SERVER_IP', '$USERNAME', '$PASSWORD', '$SERVER', '$SERVER', '$DC_USERNAME', '$DC_PASSWORD', '$REALM', '$DOMAIN', 'member', 'auto', 'NT_STATUS_LOGON_FAILURE'])
426 plantestsuite("samba4.blackbox.trust_ntlm", "nt4_member:local", [os.path.join(bbdir, "test_trust_ntlm.sh"), '$SERVER_IP', '$USERNAME', '$PASSWORD', '$SERVER', '$SERVER', '$DC_USERNAME', '$DC_PASSWORD', '$DOMAIN', '$DOMAIN', 'member', 'auto', 'NT_STATUS_LOGON_FAILURE'])
427
428 plantestsuite("samba4.blackbox.trust_utils(fl2008r2dc:local)", "fl2008r2dc:local", [os.path.join(bbdir, "test_trust_utils.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', '$TRUST_SERVER', '$TRUST_USERNAME', '$TRUST_PASSWORD', '$TRUST_REALM', '$TRUST_DOMAIN', '$PREFIX', "forest"])
429 plantestsuite("samba4.blackbox.trust_utils(fl2003dc:local)", "fl2003dc:local", [os.path.join(bbdir, "test_trust_utils.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', '$TRUST_SERVER', '$TRUST_USERNAME', '$TRUST_PASSWORD', '$TRUST_REALM', '$TRUST_DOMAIN', '$PREFIX', "external"])
430 plantestsuite("samba4.blackbox.ktpass(ad_dc_ntvfs)", "ad_dc_ntvfs", [os.path.join(bbdir, "test_ktpass.sh"), '$PREFIX/ad_dc_ntvfs'])
431 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"])
432 plantestsuite("samba4.blackbox.cifsdd(ad_dc_ntvfs)", "ad_dc_ntvfs", [os.path.join(samba4srcdir, "client/tests/test_cifsdd.sh"), '$SERVER', '$USERNAME', '$PASSWORD', "$DOMAIN"])
433 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])
434 plantestsuite("samba4.blackbox.locktest(ad_dc_ntvfs)", "ad_dc_ntvfs", [os.path.join(samba4srcdir, "torture/tests/test_locktest.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$DOMAIN', '$PREFIX'])
435 plantestsuite("samba4.blackbox.masktest", "ad_dc_ntvfs", [os.path.join(samba4srcdir, "torture/tests/test_masktest.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$DOMAIN', '$PREFIX'])
436 plantestsuite("samba4.blackbox.gentest(ad_dc_ntvfs)", "ad_dc_ntvfs", [os.path.join(samba4srcdir, "torture/tests/test_gentest.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$DOMAIN', "$PREFIX"])
437 plantestsuite("samba4.blackbox.rfc2307_mapping(ad_dc_ntvfs:local)", "ad_dc_ntvfs:local", [os.path.join(samba4srcdir, "../nsswitch/tests/test_rfc2307_mapping.sh"), '$DOMAIN', '$USERNAME', '$PASSWORD', "$SERVER", "$UID_RFC2307TEST", "$GID_RFC2307TEST", configuration])
438 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])
439 plantestsuite("samba4.blackbox.samba_upgradedns(chgdcpass:local)", "chgdcpass:local", [os.path.join(bbdir, "test_samba_upgradedns.sh"), '$SERVER', '$REALM', '$PREFIX', '$SELFTEST_PREFIX/chgdcpass'])
440 plantestsuite("samba4.blackbox.net_ads(ad_dc:client)", "ad_dc:client", [os.path.join(bbdir, "test_net_ads.sh"), '$DC_SERVER', '$DC_USERNAME', '$DC_PASSWORD', '$PREFIX_ABS'])
441 plantestsuite("samba4.blackbox.client_etypes_all(ad_dc:client)", "ad_dc:client", [os.path.join(bbdir, "test_client_etypes.sh"), '$DC_SERVER', '$DC_USERNAME', '$DC_PASSWORD', '$PREFIX_ABS', 'all', '17_18_23'])
442 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'])
443 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'])
444 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'])
445 plantestsuite_loadlist("samba4.rpc.echo against NetBIOS alias", "ad_dc_ntvfs", [valgrindify(smbtorture4), "$LISTOPT", "$LOADLIST", 'ncacn_np:$NETBIOSALIAS', '-U$DOMAIN/$USERNAME%$PASSWORD', 'rpc.echo'])
446
447 # Tests using the "Simple" NTVFS backend
448 for t in ["base.rw1"]:
449     plansmbtorture4testsuite(t, "ad_dc_ntvfs", ["//$SERVER/simple", '-U$USERNAME%$PASSWORD'], modname="samba4.ntvfs.simple.%s" % t)
450
451 # Domain S4member Tests
452 plansmbtorture4testsuite('rpc.echo', "s4member", ['ncacn_np:$NETBIOSNAME', '-U$NETBIOSNAME/$USERNAME%$PASSWORD'], "samba4.rpc.echo against s4member server with local creds")
453 plansmbtorture4testsuite('rpc.echo', "s4member", ['ncacn_np:$NETBIOSNAME', '-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'], "samba4.rpc.echo against s4member server with domain creds")
454 plansmbtorture4testsuite('rpc.samr', "s4member", ['ncacn_np:$NETBIOSNAME', '-U$NETBIOSNAME/$USERNAME%$PASSWORD'], "samba4.rpc.samr against s4member server with local creds")
455 plansmbtorture4testsuite('rpc.samr.users', "s4member", ['ncacn_np:$NETBIOSNAME', '-U$NETBIOSNAME/$USERNAME%$PASSWORD'], "samba4.rpc.samr.users against s4member server with local creds",)
456 plansmbtorture4testsuite('rpc.samr.passwords', "s4member", ['ncacn_np:$NETBIOSNAME', '-U$NETBIOSNAME/$USERNAME%$PASSWORD'], "samba4.rpc.samr.passwords against s4member server with local creds")
457 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])
458
459 # RPC Proxy
460 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")
461
462 # Tests SMB signing
463 for mech in [
464     "-k no",
465     "-k no --option=clientusespnego=no",
466     "-k no --option=gensec:spengo=no",
467     "-k yes",
468     "-k yes --option=gensec:fake_gssapi_krb5=yes --option=gensec:gssapi_krb5=no"]:
469     for signing in ["--signing=on", "--signing=required"]:
470         signoptions = "%s %s" % (mech, signing)
471         name = "smb.signing on with %s" % signoptions
472         plansmbtorture4testsuite('base.xcopy', "ad_dc_ntvfs", ['//$NETBIOSNAME/xcopy_share', signoptions, '-U$USERNAME%$PASSWORD'], modname="samba4.%s" % name)
473
474 for mech in [
475     "-k no",
476     "-k no --option=clientusespnego=no",
477     "-k no --option=gensec:spengo=no",
478     "-k yes"]:
479     signoptions = "%s --signing=off" % mech
480     name = "smb.signing disabled on with %s" % signoptions
481     plansmbtorture4testsuite('base.xcopy', "s4member", ['//$NETBIOSNAME/xcopy_share', signoptions, '-U$DC_USERNAME%$DC_PASSWORD'], "samba4.%s domain-creds" % name)
482     plansmbtorture4testsuite('base.xcopy', "ad_member", ['//$NETBIOSNAME/xcopy_share', signoptions, '-U$DC_USERNAME%$DC_PASSWORD'], "samba4.%s domain-creds" % name)
483     plansmbtorture4testsuite('base.xcopy', "ad_dc", ['//$NETBIOSNAME/xcopy_share', signoptions, '-U$USERNAME%$PASSWORD'], "samba4.%s" % name)
484     plansmbtorture4testsuite('base.xcopy', "ad_dc",
485                             ['//$NETBIOSNAME/xcopy_share', signoptions, '-U$DC_USERNAME%$DC_PASSWORD'], "samba4.%s administrator" % name)
486
487 plantestsuite("samba4.blackbox.bogusdomain", "ad_member", ["testprogs/blackbox/bogus.sh", "$NETBIOSNAME", "xcopy_share", '$USERNAME', '$PASSWORD', '$DC_USERNAME', '$DC_PASSWORD', smbclient4])
488 for mech in [
489     "-k no",
490     "-k no --option=clientusespnego=no",
491     "-k no --option=gensec:spengo=no"]:
492     signoptions = "%s --signing=off" % mech
493     plansmbtorture4testsuite('base.xcopy', "s4member", ['//$NETBIOSNAME/xcopy_share', signoptions, '-U$NETBIOSNAME/$USERNAME%$PASSWORD'], modname="samba4.smb.signing on with %s local-creds" % signoptions)
494
495 plansmbtorture4testsuite('base.xcopy', "ad_dc_ntvfs", ['//$NETBIOSNAME/xcopy_share', '-k', 'no', '--signing=yes', '-U%'], modname="samba4.smb.signing --signing=yes anon")
496 plansmbtorture4testsuite('base.xcopy', "ad_dc_ntvfs", ['//$NETBIOSNAME/xcopy_share', '-k', 'no', '--signing=required', '-U%'], modname="samba4.smb.signing --signing=required anon")
497 plansmbtorture4testsuite('base.xcopy', "s4member", ['//$NETBIOSNAME/xcopy_share', '-k', 'no', '--signing=no', '-U%'], modname="samba4.smb.signing --signing=no anon")
498
499
500 wb_opts_default = ["--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\""]
501
502 winbind_ad_client_tests = smbtorture4_testsuites("winbind.struct") + smbtorture4_testsuites("winbind.pac")
503 winbind_wbclient_tests = smbtorture4_testsuites("winbind.wbclient")
504 for env in ["ad_dc", "s4member", "ad_member", "nt4_member"]:
505     wb_opts = wb_opts_default[:]
506     if env in ["ad_member"]:
507         wb_opts += ["--option=\"torture:winbindd_domain_without_prefix=$DOMAIN\""]
508     for t in winbind_ad_client_tests:
509         plansmbtorture4testsuite(t, "%s:local" % env, wb_opts + ['//$SERVER/tmp', '--realm=$REALM', '--machine-pass', '--option=torture:addc=$DC_SERVER'])
510
511 for env in ["nt4_dc", "fl2003dc"]:
512     for t in winbind_wbclient_tests:
513         plansmbtorture4testsuite(t, "%s:local" % env, '//$SERVER/tmp -U$DC_USERNAME%$DC_PASSWORD')
514
515 for env in ["nt4_dc", "nt4_member", "ad_dc", "ad_member", "s4member", "chgdcpass", "rodc"]:
516     tests = ["--ping", "--separator",
517              "--own-domain",
518              "--all-domains",
519              "--trusted-domains",
520              "--domain-info=BUILTIN",
521              "--domain-info=$DOMAIN",
522              "--online-status",
523              "--online-status --domain=BUILTIN",
524              "--online-status --domain=$DOMAIN",
525              "--check-secret --domain=$DOMAIN",
526              "--change-secret --domain=$DOMAIN",
527              "--check-secret --domain=$DOMAIN",
528              "--online-status --domain=$DOMAIN",
529              "--domain-users",
530              "--domain-groups",
531              "--name-to-sid=$DC_USERNAME",
532              "--name-to-sid=$DOMAIN/$DC_USERNAME",
533              "--user-info=$DOMAIN/$DC_USERNAME",
534              "--user-groups=$DOMAIN/$DC_USERNAME",
535              "--authenticate=$DOMAIN/$DC_USERNAME%$DC_PASSWORD",
536              "--allocate-uid",
537              "--allocate-gid"]
538
539     for t in tests:
540         plantestsuite("samba.wbinfo_simple.(%s:local).%s" % (env, t), "%s:local" % env, [os.path.join(srcdir(), "nsswitch/tests/test_wbinfo_simple.sh"), t])
541
542     plantestsuite(
543         "samba.wbinfo_sids2xids.(%s:local)" % env, "%s:local" % env,
544         [os.path.join(samba3srcdir, "script/tests/test_wbinfo_sids2xids.sh")])
545
546     plantestsuite(
547         "samba.ntlm_auth.diagnostics(%s:local)" % env, "%s:local" % env,
548         [os.path.join(samba3srcdir, "script/tests/test_ntlm_auth_diagnostics.sh"), ntlm_auth3, '$DOMAIN', '$DC_USERNAME', '$DC_PASSWORD', configuration])
549
550     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])
551
552 for env in ["s4member_dflt_domain", "s4member"]:
553     for cmd in ["id", "getent"]:
554         users = ["$DC_USERNAME", "$DC_USERNAME@$REALM"]
555         if env == "s4member":
556             users = ["$DOMAIN/$DC_USERNAME", "$DC_USERNAME@$REALM"]
557         for usr in users:
558             plantestsuite("samba4.winbind.dom_name_parse.cmd", env, "%s/dom_parse.sh %s %s" % (bbdir,cmd,usr))
559
560 nsstest4 = binpath("nsstest")
561 for env in ["ad_dc:local", "s4member:local", "nt4_dc:local", "ad_member:local", "nt4_member:local"]:
562     if os.path.exists(nsstest4):
563         plantestsuite("samba.nss.test using winbind(%s)" % env, env, [os.path.join(bbdir, "nsstest.sh"), nsstest4, os.path.join(samba4bindir, "shared/libnss_wrapper_winbind.so.2")])
564     else:
565         skiptestsuite("samba.nss.test using winbind(%s)" % env, "nsstest not available")
566
567 subunitrun = valgrindify(python) + " " + os.path.join(samba4srcdir, "scripting/bin/subunitrun")
568 if extra_python is not None:
569     subunitrun3 = valgrindify(extra_python) + " " + os.path.join(samba4srcdir, "scripting/bin/subunitrun")
570 def planoldpythontestsuite(env, module, name=None, extra_path=[], environ={}, extra_args=[], py3_compatible=False):
571     environ = dict(environ)
572     py_path = list(extra_path)
573     if py_path:
574         environ["PYTHONPATH"] = ":".join(["$PYTHONPATH"] + py_path)
575     args = ["%s=%s" % item for item in environ.iteritems()]
576     args += [subunitrun, "$LISTOPT", "$LOADLIST", module]
577     args += extra_args
578     if name is None:
579         name = module
580     plantestsuite_loadlist(name, env, args)
581     if py3_compatible and extra_python is not None:
582         args[0] = subunitrun3
583         plantestsuite_loadlist(name, env, args)
584
585
586 planoldpythontestsuite("ad_dc_ntvfs:local", "samba.tests.gensec", extra_args=['-U"$USERNAME%$PASSWORD"'], py3_compatible=True)
587 planoldpythontestsuite("none", "simple", extra_path=["%s/lib/tdb/python/tests" % srcdir()], name="tdb.python")
588 planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.dcerpc.sam")
589 planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.dsdb")
590 planpythontestsuite("none", "samba.tests.dsdb_lock")
591 planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.dcerpc.bare")
592 planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.dcerpc.unix")
593 planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.dcerpc.srvsvc")
594 planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.timecmd")
595 planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.join")
596
597 planpythontestsuite("none", "samba.tests.samba_tool.visualize")
598
599
600 # test fsmo show
601 for env in ["ad_dc_ntvfs", "fl2000dc", "fl2003dc", "fl2008r2dc"]:
602     planpythontestsuite(env + ":local", "samba.tests.samba_tool.fsmo")
603
604 # test user.edit
605 for env in ["ad_dc:local", "ad_dc_ntvfs:local", "fl2000dc:local", "fl2003dc:local", "fl2008r2dc:local"]:
606     plantestsuite("samba.tests.samba_tool.edit", env, [os.path.join(srcdir(), "python/samba/tests/samba_tool/edit.sh"), '$SERVER', '$USERNAME', '$PASSWORD'])
607
608 # We run this test against both AD DC implemetnations because it is
609 # the only test we have of GPO get/set behaviour, and this involves
610 # the file server as well as the LDAP server.
611 planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.gpo")
612 planpythontestsuite("ad_dc:local", "samba.tests.samba_tool.gpo")
613
614 planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.processes")
615 planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.user")
616 planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.user_wdigest")
617 planpythontestsuite("ad_dc:local", "samba.tests.samba_tool.user")
618 planpythontestsuite("ad_dc:local", "samba.tests.samba_tool.user_virtualCryptSHA")
619 planpythontestsuite("chgdcpass:local", "samba.tests.samba_tool.user_check_password_script")
620 planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.group")
621 planpythontestsuite("ad_dc:local", "samba.tests.samba_tool.ntacl")
622 planpythontestsuite("none", "samba.tests.samba_tool.provision_password_check")
623 planpythontestsuite("none", "samba.tests.samba_tool.help")
624
625 planpythontestsuite("ad_dc:local", "samba.tests.samba_tool.sites")
626 planpythontestsuite("ad_dc:local", "samba.tests.samba_tool.dnscmd")
627
628 planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.dcerpc.rpcecho")
629 planoldpythontestsuite("ad_dc_ntvfs:local", "samba.tests.dcerpc.registry", extra_args=['-U"$USERNAME%$PASSWORD"'])
630 planoldpythontestsuite("ad_dc_ntvfs", "samba.tests.dcerpc.dnsserver", extra_args=['-U"$USERNAME%$PASSWORD"'])
631 planoldpythontestsuite("ad_dc", "samba.tests.dcerpc.dnsserver", extra_args=['-U"$USERNAME%$PASSWORD"'])
632 planoldpythontestsuite("ad_dc", "samba.tests.dcerpc.raw_protocol", extra_args=['-U"$USERNAME%$PASSWORD"'])
633 if have_jansson_support and have_heimdal_support:
634     planoldpythontestsuite("ad_dc:local", "samba.tests.auth_log", extra_args=['-U"$USERNAME%$PASSWORD"'],
635                            environ={'CLIENT_IP': '127.0.0.11',
636                                     'SOCKET_WRAPPER_DEFAULT_IFACE': 11})
637     planoldpythontestsuite("ad_dc_ntvfs:local", "samba.tests.auth_log", extra_args=['-U"$USERNAME%$PASSWORD"'],
638                            environ={'CLIENT_IP': '127.0.0.11',
639                                     'SOCKET_WRAPPER_DEFAULT_IFACE': 11})
640     planoldpythontestsuite("ad_dc:local", "samba.tests.auth_log_pass_change", extra_args=['-U"$USERNAME%$PASSWORD"'],
641                            environ={'CLIENT_IP': '127.0.0.11',
642                                     'SOCKET_WRAPPER_DEFAULT_IFACE': 11})
643     planoldpythontestsuite("ad_dc_ntvfs:local", "samba.tests.auth_log_pass_change", extra_args=['-U"$USERNAME%$PASSWORD"'],
644                            environ={'CLIENT_IP': '127.0.0.11',
645                                     'SOCKET_WRAPPER_DEFAULT_IFACE': 11})
646     planoldpythontestsuite("ad_dc_ntvfs:local", "samba.tests.auth_log_ncalrpc", extra_args=['-U"$USERNAME%$PASSWORD"'])
647     planoldpythontestsuite("ad_dc:local", "samba.tests.auth_log_ncalrpc", extra_args=['-U"$USERNAME%$PASSWORD"'])
648     planoldpythontestsuite("ad_dc:local", "samba.tests.auth_log_samlogon",
649                            extra_args=['-U"$USERNAME%$PASSWORD"'],
650                            environ={'CLIENT_IP': '127.0.0.11',
651                                     'SOCKET_WRAPPER_DEFAULT_IFACE': 11})
652     planoldpythontestsuite("ad_dc_ntvfs:local", "samba.tests.auth_log_samlogon",
653                            extra_args=['-U"$USERNAME%$PASSWORD"'],
654                            environ={'CLIENT_IP': '127.0.0.11',
655                                     'SOCKET_WRAPPER_DEFAULT_IFACE': 11})
656     planoldpythontestsuite("ad_dc:local", "samba.tests.auth_log_netlogon",
657                            extra_args=['-U"$USERNAME%$PASSWORD"'],
658                            environ={'CLIENT_IP': '127.0.0.11',
659                                     'SOCKET_WRAPPER_DEFAULT_IFACE': 11})
660     planoldpythontestsuite("ad_dc_ntvfs:local", "samba.tests.auth_log_netlogon",
661                            extra_args=['-U"$USERNAME%$PASSWORD"'],
662                            environ={'CLIENT_IP': '127.0.0.11',
663                                     'SOCKET_WRAPPER_DEFAULT_IFACE': 11})
664     planoldpythontestsuite("ad_dc:local",
665                            "samba.tests.auth_log_netlogon_bad_creds",
666                            extra_args=['-U"$USERNAME%$PASSWORD"'],
667                            environ={'CLIENT_IP': '127.0.0.11',
668                                     'SOCKET_WRAPPER_DEFAULT_IFACE': 11})
669     planoldpythontestsuite("ad_dc_ntvfs:local",
670                            "samba.tests.auth_log_netlogon_bad_creds",
671                            extra_args=['-U"$USERNAME%$PASSWORD"'],
672                            environ={'CLIENT_IP': '127.0.0.11',
673                                     'SOCKET_WRAPPER_DEFAULT_IFACE': 11})
674 planoldpythontestsuite("ad_dc",
675                        "samba.tests.net_join_no_spnego",
676                        extra_args=['-U"$USERNAME%$PASSWORD"'])
677 planoldpythontestsuite("ad_dc",
678                        "samba.tests.net_join",
679                        extra_args=['-U"$USERNAME%$PASSWORD"'])
680 # Need to test the password hashing in multiple environments to ensure that
681 # all the possible options are covered
682 #
683 # ad_dc:local functional_level >= 2008, gpg keys available
684 planoldpythontestsuite("ad_dc:local",
685                        "samba.tests.password_hash_gpgme",
686                        extra_args=['-U"$USERNAME%$PASSWORD"'])
687 # ad_dc_ntvfs:local functional level >= 2008, gpg keys not available
688 planoldpythontestsuite("ad_dc_ntvfs:local",
689                        "samba.tests.password_hash_fl2008",
690                        extra_args=['-U"$USERNAME%$PASSWORD"'])
691 # fl2003dc:local functional level < 2008, gpg keys not available
692 planoldpythontestsuite("fl2003dc:local",
693                        "samba.tests.password_hash_fl2003",
694                        extra_args=['-U"$USERNAME%$PASSWORD"'])
695 # ad_dc: wDigest values over ldap
696 planoldpythontestsuite("ad_dc",
697                        "samba.tests.password_hash_ldap",
698                        extra_args=['-U"$USERNAME%$PASSWORD"'])
699 # Encrypted secrets
700 # ensure default provision (ad_dc) and join (vampire_dc)
701 # encrypt secret values on disk.
702 planoldpythontestsuite("ad_dc:local",
703                        "samba.tests.encrypted_secrets",
704                        extra_args=['-U"$USERNAME%$PASSWORD"'])
705 planoldpythontestsuite("vampire_dc:local",
706                        "samba.tests.encrypted_secrets",
707                        extra_args=['-U"$USERNAME%$PASSWORD"'])
708 # The fl2000dc environment is provisioned with the --plaintext_secrets option
709 # so this test will fail, which proves the secrets are not being encrypted.
710 # There is an entry in known_fail.d.
711 planoldpythontestsuite("fl2000dc:local",
712                        "samba.tests.encrypted_secrets",
713                        extra_args=['-U"$USERNAME%$PASSWORD"'])
714
715 planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.lsa_string")
716 planoldpythontestsuite("ad_dc_ntvfs",
717                        "samba.tests.krb5_credentials",
718                        extra_args=['-U"$USERNAME%$PASSWORD"'])
719 for env in ["ad_dc_ntvfs", "vampire_dc", "promoted_dc"]:
720     planoldpythontestsuite(env,
721                            "samba.tests.py_credentials",
722                            extra_args=['-U"$USERNAME%$PASSWORD"'])
723 planoldpythontestsuite("ad_dc_ntvfs",
724                        "samba.tests.emulate.traffic",
725                        extra_args=['-U"$USERNAME%$PASSWORD"'])
726 planoldpythontestsuite("ad_dc_ntvfs",
727                        "samba.tests.emulate.traffic_packet",
728                        extra_args=['-U"$USERNAME%$PASSWORD"'])
729 planoldpythontestsuite("ad_dc_ntvfs",
730                        "samba.tests.blackbox.traffic_replay",
731                        extra_args=['-U"$USERNAME%$PASSWORD"'])
732 planoldpythontestsuite("ad_dc_ntvfs",
733                        "samba.tests.blackbox.traffic_learner",
734                        extra_args=['-U"$USERNAME%$PASSWORD"'])
735 planoldpythontestsuite("ad_dc_ntvfs",
736                        "samba.tests.blackbox.traffic_summary",
737                        extra_args=['-U"$USERNAME%$PASSWORD"'])
738 #
739 # Want a selection of environments across the process models
740 #
741 for env in ["ad_dc_ntvfs:local", "ad_dc:local",
742             "fl2003dc:local", "fl2008r2dc:local",
743             "promoted_dc:local"]:
744     planoldpythontestsuite(env, "samba.tests.blackbox.smbcontrol")
745
746 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'])
747 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'])
748 plantestsuite_loadlist("samba4.tokengroups.ntlm.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', 'no', '$LOADLIST', '$LISTOPT'])
749 plantestsuite("samba4.sam.python(fl2008r2dc)", "fl2008r2dc", [python, os.path.join(samba4srcdir, "dsdb/tests/python/sam.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN'])
750 plantestsuite("samba4.sam.python(ad_dc_ntvfs)", "ad_dc_ntvfs", [python, os.path.join(samba4srcdir, "dsdb/tests/python/sam.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN'])
751 plantestsuite("samba4.user_account_control.python(ad_dc_ntvfs)", "ad_dc_ntvfs", [python, os.path.join(samba4srcdir, "dsdb/tests/python/user_account_control.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN'])
752 planoldpythontestsuite("ad_dc_ntvfs", "dsdb_schema_info",
753         extra_path=[os.path.join(samba4srcdir, 'dsdb/tests/python')],
754         name="samba4.schemaInfo.python(ad_dc_ntvfs)",
755         extra_args=['-U"$DOMAIN/$DC_USERNAME%$DC_PASSWORD"'])
756
757 planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.dsdb_schema_attributes")
758
759 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'])
760 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'])
761 plantestsuite_loadlist("samba4.ldap.match_rules.python", "ad_dc_ntvfs", [python, os.path.join(srcdir(), "lib/ldb-samba/tests/match_rules.py"), '$PREFIX_ABS/ad_dc_ntvfs/private/sam.ldb', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
762 plantestsuite_loadlist("samba4.ldap.notification.python(ad_dc_ntvfs)", "ad_dc_ntvfs", [python, os.path.join(samba4srcdir, "dsdb/tests/python/notification.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
763 plantestsuite_loadlist("samba4.ldap.sites.python(ad_dc_ntvfs)", "ad_dc_ntvfs", [python, os.path.join(samba4srcdir, "dsdb/tests/python/sites.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
764
765 plantestsuite_loadlist("samba4.ldap.sort.python(ad_dc_ntvfs)", "ad_dc_ntvfs", [python, os.path.join(samba4srcdir, "dsdb/tests/python/sort.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
766 plantestsuite_loadlist("samba4.ldap.vlv.python(ad_dc_ntvfs)", "ad_dc_ntvfs", [python, os.path.join(samba4srcdir, "dsdb/tests/python/vlv.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
767 plantestsuite_loadlist("samba4.ldap.linked_attributes.python(ad_dc_ntvfs)", "ad_dc_ntvfs:local", [python, os.path.join(samba4srcdir, "dsdb/tests/python/linked_attributes.py"), '$PREFIX_ABS/ad_dc_ntvfs/private/sam.ldb', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
768
769 plantestsuite_loadlist("samba4.ldap.rodc.python(rodc)", "rodc",
770                        [python,
771                         os.path.join(samba4srcdir, "dsdb/tests/python/rodc.py"),
772                         '$SERVER', '-U"$USERNAME%$PASSWORD"',
773                         '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
774
775 plantestsuite_loadlist("samba4.ldap.rodc_rwdc.python(rodc)", "rodc:local",
776                        [python,
777                         os.path.join(samba4srcdir,
778                                      "dsdb/tests/python/rodc_rwdc.py"),
779                         '$SERVER', '$DC_SERVER', '-U"$USERNAME%$PASSWORD"',
780                         '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
781
782 planoldpythontestsuite("rodc:local", "replica_sync_rodc",
783                        extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
784                        name="samba4.drs.replica_sync_rodc.python(rodc)",
785                        environ={'DC1': '$DC_SERVER', 'DC2': '$RODC_DC_SERVER'},
786                        extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
787
788 for env in ["ad_dc_ntvfs", "fl2000dc", "fl2003dc", "fl2008r2dc"]:
789     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'])
790     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"])
791     plantestsuite_loadlist("samba4.ldap.secdesc.python(%s)" % env, env, [python, os.path.join(samba4srcdir, "dsdb/tests/python/sec_descriptor.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
792     plantestsuite_loadlist("samba4.ldap.acl.python(%s)" % env, env, [python, os.path.join(samba4srcdir, "dsdb/tests/python/acl.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
793     if env != "fl2000dc":
794         # This test makes excessive use of the "userPassword" attribute which
795         # isn't available on DCs with Windows 2000 domain function level -
796         # therefore skip it in that configuration
797         plantestsuite_loadlist("samba4.ldap.passwords.python(%s)" % env, env, [python, os.path.join(samba4srcdir, "dsdb/tests/python/passwords.py"), "$SERVER", '-U"$USERNAME%$PASSWORD"', "-W$DOMAIN", '$LOADLIST', '$LISTOPT'])
798
799 env = "ad_dc_ntvfs"
800 plantestsuite_loadlist("samba4.ldap.confidential_attr.python(%s)" % env, env, [python, os.path.join(samba4srcdir, "dsdb/tests/python/confidential_attr.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
801
802 for env in ["ad_dc_ntvfs"]:
803     # This test takes a lot of time, so we run it against a minimum of
804     # environments, please only add new ones if there's really a
805     # difference we need to test
806     plantestsuite_loadlist("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", '$LOADLIST', '$LISTOPT'])
807     planoldpythontestsuite(env, "tombstone_reanimation",
808                            name="samba4.tombstone_reanimation.python",
809                            environ={'TEST_SERVER': '$SERVER', 'TEST_USERNAME': '$USERNAME', 'TEST_PASSWORD': '$PASSWORD'},
810                            extra_path=[os.path.join(samba4srcdir, 'dsdb/tests/python')]
811                            )
812
813 planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.upgradeprovisionneeddc")
814 planpythontestsuite("ad_dc:local", "samba.tests.posixacl")
815 planpythontestsuite("ad_dc_no_nss:local", "samba.tests.posixacl")
816 plantestsuite_loadlist("samba4.deletetest.python(ad_dc_ntvfs)", "ad_dc_ntvfs", [python, os.path.join(samba4srcdir, "dsdb/tests/python/deletetest.py"),
817                                                      '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
818 plantestsuite("samba4.blackbox.samba3dump", "none", [os.path.join(samba4srcdir, "selftest/test_samba3dump.sh")])
819 plantestsuite("samba4.blackbox.upgrade", "none", ["PYTHON=%s" % python, os.path.join(samba4srcdir, "setup/tests/blackbox_s3upgrade.sh"), '$PREFIX/provision'])
820 plantestsuite("samba4.blackbox.provision.py", "none", ["PYTHON=%s" % python, os.path.join(samba4srcdir, "setup/tests/blackbox_provision.sh"), '$PREFIX/provision'])
821 plantestsuite("samba4.blackbox.supported_features", "none",
822               ["PYTHON=%s" % python,
823                os.path.join(samba4srcdir,
824                             "setup/tests/blackbox_supported_features.sh"),
825                '$PREFIX/provision'])
826 plantestsuite("samba4.blackbox.upgradeprovision.current", "none", ["PYTHON=%s" % python, os.path.join(samba4srcdir, "setup/tests/blackbox_upgradeprovision.sh"), '$PREFIX/provision'])
827 plantestsuite("samba4.blackbox.setpassword.py", "none", ["PYTHON=%s" % python, os.path.join(samba4srcdir, "setup/tests/blackbox_setpassword.sh"), '$PREFIX/provision'])
828 plantestsuite("samba4.blackbox.newuser.py", "none", ["PYTHON=%s" % python, os.path.join(samba4srcdir, "setup/tests/blackbox_newuser.sh"), '$PREFIX/provision'])
829 plantestsuite("samba4.blackbox.group.py", "none", ["PYTHON=%s" % python, os.path.join(samba4srcdir, "setup/tests/blackbox_group.sh"), '$PREFIX/provision'])
830 plantestsuite("samba4.blackbox.spn.py(ad_dc_ntvfs:local)", "ad_dc_ntvfs:local", ["PYTHON=%s" % python, os.path.join(samba4srcdir, "setup/tests/blackbox_spn.sh"), '$PREFIX/ad_dc_ntvfs'])
831 plantestsuite_loadlist("samba4.ldap.bind(fl2008r2dc)", "fl2008r2dc", [python, os.path.join(srcdir(), "auth/credentials/tests/bind.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '$LOADLIST', '$LISTOPT'])
832
833 # This makes sure we test the rid allocation code
834 t = "rpc.samr.large-dc"
835 plansmbtorture4testsuite(t, "vampire_dc", ['$SERVER', '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], modname=("samba4.%s.one" % t))
836 plansmbtorture4testsuite(t, "vampire_dc", ['$SERVER', '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], modname="samba4.%s.two" % t)
837
838 # some RODC testing
839 for env in ['rodc']:
840     plansmbtorture4testsuite('rpc.echo', env, ['ncacn_np:$SERVER', "-k", "yes", '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], modname="samba4.rpc.echo")
841     plansmbtorture4testsuite('rpc.echo', "%s:local" % env, ['ncacn_np:$SERVER', "-k", "yes", '-P', '--workgroup=$DOMAIN'], modname="samba4.rpc.echo")
842     plansmbtorture4testsuite('rpc.echo', "%s:local" % env, ['ncacn_np:$SERVER', "-k", "no", '-Utestallowed\ account%$DC_PASSWORD', '--workgroup=$DOMAIN'], modname="samba4.rpc.echo.testallowed")
843     plansmbtorture4testsuite('rpc.echo', "%s:local" % env, ['ncacn_np:$SERVER', "-k", "no", '-Utestdenied%$DC_PASSWORD', '--workgroup=$DOMAIN'], modname="samba4.rpc.echo.testdenied")
844     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])
845
846 planpythontestsuite("rodc:local", "samba.tests.samba_tool.rodc")
847
848 plantestsuite("samba.blackbox.rpcclient_samlogon", "rodc:local", [os.path.join(samba3srcdir, "script/tests/test_rpcclient_samlogon.sh"),
849                                                                   "$DC_USERNAME", "$DC_PASSWORD", "ncacn_np:$SERVER", configuration])
850
851 plantestsuite("samba.blackbox.rpcclient_samlogon_testallowed", "rodc:local", [os.path.join(samba3srcdir, "script/tests/test_rpcclient_samlogon.sh"),
852                                                                               "testallowed\ account", "$DC_PASSWORD", "ncacn_np:$SERVER", configuration])
853
854 plantestsuite("samba.blackbox.rpcclient_samlogon_testdenied", "rodc:local", [os.path.join(samba3srcdir, "script/tests/test_rpcclient_samlogon.sh"),
855                                                                              "testdenied", "$DC_PASSWORD", "ncacn_np:$SERVER", configuration])
856
857
858
859 plantestsuite("samba4.blackbox.provision-backend", "none", ["PYTHON=%s" % python, os.path.join(samba4srcdir, "setup/tests/blackbox_provision-backend.sh"), '$PREFIX/provision'])
860
861 # Test renaming the DC
862 plantestsuite("samba4.blackbox.renamedc.sh", "none", ["PYTHON=%s" % python, os.path.join(bbdir, "renamedc.sh"), '$PREFIX/provision'])
863
864 # DRS python tests
865
866 env = 'vampire_dc'
867 planoldpythontestsuite(env, "ridalloc_exop",
868                        extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
869                        name="samba4.drs.ridalloc_exop.python(%s)" % env,
870                        environ={'DC1': "$DC_SERVER", 'DC2': '$%s_SERVER' % env.upper()},
871                        extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
872
873 for env in ['vampire_dc', 'promoted_dc']:
874     planoldpythontestsuite("%s:local" % env, "samba_tool_drs",
875                            extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
876                            name="samba4.drs.samba_tool_drs.python(%s)" % env,
877                            environ={'DC1': '$DC_SERVER', 'DC2': '$%s_SERVER' % env.upper()},
878                            extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
879     planoldpythontestsuite("%s:local" % env, "replica_sync",
880                            extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
881                            name="samba4.drs.replica_sync.python(%s)" % env,
882                            environ={'DC1': '$DC_SERVER', 'DC2': '$%s_SERVER' % env.upper()},
883                            extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
884     planoldpythontestsuite(env, "delete_object",
885                            extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
886                            name="samba4.drs.delete_object.python(%s)" % env,
887                            environ={'DC1': '$DC_SERVER', 'DC2': '$%s_SERVER' % env.upper()},
888                            extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
889     planoldpythontestsuite(env, "fsmo",
890                            name="samba4.drs.fsmo.python(%s)" % env,
891                            extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
892                            environ={'DC1': "$DC_SERVER", 'DC2': '$%s_SERVER' % env.upper()},
893                            extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
894     planoldpythontestsuite(env, "repl_move",
895                            extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
896                            name="samba4.drs.repl_move.python(%s)" % env,
897                            environ={'DC1': "$DC_SERVER", 'DC2': '$%s_SERVER' % env.upper()},
898                            extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
899     planoldpythontestsuite(env, "getnc_exop",
900                            extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
901                            name="samba4.drs.getnc_exop.python(%s)" % env,
902                            environ={'DC1': "$DC_SERVER", 'DC2': '$%s_SERVER' % env.upper()},
903                            extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
904     planoldpythontestsuite(env, "getnc_unpriv",
905                            extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
906                            name="samba4.drs.getnc_unpriv.python(%s)" % env,
907                            environ={'DC1': "$DC_SERVER", 'DC2': '$%s_SERVER' % env.upper()},
908                            extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
909     planoldpythontestsuite(env, "linked_attributes_drs",
910                            extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
911                            name="samba4.drs.linked_attributes_drs.python(%s)" % env,
912                            environ={'DC1': "$DC_SERVER", 'DC2': '$%s_SERVER' % env.upper()},
913                            extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
914     planoldpythontestsuite(env, "link_conflicts",
915                            extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
916                            name="samba4.drs.link_conflicts.python(%s)" % env,
917                            environ={'DC1': "$DC_SERVER", 'DC2': '$%s_SERVER' % env.upper()},
918                            extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
919
920 for env in ['vampire_dc', 'promoted_dc', 'vampire_2000_dc']:
921     planoldpythontestsuite(env, "repl_schema",
922                            extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
923                            name="samba4.drs.repl_schema.python(%s)" % env,
924                            environ={'DC1': "$DC_SERVER", 'DC2': '$%s_SERVER' % env.upper()},
925                            extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
926
927 # A side-effect of the getncchanges tests is that they will create hundreds of
928 # tombstone objects, so run them last to avoid interferring with (and slowing
929 # down) the other DRS tests
930 for env in ['vampire_dc', 'promoted_dc']:
931     planoldpythontestsuite(env, "getncchanges",
932                            extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
933                            name="samba4.drs.getncchanges.python(%s)" % env,
934                            environ={'DC1': "$DC_SERVER", 'DC2': '$%s_SERVER' % env.upper()},
935                            extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
936
937 for env in ['ad_dc_ntvfs']:
938     planoldpythontestsuite(env, "repl_rodc",
939                            extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
940                            name="samba4.drs.repl_rodc.python(%s)" % env,
941                            environ={'DC1': "$DC_SERVER", 'DC2': '$DC_SERVER'},
942                            extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
943     planoldpythontestsuite(env, "samba.tests.join",
944                            name="samba.tests.join.python(%s)" % env,
945                            extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
946     planoldpythontestsuite(env, "cracknames",
947                            extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
948                            name="samba4.drs.cracknames.python(%s)" % env,
949                            environ={'DC1': "$DC_SERVER", 'DC2': '$DC_SERVER'},
950                            extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
951
952 planoldpythontestsuite("chgdcpass:local", "samba.tests.blackbox.samba_dnsupdate",
953                        environ={'DNS_SERVER_IP': '$SERVER_IP'})
954
955 for env in ["ad_dc_ntvfs", "s4member", "rodc", "promoted_dc", "ad_dc", "ad_member"]:
956     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])
957
958 #
959 # KDC Tests
960 #
961
962 # This test is for users cached at the RODC
963 plansmbtorture4testsuite('krb5.kdc', "rodc", ['ncacn_np:$SERVER_IP', "-k", "yes", '-Utestdenied%$PASSWORD',
964                                               '--workgroup=$DOMAIN', '--realm=$REALM',
965                                               '--option=torture:krb5-upn=testdenied_upn@$REALM.upn',
966                                               '--option=torture:expect_rodc=true'],
967                          "samba4.krb5.kdc with account DENIED permission to replicate to an RODC")
968 plansmbtorture4testsuite('krb5.kdc', "rodc", ['ncacn_np:$SERVER_IP', "-k", "yes", '-Utestallowed\ account%$PASSWORD',
969                                               '--workgroup=$DOMAIN', '--realm=$REALM',
970                                               '--option=torture:expect_machine_account=true',
971                                               '--option=torture:krb5-upn=testallowed\ upn@$REALM',
972                                               '--option=torture:krb5-hostname=testallowed',
973                                               '--option=torture:expect_rodc=true',
974                                               '--option=torture:expect_cached_at_rodc=true'],
975                          "samba4.krb5.kdc with account ALLOWED permission to replicate to an RODC")
976
977 # This ensures we have correct behaviour on a server that is not not the PDC emulator
978 env="promoted_dc"
979 plansmbtorture4testsuite('krb5.kdc', env, ['ncacn_np:$SERVER_IP', "-k", "yes", '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN', '--realm=$REALM'],
980                          "samba4.krb5.kdc with specified account")
981
982
983 for env in ["rodc", "promoted_dc", "ad_dc", "fl2000dc", "fl2008r2dc"]:
984     if env == "rodc":
985         # The machine account is cached at the RODC, as it is the local account
986         extra_options = ['--option=torture:expect_rodc=true', '--option=torture:expect_cached_at_rodc=true']
987     else:
988         extra_options = []
989
990     plansmbtorture4testsuite('krb5.kdc', "%s:local" % env, ['ncacn_np:$SERVER_IP', "-k", "yes", '-P',
991                                             '--workgroup=$DOMAIN', '--realm=$REALM',
992                                             '--option=torture:krb5-hostname=$SERVER',
993                                             '--option=torture:run_removedollar_test=true',
994                                             '--option=torture:expect_machine_account=true'] + extra_options,
995                              "samba4.krb5.kdc with machine account")
996
997
998 for env in [
999         'vampire_dc',
1000         'promoted_dc']:
1001     planoldpythontestsuite(env, "samba.tests.kcc",
1002                            name="samba.tests.kcc",
1003                            environ={'TEST_SERVER': '$SERVER', 'TEST_USERNAME': '$USERNAME',
1004                                     'TEST_PASSWORD': '$PASSWORD',
1005                                     'TEST_ENV': env
1006                                 },
1007                            extra_path=[os.path.join(srcdir(), "samba/python"), ]
1008                            )
1009     planpythontestsuite(env, "samba.tests.samba_tool.visualize_drs")
1010
1011 for env in [ "simpleserver", "fileserver", "nt4_dc", "ad_dc", "ad_dc_ntvfs", "ad_member"]:
1012     planoldpythontestsuite(env, "netlogonsvc",
1013                            extra_path=[os.path.join(srcdir(), 'python/samba/tests')],
1014                            name="samba.tests.netlogonsvc.python(%s)" % env)
1015
1016 for env in [ "ktest", "ad_member", "ad_dc_no_ntlm" ]:
1017     planoldpythontestsuite(env, "ntlmdisabled",
1018                            extra_path=[os.path.join(srcdir(), 'python/samba/tests')],
1019                            name="samba.tests.ntlmdisabled.python(%s)" % env)
1020
1021 # Demote the vampire DC, it must be the last test each DC, before the dbcheck
1022 for env in ['vampire_dc', 'promoted_dc', 'rodc']:
1023     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])
1024
1025 # TODO: Verifying the databases really should be a part of the
1026 # environment teardown.
1027 # check the databases are all OK. PLEASE LEAVE THIS AS THE LAST TEST
1028 for env in ["ad_dc_ntvfs", "ad_dc", "fl2000dc", "fl2003dc", "fl2008r2dc", 'vampire_dc', 'promoted_dc']:
1029     plantestsuite("samba4.blackbox.dbcheck(%s)" % env, env + ":local" , ["PYTHON=%s" % python, os.path.join(bbdir, "dbcheck.sh"), '$PREFIX/provision', configuration])
1030
1031 # cmocka tests not requiring a specific encironment
1032 #
1033 plantestsuite("samba4.dsdb.samdb.ldb_modules.unique_object_sids" , "none",
1034               [os.path.join(bindir(), "test_unique_object_sids")])
1035 plantestsuite("samba4.dsdb.samdb.ldb_modules.encrypted_secrets", "none",
1036                   [os.path.join(bindir(), "test_encrypted_secrets")])