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
20 from __future__
import print_function
24 sys
.path
.insert(0, os
.path
.join(os
.path
.dirname(__file__
), "../../selftest"))
25 import selftesthelpers
26 from selftesthelpers
import bindir
, srcdir
, binpath
, python
27 from selftesthelpers
import configuration
, plantestsuite
28 from selftesthelpers
import planpythontestsuite
, planperltestsuite
29 from selftesthelpers
import plantestsuite_loadlist
30 from selftesthelpers
import skiptestsuite
, source4dir
, valgrindify
31 from selftesthelpers
import smbtorture4_options
, smbtorture4_testsuites
32 from selftesthelpers
import smbtorture4
, ntlm_auth3
, samba3srcdir
35 print("OPTIONS %s" % " ".join(smbtorture4_options
), file=sys
.stderr
)
38 def plansmbtorture4testsuite(name
, env
, options
, modname
=None):
39 return selftesthelpers
.plansmbtorture4testsuite(name
, env
, options
,
40 target
='samba4', modname
=modname
)
43 samba4srcdir
= source4dir()
44 samba4bindir
= bindir()
45 validate
= os
.getenv("VALIDATE", "")
47 validate_list
= [validate
]
51 nmblookup4
= binpath('nmblookup4')
52 smbclient4
= binpath('smbclient4')
54 bbdir
= os
.path
.join(srcdir(), "testprogs/blackbox")
56 # alias to highlight what tests we want to run against a DC with SMBv1 disabled
57 smbv1_disabled_testenv
= "restoredc"
59 all_fl_envs
= ["fl2000dc", "fl2003dc", "fl2008dc", "fl2008r2dc"]
61 # Simple tests for LDAP and CLDAP
62 for auth_type
in ['', '-k no', '-k yes']:
63 for auth_level
in ['--option=clientldapsaslwrapping=plain', '--sign', '--encrypt']:
64 creds
= '-U"$USERNAME%$PASSWORD"'
65 options
= creds
+ ' ' + auth_type
+ ' ' + auth_level
66 plantestsuite("samba4.ldb.ldap with options %r(ad_dc_default)" % options
, "ad_dc_default", "%s/test_ldb.sh ldap $SERVER %s" % (bbdir
, options
))
68 # see if we support ADS on the Samba3 side
70 config_h
= os
.environ
["CONFIG_H"]
72 config_h
= os
.path
.join(samba4bindir
, "default/include/config.h")
74 # check available features
76 f
= open(config_h
, 'r')
79 config_hash
= dict((x
[0], ' '.join(x
[1:]))
80 for x
in map(lambda line
: line
.strip().split(' ')[1:],
81 list(filter(lambda line
: (line
[0:7] == '#define') and (len(line
.split(' ')) > 2), lines
))))
85 have_heimdal_support
= ("SAMBA4_USES_HEIMDAL" in config_hash
)
87 for options
in ['-U"$USERNAME%$PASSWORD"']:
88 plantestsuite("samba4.ldb.ldaps with options %s(ad_dc_default)" % options
, "ad_dc_default",
89 "%s/test_ldb.sh ldaps $SERVER_IP %s" % (bbdir
, options
))
92 '--simple-bind-dn=$USERNAME@$REALM --password=$PASSWORD',
95 'SERVER_IP': '$SERVER_IP',
96 'SERVER_NAME': '$SERVER',
97 'SERVER.REALM': '$SERVER.$REALM',
99 tls_verify_options
= [
100 '--option="tlsverifypeer=no_check"',
101 '--option="tlsverifypeer=ca_only"',
102 '--option="tlsverifypeer=ca_and_name_if_available"',
103 '--option="tlsverifypeer=ca_and_name"',
104 '--option="tlsverifypeer=as_strict_as_possible"',
107 # we use :local for fl2008r2dc because of the self-signed certificate
108 for env
in ["ad_dc_ntvfs", "fl2008r2dc:local"]:
109 for peer_key
in peer_options
.keys():
110 peer_val
= peer_options
[peer_key
]
111 for creds
in creds_options
:
112 for tls_verify
in tls_verify_options
:
113 options
= creds
+ ' ' + tls_verify
114 plantestsuite("samba4.ldb.simple.ldaps with options %s %s(%s)" % (
115 peer_key
, options
, env
), env
,
116 "%s/test_ldb_simple.sh ldaps %s %s" % (bbdir
, peer_val
, options
))
118 # test all "ldap server require strong auth" combinations
119 for env
in ["ad_dc_ntvfs", "fl2008r2dc", "fl2003dc"]:
120 options
= '--simple-bind-dn="$USERNAME@$REALM" --password="$PASSWORD"'
121 plantestsuite("samba4.ldb.simple.ldap with SIMPLE-BIND %s(%s)" % (options
, env
),
122 env
, "%s/test_ldb_simple.sh ldap $SERVER %s" % (bbdir
, options
))
123 options
+= ' --option="tlsverifypeer=no_check"'
124 plantestsuite("samba4.ldb.simple.ldaps with SIMPLE-BIND %s(%s)" % (options
, env
),
125 env
, "%s/test_ldb_simple.sh ldaps $SERVER %s" % (bbdir
, options
))
128 '--option=clientldapsaslwrapping=plain',
131 '-k yes --option=clientldapsaslwrapping=plain',
134 '-k no --option=clientldapsaslwrapping=plain',
135 '-k no --sign --option=ntlmssp_client:ldap_style_send_seal=no',
140 for auth_option
in auth_options
:
141 options
= '-U"$USERNAME%$PASSWORD"' + ' ' + auth_option
142 plantestsuite("samba4.ldb.simple.ldap with SASL-BIND %s(%s)" % (options
, env
),
143 env
, "%s/test_ldb_simple.sh ldap $SERVER %s" % (bbdir
, options
))
144 options
= '-U"$USERNAME%$PASSWORD" --option="tlsverifypeer=no_check"'
145 plantestsuite("samba4.ldb.simple.ldaps with SASL-BIND %s(%s)" % (options
, env
),
146 env
, "%s/test_ldb_simple.sh ldaps $SERVER %s" % (bbdir
, options
))
148 for options
in ['-U"$USERNAME%$PASSWORD"']:
149 plantestsuite("samba4.ldb.ldapi with options %s(ad_dc_ntvfs:local)" % options
, "ad_dc_ntvfs:local",
150 "%s/test_ldb.sh ldapi $PREFIX_ABS/ad_dc_ntvfs/private/ldapi %s" % (bbdir
, options
))
152 for t
in smbtorture4_testsuites("ldap."):
153 plansmbtorture4testsuite(t
, "ad_dc_default", '-U"$USERNAME%$PASSWORD" //$SERVER_IP/_none_')
155 for t
in smbtorture4_testsuites("dsdb."):
156 plansmbtorture4testsuite(t
, "ad_dc:local", "localhost")
158 ldbdir
= os
.path
.join(srcdir(), "lib/ldb")
159 # Don't run LDB tests when using system ldb, as we won't have ldbtest installed
160 if os
.path
.exists(os
.path
.join(samba4bindir
, "ldbtest")):
161 plantestsuite("ldb.base", "none", "%s/tests/test-tdb-subunit.sh %s" % (ldbdir
, samba4bindir
))
163 skiptestsuite("ldb.base", "Using system LDB, ldbtest not available")
165 plantestsuite_loadlist("samba4.tests.attr_from_server.python(ad_dc_ntvfs)",
167 [python
, os
.path
.join(samba4srcdir
, "dsdb/tests/python/attr_from_server.py"),
168 '$PREFIX_ABS/ad_dc_ntvfs/private/sam.ldb', '$LOADLIST', '$LISTOPT'])
172 # add tests to this list as they start passing, so we test
173 # that they stay passing
174 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"]
175 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"]
176 drs_rpc_tests
= smbtorture4_testsuites("drs.rpc")
177 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
178 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"]
179 slow_ncacn_ip_tcp_tests
= ["rpc.cracknames"]
181 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"]
183 # Make sure all tests get run
184 rpc_tests
= smbtorture4_testsuites("rpc.")
185 auto_rpc_tests
= list(filter(lambda t
: t
not in all_rpc_tests
, rpc_tests
))
187 for bindoptions
in ["seal,padcheck"] + validate_list
+ ["bigendian"]:
188 for transport
in ["ncalrpc", "ncacn_np", "ncacn_ip_tcp"]:
189 env
= "ad_dc_default"
190 if transport
== "ncalrpc":
191 tests
= ncalrpc_tests
192 env
= "ad_dc_default:local"
193 elif transport
== "ncacn_np":
194 tests
= ncacn_np_tests
195 elif transport
== "ncacn_ip_tcp":
196 tests
= ncacn_ip_tcp_tests
198 raise AssertionError("invalid transport %r" % transport
)
200 plansmbtorture4testsuite(t
, env
, ["%s:$SERVER[%s]" % (transport
, bindoptions
), '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.%s on %s with %s" % (t
, transport
, bindoptions
))
201 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
))
203 # Plugin S4 DC tests (confirms named pipe auth forwarding). This can be expanded once kerberos is supported in the plugin DC
205 for bindoptions
in ["seal,padcheck"] + validate_list
+ ["bigendian"]:
206 for t
in ncacn_np_tests
:
208 transport
= "ncacn_np"
209 plansmbtorture4testsuite(t
, env
, ["%s:$SERVER[%s]" % (transport
, bindoptions
), '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.%s with %s" % (t
, bindoptions
))
211 for bindoptions
in [""] + validate_list
+ ["bigendian"]:
212 for t
in auto_rpc_tests
:
213 plansmbtorture4testsuite(t
, "ad_dc_default", ["$SERVER[%s]" % bindoptions
, '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.%s with %s" % (t
, bindoptions
))
216 plansmbtorture4testsuite(t
, "ad_dc_default:local", ["$SERVER[%s]" % bindoptions
, '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], modname
="samba4.%s" % t
)
218 for transport
in ["ncacn_np", "ncacn_ip_tcp"]:
219 env
= "ad_dc_slowtests"
220 if transport
== "ncacn_np":
221 tests
= slow_ncacn_np_tests
222 elif transport
== "ncacn_ip_tcp":
223 tests
= slow_ncacn_ip_tcp_tests
225 raise AssertionError("Invalid transport %r" % transport
)
228 if t
== 'rpc.cracknames':
230 plansmbtorture4testsuite(t
, env
, ["%s:$SERVER[%s]" % (transport
, bindoptions
), '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.%s on %s with %s" % (t
, transport
, bindoptions
))
232 # Tests for the DFS referral calls implementation
233 for t
in smbtorture4_testsuites("dfs."):
234 plansmbtorture4testsuite(t
, "ad_dc_ntvfs", '//$SERVER/ipc\$ -U$USERNAME%$PASSWORD')
235 plansmbtorture4testsuite(t
, "ad_dc", '//$SERVER/ipc\$ -U$USERNAME%$PASSWORD')
237 # Tests for the NET API (net.api.become.dc tested below against all the roles)
238 net_tests
= list(filter(lambda x
: "net.api.become.dc" not in x
, smbtorture4_testsuites("net.")))
240 plansmbtorture4testsuite(t
, "ad_dc_default", '$SERVER[%s] -U$USERNAME%%$PASSWORD -W$DOMAIN' % validate
)
242 # Tests for session keys and encryption of RPC pipes
243 # FIXME: Integrate these into a single smbtorture test
245 transport
= "ncacn_np"
246 for env
in ["ad_dc_default", "nt4_dc"]:
248 "-k no --option=clientusespnego=yes",
249 "-k no --option=clientusespnego=yes --option=ntlmssp_client:128bit=no",
250 "-k no --option=clientusespnego=yes --option=ntlmssp_client:56bit=yes",
251 "-k no --option=clientusespnego=yes --option=ntlmssp_client:56bit=no",
252 "-k no --option=clientusespnego=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=yes",
253 "-k no --option=clientusespnego=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=no",
254 "-k no --option=clientusespnego=yes --option=clientntlmv2auth=yes",
255 "-k no --option=clientusespnego=yes --option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no",
256 "-k no --option=clientusespnego=yes --option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=yes",
257 "-k no --option=clientusespnego=no --option=clientntlmv2auth=yes",
258 "-k no --option=gensec:spnego=no --option=clientntlmv2auth=yes",
259 "-k no --option=clientusespnego=no"]:
260 name
= "rpc.lsa.secrets on %s with with %s" % (transport
, ntlmoptions
)
261 plansmbtorture4testsuite('rpc.lsa.secrets', env
, ["%s:$SERVER[]" % (transport
), ntlmoptions
, '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN', '--option=gensec:target_hostname=$NETBIOSNAME'], "samba4.%s" % name
)
262 plantestsuite("samba.blackbox.pdbtest(%s)" % env
, "%s:local" % env
, [os
.path
.join(bbdir
, "test_pdbtest.sh"), '$SERVER', "$PREFIX", "pdbtest", smbclient4
, '$SMB_CONF_PATH', configuration
])
264 gpo
= smbtorture4_testsuites("gpo.")
266 plansmbtorture4testsuite(t
, 'ad_dc:local', ['//$SERVER/sysvol', '-U$USERNAME%$PASSWORD'])
268 transports
= ["ncacn_np", "ncacn_ip_tcp"]
270 # Kerberos varies between functional levels, so it is important to check this on all of them
271 for env
in all_fl_envs
:
272 transport
= "ncacn_np"
273 plansmbtorture4testsuite('rpc.pac', env
, ["%s:$SERVER[]" % (transport
, ), '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.rpc.pac on %s" % (transport
,))
274 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
,))
275 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
,))
276 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
,))
277 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
,))
278 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
,))
279 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
)
280 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
)
281 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
)
283 # Winreg tests test bulk Kerberos encryption of DCE/RPC
284 # We test rpc.winreg here too, because the winreg interface if
285 # handled by the source3/rpc_server code.
286 for bindoptions
in ["connect", "packet", "krb5", "krb5,packet", "krb5,sign", "krb5,seal", "spnego", "spnego,packet", "spnego,sign", "spnego,seal"]:
287 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
))
289 for transport
in transports
:
290 plansmbtorture4testsuite('rpc.echo', env
, ["%s:$SERVER[]" % (transport
,), '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.rpc.echo on %s" % (transport
, ))
292 # Echo tests test bulk Kerberos encryption of DCE/RPC
293 for bindoptions
in ["connect", "krb5", "krb5,sign", "krb5,seal", "spnego", "spnego,sign", "spnego,seal"] + validate_list
+ ["padcheck", "bigendian", "bigendian,seal"]:
294 echooptions
= "--option=socket:testnonblock=True --option=torture:quick=yes -k yes"
295 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
))
297 for env
in ["fl2000dc", "fl2008r2dc"]:
298 plansmbtorture4testsuite("net.api.become.dc", env
, '$SERVER[%s] -U$USERNAME%%$PASSWORD -W$DOMAIN' % validate
)
300 for bindoptions
in ["sign", "seal"]:
301 plansmbtorture4testsuite('rpc.backupkey', "ad_dc_default", ["ncacn_np:$SERVER[%s]" % (bindoptions
), '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.rpc.backupkey with %s" % (bindoptions
))
303 for transport
in transports
:
304 for bindoptions
in ["sign", "seal"]:
306 "--option=ntlmssp_client:ntlm2=yes --option=torture:quick=yes",
307 "--option=ntlmssp_client:ntlm2=no --option=torture:quick=yes",
308 "--option=ntlmssp_client:ntlm2=yes --option=ntlmssp_client:128bit=no --option=torture:quick=yes",
309 "--option=ntlmssp_client:ntlm2=no --option=ntlmssp_client:128bit=no --option=torture:quick=yes",
310 "--option=ntlmssp_client:ntlm2=yes --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes",
311 "--option=ntlmssp_client:ntlm2=no --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes",
312 "--option=clientntlmv2auth=yes --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes",
313 "--option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:keyexchange=yes --option=torture:quick=yes",
314 "--option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes"]:
315 if transport
== "ncalrpc":
316 env
= "ad_dc_default:local"
318 env
= "ad_dc_default"
319 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
))
321 plansmbtorture4testsuite('rpc.echo', "ad_dc_default", ['ncacn_np:$SERVER[smb2]', '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.rpc.echo on ncacn_np over smb2")
322 for env
in ["ad_dc", "nt4_dc"]:
323 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")
324 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")
326 plansmbtorture4testsuite('ntp.signd', "ad_dc_default:local", ['ncacn_np:$SERVER', '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.ntp.signd")
328 nbt_tests
= smbtorture4_testsuites("nbt.")
330 plansmbtorture4testsuite(t
, "ad_dc_ntvfs", "//$SERVER/_none_ -U\"$USERNAME%$PASSWORD\"")
332 # Tests against the NTVFS POSIX backend
333 ntvfsargs
= ["--option=torture:sharedelay=100000", "--option=torture:oplocktimeout=3", "--option=torture:writetimeupdatedelay=500000"]
335 # Filter smb2 tests that should not run against ad_dc_ntvfs
337 "smb2.change_notify_disabled",
340 "smb2.kernel-oplocks",
341 "smb2.durable-v2-delay",
344 smb2
= [x
for x
in smbtorture4_testsuites("smb2.") if x
not in smb2_s3only
]
346 # The QFILEINFO-IPC test needs to be on ipc$
347 raw
= list(filter(lambda x
: "raw.qfileinfo.ipc" not in x
, smbtorture4_testsuites("raw.")))
348 base
= smbtorture4_testsuites("base.")
350 netapi
= smbtorture4_testsuites("netapi.")
352 for t
in base
+ raw
+ smb2
+ netapi
:
353 plansmbtorture4testsuite(t
, "ad_dc_ntvfs", ['//$SERVER/tmp', '-U$USERNAME%$PASSWORD'] + ntvfsargs
)
355 libsmbclient
= smbtorture4_testsuites("libsmbclient.")
356 protocols
= [ 'NT1', 'SMB3' ]
357 for t
in libsmbclient
:
358 url
= "smb://$USERNAME:$PASSWORD@$SERVER/tmp"
359 if t
== "libsmbclient.list_shares":
360 url
= "smb://$USERNAME:$PASSWORD@$SERVER"
362 for proto
in protocols
:
363 libsmbclient_testargs
= ["--option=torture:smburl=" + url
,
364 "--option=torture:replace_smbconf=%s/testdata/samba3/smb_new.conf" % srcdir(),
365 "--option=torture:clientprotocol=%s" % proto
]
366 plansmbtorture4testsuite(t
, "ad_dc", ['//$SERVER/tmp', '-U$USERNAME%$PASSWORD'] + libsmbclient_testargs
, "samba4.%s.%s" % (t
, proto
))
368 plansmbtorture4testsuite("raw.qfileinfo.ipc", "ad_dc_ntvfs", '//$SERVER/ipc\$ -U$USERNAME%$PASSWORD')
370 for t
in smbtorture4_testsuites("rap."):
371 plansmbtorture4testsuite(t
, "ad_dc_ntvfs", '//$SERVER/IPC\$ -U$USERNAME%$PASSWORD')
373 # Tests against the NTVFS CIFS backend
375 plansmbtorture4testsuite(t
, "ad_dc_ntvfs", ['//$NETBIOSNAME/cifs', '-U$USERNAME%$PASSWORD', '--kerberos=yes'] + ntvfsargs
, modname
="samba4.ntvfs.cifs.krb5.%s" % t
)
377 # Test NTVFS CIFS backend with S4U2Self and S4U2Proxy
379 plansmbtorture4testsuite(t
, "ad_dc_ntvfs", ['//$NETBIOSNAME/cifs', '-U$USERNAME%$PASSWORD', '--kerberos=no'] + ntvfsargs
, "samba4.ntvfs.cifs.ntlm.%s" % t
)
380 plansmbtorture4testsuite(t
, "rpc_proxy", ['//$NETBIOSNAME/cifs_to_dc', '-U$DC_USERNAME%$DC_PASSWORD', '--kerberos=yes'] + ntvfsargs
, "samba4.ntvfs.cifs.krb5.%s" % t
)
381 plansmbtorture4testsuite(t
, "rpc_proxy", ['//$NETBIOSNAME/cifs_to_dc', '-U$DC_USERNAME%$DC_PASSWORD', '--kerberos=no'] + ntvfsargs
, "samba4.ntvfs.cifs.ntlm.%s" % t
)
383 plansmbtorture4testsuite('echo.udp', 'ad_dc_ntvfs:local', '//$SERVER/whatever')
386 for t
in smbtorture4_testsuites("local."):
387 # The local.resolve test needs a name to look up using real system (not emulated) name routines
388 plansmbtorture4testsuite(t
, "none", "ncalrpc:localhost")
390 # Confirm these tests with the system iconv too
391 for t
in ["local.convert_string_handle", "local.convert_string", "local.ndr"]:
392 options
= "ncalrpc: --option='iconv:use_builtin_handlers=false'"
393 plansmbtorture4testsuite(t
, "none", options
,
394 modname
="samba4.%s.system.iconv" % t
)
396 tdbtorture4
= binpath("tdbtorture")
397 if os
.path
.exists(tdbtorture4
):
398 plantestsuite("tdb.stress", "none", valgrindify(tdbtorture4
))
400 skiptestsuite("tdb.stress", "Using system TDB, tdbtorture not available")
402 plansmbtorture4testsuite("drs.unit", "none", "ncalrpc:")
405 for f
in sorted(os
.listdir(os
.path
.join(samba4srcdir
, "../pidl/tests"))):
406 if f
.endswith(".pl"):
407 planperltestsuite("pidl.%s" % f
[:-3], os
.path
.normpath(os
.path
.join(samba4srcdir
, "../pidl/tests", f
)))
410 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'])
411 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'])
412 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'])
414 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'])
416 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'])
417 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'])
419 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'])
421 for t
in smbtorture4_testsuites("dns_internal."):
422 plansmbtorture4testsuite(t
, "ad_dc_default:local", '//$SERVER/whavever')
425 for t
in smbtorture4_testsuites("dlz_bind9."):
426 # The dlz_bind9 tests needs to look at the DNS database
427 plansmbtorture4testsuite(t
, "chgdcpass:local", ["ncalrpc:$SERVER", '-U$USERNAME%$PASSWORD'])
429 planpythontestsuite("nt4_dc", "samba.tests.libsmb")
432 # tests that interact directly with the command-line tools rather than using
433 # the API. These mainly test that the various command-line options of commands
436 for env
in ["ad_member", "s4member", "ad_dc_ntvfs", "chgdcpass"]:
437 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
])
439 plantestsuite("samba4.blackbox.samba_tool(ad_dc_default:local)", "ad_dc_default:local", [os
.path
.join(samba4srcdir
, "utils/tests/test_samba_tool.sh"), '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', '$DOMAIN', smbclient4
])
440 plantestsuite("samba4.blackbox.net_rpc_user(ad_dc)", "ad_dc", [os
.path
.join(bbdir
, "test_net_rpc_user.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$DOMAIN'])
442 plantestsuite("samba4.blackbox.test_primary_group", "ad_dc:local", [os
.path
.join(bbdir
, "test_primary_group.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$DOMAIN', '$PREFIX_ABS'])
444 if have_heimdal_support
:
445 for env
in ["ad_dc_ntvfs", "ad_dc"]:
446 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
])
447 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
])
448 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
])
449 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
])
450 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
])
451 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"])
452 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"])
453 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
])
454 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"])
456 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
])
457 plantestsuite("samba4.blackbox.kinit(fl2000dc:local)", "fl2000dc:local", [os
.path
.join(bbdir
, "test_kinit_mit.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', '$PREFIX', smbclient4
, configuration
])
458 plantestsuite("samba4.blackbox.kinit(fl2008r2dc:local)", "fl2008r2dc:local", [os
.path
.join(bbdir
, "test_kinit_mit.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', '$PREFIX', smbclient4
, configuration
])
459 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"])
460 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"])
461 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
])
462 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"])
464 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'])
465 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'])
466 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'])
467 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'])
469 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"])
470 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"])
471 plantestsuite("samba4.blackbox.trust_token", "fl2008r2dc", [os
.path
.join(bbdir
, "test_trust_token.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', '$DOMSID', '$TRUST_USERNAME', '$TRUST_PASSWORD', '$TRUST_REALM', '$TRUST_DOMAIN', '$TRUST_DOMSID', 'forest'])
472 plantestsuite("samba4.blackbox.trust_token", "fl2003dc", [os
.path
.join(bbdir
, "test_trust_token.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', '$DOMSID', '$TRUST_USERNAME', '$TRUST_PASSWORD', '$TRUST_REALM', '$TRUST_DOMAIN', '$TRUST_DOMSID', 'external'])
473 plantestsuite("samba4.blackbox.ktpass(ad_dc_ntvfs)", "ad_dc_ntvfs", [os
.path
.join(bbdir
, "test_ktpass.sh"), '$PREFIX/ad_dc_ntvfs'])
474 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"])
475 plantestsuite("samba4.blackbox.trust_user_account", "fl2008r2dc:local", [os
.path
.join(bbdir
, "test_trust_user_account.sh"), '$PREFIX', '$REALM', '$DOMAIN', '$TRUST_REALM', '$TRUST_DOMAIN'])
476 plantestsuite("samba4.blackbox.cifsdd(ad_dc_ntvfs)", "ad_dc_ntvfs", [os
.path
.join(samba4srcdir
, "client/tests/test_cifsdd.sh"), '$SERVER', '$USERNAME', '$PASSWORD', "$DOMAIN"])
477 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
])
478 plantestsuite("samba4.blackbox.locktest(ad_dc_ntvfs)", "ad_dc_ntvfs", [os
.path
.join(samba4srcdir
, "torture/tests/test_locktest.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$DOMAIN', '$PREFIX'])
479 plantestsuite("samba4.blackbox.masktest", "ad_dc_ntvfs", [os
.path
.join(samba4srcdir
, "torture/tests/test_masktest.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$DOMAIN', '$PREFIX'])
480 plantestsuite("samba4.blackbox.gentest(ad_dc_ntvfs)", "ad_dc_ntvfs", [os
.path
.join(samba4srcdir
, "torture/tests/test_gentest.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$DOMAIN', "$PREFIX"])
481 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
])
482 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
])
483 plantestsuite("samba4.blackbox.samba_upgradedns(chgdcpass:local)", "chgdcpass:local", [os
.path
.join(bbdir
, "test_samba_upgradedns.sh"), '$SERVER', '$REALM', '$PREFIX', '$SELFTEST_PREFIX/chgdcpass'])
484 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'])
485 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'])
486 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'])
487 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'])
488 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'])
489 plantestsuite("samba4.blackbox.samba-tool_ntacl(ad_member:local)", "ad_member:local", [os
.path
.join(bbdir
, "test_samba-tool_ntacl.sh"), '$PREFIX'])
490 plantestsuite_loadlist("samba4.rpc.echo against NetBIOS alias", "ad_dc_ntvfs", [valgrindify(smbtorture4
), "$LISTOPT", "$LOADLIST", 'ncacn_np:$NETBIOSALIAS', '-U$DOMAIN/$USERNAME%$PASSWORD', 'rpc.echo'])
491 # json tests hook into ``chgdcpass'' to make them run in contributor CI on
493 planpythontestsuite("chgdcpass", "samba.tests.blackbox.netads_json")
495 # Tests using the "Simple" NTVFS backend
496 for t
in ["base.rw1"]:
497 plansmbtorture4testsuite(t
, "ad_dc_ntvfs", ["//$SERVER/simple", '-U$USERNAME%$PASSWORD'], modname
="samba4.ntvfs.simple.%s" % t
)
499 # Domain S4member Tests
500 plansmbtorture4testsuite('rpc.echo', "s4member", ['ncacn_np:$NETBIOSNAME', '-U$NETBIOSNAME/$USERNAME%$PASSWORD'], "samba4.rpc.echo against s4member server with local creds")
501 plansmbtorture4testsuite('rpc.echo', "s4member", ['ncacn_np:$NETBIOSNAME', '-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'], "samba4.rpc.echo against s4member server with domain creds")
502 plansmbtorture4testsuite('rpc.samr', "s4member", ['ncacn_np:$NETBIOSNAME', '-U$NETBIOSNAME/$USERNAME%$PASSWORD'], "samba4.rpc.samr against s4member server with local creds")
503 plansmbtorture4testsuite('rpc.samr.users', "s4member", ['ncacn_np:$NETBIOSNAME', '-U$NETBIOSNAME/$USERNAME%$PASSWORD'], "samba4.rpc.samr.users against s4member server with local creds",)
504 plansmbtorture4testsuite('rpc.samr.passwords', "s4member", ['ncacn_np:$NETBIOSNAME', '-U$NETBIOSNAME/$USERNAME%$PASSWORD'], "samba4.rpc.samr.passwords against s4member server with local creds")
505 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
])
508 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")
513 "-k no --option=clientusespnego=no",
514 "-k no --option=gensec:spengo=no",
516 "-k yes --option=gensec:fake_gssapi_krb5=yes --option=gensec:gssapi_krb5=no"]:
517 for signing
in ["--signing=on", "--signing=required"]:
518 signoptions
= "%s %s" % (mech
, signing
)
519 name
= "smb.signing on with %s" % signoptions
520 plansmbtorture4testsuite('base.xcopy', "ad_dc_ntvfs", ['//$NETBIOSNAME/xcopy_share', signoptions
, '-U$USERNAME%$PASSWORD'], modname
="samba4.%s" % name
)
524 "-k no --option=clientusespnego=no",
525 "-k no --option=gensec:spengo=no",
527 signoptions
= "%s --signing=off" % mech
528 name
= "smb.signing disabled on with %s" % signoptions
529 plansmbtorture4testsuite('base.xcopy', "s4member", ['//$NETBIOSNAME/xcopy_share', signoptions
, '-U$DC_USERNAME%$DC_PASSWORD'], "samba4.%s domain-creds" % name
)
530 plansmbtorture4testsuite('base.xcopy', "ad_member", ['//$NETBIOSNAME/xcopy_share', signoptions
, '-U$DC_USERNAME%$DC_PASSWORD'], "samba4.%s domain-creds" % name
)
531 plansmbtorture4testsuite('base.xcopy', "ad_dc", ['//$NETBIOSNAME/xcopy_share', signoptions
, '-U$USERNAME%$PASSWORD'], "samba4.%s" % name
)
532 plansmbtorture4testsuite('base.xcopy', "ad_dc",
533 ['//$NETBIOSNAME/xcopy_share', signoptions
, '-U$DC_USERNAME%$DC_PASSWORD'], "samba4.%s administrator" % name
)
535 plantestsuite("samba4.blackbox.bogusdomain", "ad_member", ["testprogs/blackbox/bogus.sh", "$NETBIOSNAME", "xcopy_share", '$USERNAME', '$PASSWORD', '$DC_USERNAME', '$DC_PASSWORD', smbclient4
])
538 "-k no --option=clientusespnego=no",
539 "-k no --option=gensec:spengo=no"]:
540 signoptions
= "%s --signing=off" % mech
541 plansmbtorture4testsuite('base.xcopy', "s4member", ['//$NETBIOSNAME/xcopy_share', signoptions
, '-U$NETBIOSNAME/$USERNAME%$PASSWORD'], modname
="samba4.smb.signing on with %s local-creds" % signoptions
)
543 plansmbtorture4testsuite('base.xcopy', "ad_dc_ntvfs", ['//$NETBIOSNAME/xcopy_share', '-k', 'no', '--signing=yes', '-U%'], modname
="samba4.smb.signing --signing=yes anon")
544 plansmbtorture4testsuite('base.xcopy', "ad_dc_ntvfs", ['//$NETBIOSNAME/xcopy_share', '-k', 'no', '--signing=required', '-U%'], modname
="samba4.smb.signing --signing=required anon")
545 plansmbtorture4testsuite('base.xcopy', "s4member", ['//$NETBIOSNAME/xcopy_share', '-k', 'no', '--signing=no', '-U%'], modname
="samba4.smb.signing --signing=no anon")
548 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\""]
550 winbind_ad_client_tests
= smbtorture4_testsuites("winbind.struct") + smbtorture4_testsuites("winbind.pac")
551 winbind_wbclient_tests
= smbtorture4_testsuites("winbind.wbclient")
552 for env
in ["ad_dc", "s4member", "ad_member", "nt4_member"]:
553 wb_opts
= wb_opts_default
[:]
554 if env
in ["ad_member"]:
555 wb_opts
+= ["--option=\"torture:winbindd_domain_without_prefix=$DOMAIN\""]
556 for t
in winbind_ad_client_tests
:
557 plansmbtorture4testsuite(t
, "%s:local" % env
, wb_opts
+ ['//$SERVER/tmp', '--realm=$REALM', '--machine-pass', '--option=torture:addc=$DC_SERVER'])
559 for env
in ["nt4_dc", "fl2003dc"]:
560 for t
in winbind_wbclient_tests
:
561 plansmbtorture4testsuite(t
, "%s:local" % env
, '//$SERVER/tmp -U$DC_USERNAME%$DC_PASSWORD')
563 for env
in ["nt4_dc", "nt4_member", "ad_dc", "ad_member", "s4member", "chgdcpass", "rodc"]:
564 tests
= ["--ping", "--separator",
568 "--domain-info=BUILTIN",
569 "--domain-info=$DOMAIN",
571 "--online-status --domain=BUILTIN",
572 "--online-status --domain=$DOMAIN",
573 "--check-secret --domain=$DOMAIN",
574 "--change-secret --domain=$DOMAIN",
575 "--check-secret --domain=$DOMAIN",
576 "--online-status --domain=$DOMAIN",
579 "--name-to-sid=$DC_USERNAME",
580 "--name-to-sid=$DOMAIN/$DC_USERNAME",
581 "--user-info=$DOMAIN/$DC_USERNAME",
582 "--user-groups=$DOMAIN/$DC_USERNAME",
583 "--authenticate=$DOMAIN/$DC_USERNAME%$DC_PASSWORD",
588 plantestsuite("samba.wbinfo_simple.%s" % (t
.replace(" --", ".").replace("--", "")), "%s:local" % env
, [os
.path
.join(srcdir(), "nsswitch/tests/test_wbinfo_simple.sh"), t
])
591 "samba.wbinfo_sids2xids.(%s:local)" % env
, "%s:local" % env
,
592 [os
.path
.join(samba3srcdir
, "script/tests/test_wbinfo_sids2xids.sh")])
594 planpythontestsuite(env
+ ":local", "samba.tests.ntlm_auth")
596 for env
in ["ktest"]:
597 planpythontestsuite(env
+ ":local", "samba.tests.ntlm_auth_krb5")
599 for env
in ["s4member_dflt_domain", "s4member"]:
600 for cmd
in ["id", "getent"]:
601 users
= ["$DC_USERNAME", "$DC_USERNAME@$REALM"]
602 if env
== "s4member":
603 users
= ["$DOMAIN/$DC_USERNAME", "$DC_USERNAME@$REALM"]
605 plantestsuite("samba4.winbind.dom_name_parse.cmd", env
, "%s/dom_parse.sh %s %s" % (bbdir
, cmd
, usr
))
607 nsstest4
= binpath("nsstest")
608 for env
in ["ad_dc:local", "s4member:local", "nt4_dc:local", "ad_member:local", "nt4_member:local"]:
609 if os
.path
.exists(nsstest4
):
610 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")])
612 skiptestsuite("samba.nss.test using winbind(%s)" % env
, "nsstest not available")
614 subunitrun
= valgrindify(python
) + " " + os
.path
.join(samba4srcdir
, "scripting/bin/subunitrun")
617 def planoldpythontestsuite(env
, module
, name
=None, extra_path
=[], environ
={}, extra_args
=[]):
618 environ
= dict(environ
)
619 py_path
= list(extra_path
)
621 environ
["PYTHONPATH"] = ":".join(["$PYTHONPATH"] + py_path
)
622 args
= ["%s=%s" % item
for item
in environ
.items()]
623 args
+= [subunitrun
, "$LISTOPT", "$LOADLIST", module
]
627 plantestsuite_loadlist(name
, env
, args
)
629 # Run complex search expressions test once for each database backend.
630 # Right now ad_dc has mdb and ad_dc_ntvfs has tdb
631 mdb_testenv
= "ad_dc"
632 tdb_testenv
= "ad_dc_ntvfs"
633 for testenv
in [mdb_testenv
, tdb_testenv
]:
634 planoldpythontestsuite(testenv
, "samba.tests.complex_expressions", extra_args
=['-U"$USERNAME%$PASSWORD"'])
636 planoldpythontestsuite("ad_dc_default:local", "samba.tests.gensec", extra_args
=['-U"$USERNAME%$PASSWORD"'])
637 planoldpythontestsuite("none", "simple", extra_path
=["%s/lib/tdb/python/tests" % srcdir()], name
="tdb.python")
638 planpythontestsuite("ad_dc_default:local", "samba.tests.dcerpc.sam")
639 planpythontestsuite("ad_dc_default:local", "samba.tests.dsdb")
640 planpythontestsuite("none", "samba.tests.dsdb_lock")
641 planpythontestsuite("ad_dc_default:local", "samba.tests.dcerpc.bare")
642 planpythontestsuite("ad_dc_default:local", "samba.tests.dcerpc.unix")
643 planpythontestsuite("ad_dc_default:local", "samba.tests.dcerpc.srvsvc")
644 planpythontestsuite("ad_dc_default:local", "samba.tests.samba_tool.timecmd")
645 planpythontestsuite("ad_dc_default:local", "samba.tests.samba_tool.join")
647 planpythontestsuite("none", "samba.tests.samba_tool.visualize")
651 for env
in all_fl_envs
:
652 planpythontestsuite(env
+ ":local", "samba.tests.samba_tool.fsmo")
655 for env
in all_fl_envs
:
657 plantestsuite("samba.tests.samba_tool.edit", env
, [os
.path
.join(srcdir(), "python/samba/tests/samba_tool/edit.sh"), '$SERVER', '$USERNAME', '$PASSWORD'])
659 # We run this test against both AD DC implementations because it is
660 # the only test we have of GPO get/set behaviour, and this involves
661 # the file server as well as the LDAP server.
662 # It's also a good sanity-check that sysvol backup worked correctly.
663 for env
in ["ad_dc_ntvfs", "ad_dc", "offlinebackupdc", "renamedc",
664 smbv1_disabled_testenv
]:
665 planpythontestsuite(env
+ ":local", "samba.tests.samba_tool.gpo")
667 planpythontestsuite("ad_dc_default:local", "samba.tests.samba_tool.processes")
668 planpythontestsuite("ad_dc_default:local", "samba.tests.samba_tool.user")
669 planpythontestsuite("ad_dc_default:local", "samba.tests.samba_tool.user_wdigest")
670 planpythontestsuite("ad_dc:local", "samba.tests.samba_tool.user")
671 planpythontestsuite("ad_dc:local", "samba.tests.samba_tool.user_virtualCryptSHA")
672 planpythontestsuite("chgdcpass:local", "samba.tests.samba_tool.user_check_password_script")
673 planpythontestsuite("ad_dc_default:local", "samba.tests.samba_tool.group")
674 planpythontestsuite("ad_dc_default:local", "samba.tests.samba_tool.ou")
675 planpythontestsuite("ad_dc_default:local", "samba.tests.samba_tool.computer")
676 planpythontestsuite("ad_dc_default:local", "samba.tests.samba_tool.forest")
677 planpythontestsuite("ad_dc_default:local", "samba.tests.samba_tool.schema")
678 planpythontestsuite("schemaupgrade_dc:local", "samba.tests.samba_tool.schema")
679 planpythontestsuite("ad_dc:local", "samba.tests.samba_tool.ntacl")
680 planpythontestsuite("none", "samba.tests.samba_tool.provision_password_check")
681 planpythontestsuite("none", "samba.tests.samba_tool.help")
682 planpythontestsuite("ad_dc_default:local", "samba.tests.samba_tool.passwordsettings")
683 planpythontestsuite("ad_dc:local", "samba.tests.samba_tool.dsacl")
685 # Run these against chgdcpass to share the runtime load
686 planpythontestsuite("chgdcpass:local", "samba.tests.samba_tool.sites")
687 planpythontestsuite("chgdcpass:local", "samba.tests.samba_tool.dnscmd")
689 # Run this against chgdcpass to ensure at least one python3 test
690 # against this autobuild target (samba-ad-dc-2)
691 planpythontestsuite("chgdcpass:local", "samba.tests.dcerpc.rpcecho")
693 planoldpythontestsuite("nt4_dc", "samba.tests.netbios", extra_args
=['-U"$USERNAME%$PASSWORD"'])
694 planoldpythontestsuite("ad_dc:local", "samba.tests.gpo", extra_args
=['-U"$USERNAME%$PASSWORD"'])
695 planoldpythontestsuite("ad_dc:local", "samba.tests.dckeytab", extra_args
=['-U"$USERNAME%$PASSWORD"'])
697 for env
in ["ad_dc", smbv1_disabled_testenv
]:
698 planoldpythontestsuite(env
, "samba.tests.smb", extra_args
=['-U"$USERNAME%$PASSWORD"'])
699 planoldpythontestsuite(env
+ ":local", "samba.tests.ntacls_backup",
700 extra_args
=['-U"$USERNAME%$PASSWORD"'])
702 planoldpythontestsuite(
703 "ad_dc_ntvfs:local", "samba.tests.dcerpc.registry",
704 extra_args
=['-U"$USERNAME%$PASSWORD"'])
706 planoldpythontestsuite("ad_dc_ntvfs", "samba.tests.dcerpc.dnsserver", extra_args
=['-U"$USERNAME%$PASSWORD"'])
707 planoldpythontestsuite("ad_dc", "samba.tests.dcerpc.dnsserver", extra_args
=['-U"$USERNAME%$PASSWORD"'])
708 planoldpythontestsuite("chgdcpass", "samba.tests.dcerpc.raw_protocol",
709 environ
={'MAX_NUM_AUTH': '8'})
711 if have_heimdal_support
:
712 planoldpythontestsuite("ad_dc:local", "samba.tests.auth_log", extra_args
=['-U"$USERNAME%$PASSWORD"'],
713 environ
={'CLIENT_IP': '127.0.0.11',
714 'SOCKET_WRAPPER_DEFAULT_IFACE': 11})
715 planoldpythontestsuite("ad_dc_ntvfs:local", "samba.tests.auth_log", extra_args
=['-U"$USERNAME%$PASSWORD"'],
716 environ
={'CLIENT_IP': '127.0.0.11',
717 'SOCKET_WRAPPER_DEFAULT_IFACE': 11})
718 planoldpythontestsuite("ad_dc", "samba.tests.auth_log_pass_change",
719 extra_args
=['-U"$USERNAME%$PASSWORD"'])
720 planoldpythontestsuite("ad_dc_ntvfs", "samba.tests.auth_log_pass_change",
721 extra_args
=['-U"$USERNAME%$PASSWORD"'])
723 # these tests use a NCA local RPC connection, so always run on the
724 # :local testenv, and so don't need to fake a client connection
725 for env
in ["ad_dc_ntvfs:local", "ad_dc:local"]:
726 planoldpythontestsuite(env
, "samba.tests.auth_log_ncalrpc", extra_args
=['-U"$USERNAME%$PASSWORD"'])
727 planoldpythontestsuite(env
, "samba.tests.auth_log_samlogon",
728 extra_args
=['-U"$USERNAME%$PASSWORD"'])
729 planoldpythontestsuite(env
, "samba.tests.auth_log_netlogon",
730 extra_args
=['-U"$USERNAME%$PASSWORD"'])
731 planoldpythontestsuite(env
, "samba.tests.auth_log_netlogon_bad_creds",
732 extra_args
=['-U"$USERNAME%$PASSWORD"'])
734 planoldpythontestsuite("ad_member:local",
735 "samba.tests.auth_log_winbind",
736 extra_args
=['-U"$DC_USERNAME%$DC_PASSWORD"'])
737 planoldpythontestsuite("ad_dc", "samba.tests.audit_log_pass_change",
738 extra_args
=['-U"$USERNAME%$PASSWORD"'])
739 planoldpythontestsuite("ad_dc", "samba.tests.audit_log_dsdb",
740 extra_args
=['-U"$USERNAME%$PASSWORD"'])
741 planoldpythontestsuite("ad_dc", "samba.tests.group_audit",
742 extra_args
=['-U"$USERNAME%$PASSWORD"'])
744 planoldpythontestsuite("fl2008r2dc:local",
745 "samba.tests.getdcname",
746 extra_args
=['-U"$USERNAME%$PASSWORD"'])
748 planoldpythontestsuite("ad_dc",
749 "samba.tests.net_join_no_spnego",
750 extra_args
=['-U"$USERNAME%$PASSWORD"'])
751 planoldpythontestsuite("ad_dc",
752 "samba.tests.net_join",
753 extra_args
=['-U"$USERNAME%$PASSWORD"'])
754 planoldpythontestsuite("ad_dc",
755 "samba.tests.segfault",
756 extra_args
=['-U"$USERNAME%$PASSWORD"'])
757 # Need to test the password hashing in multiple environments to ensure that
758 # all the possible options are covered
760 # ad_dc:local functional_level >= 2008, gpg keys available
761 planoldpythontestsuite("ad_dc:local",
762 "samba.tests.password_hash_gpgme",
763 extra_args
=['-U"$USERNAME%$PASSWORD"'])
764 # ad_dc_ntvfs:local functional level >= 2008, gpg keys not available
765 planoldpythontestsuite("ad_dc_ntvfs:local",
766 "samba.tests.password_hash_fl2008",
767 extra_args
=['-U"$USERNAME%$PASSWORD"'])
768 # fl2003dc:local functional level < 2008, gpg keys not available
769 planoldpythontestsuite("fl2003dc:local",
770 "samba.tests.password_hash_fl2003",
771 extra_args
=['-U"$USERNAME%$PASSWORD"'])
772 # ad_dc: wDigest values over ldap
773 planoldpythontestsuite("ad_dc",
774 "samba.tests.password_hash_ldap",
775 extra_args
=['-U"$USERNAME%$PASSWORD"'])
777 for env
in ["ad_dc_backup", smbv1_disabled_testenv
]:
778 planoldpythontestsuite(env
+ ":local", "samba.tests.domain_backup",
779 extra_args
=['-U"$USERNAME%$PASSWORD"'])
781 planoldpythontestsuite("none",
782 "samba.tests.domain_backup_offline")
784 # ensure default provision (ad_dc) and join (vampire_dc)
785 # encrypt secret values on disk.
786 planoldpythontestsuite("ad_dc:local",
787 "samba.tests.encrypted_secrets",
788 extra_args
=['-U"$USERNAME%$PASSWORD"'])
789 planoldpythontestsuite("vampire_dc:local",
790 "samba.tests.encrypted_secrets",
791 extra_args
=['-U"$USERNAME%$PASSWORD"'])
792 # The fl2000dc environment is provisioned with the --plaintext_secrets option
793 # so this test will fail, which proves the secrets are not being encrypted.
794 # There is an entry in known_fail.d.
795 planoldpythontestsuite("fl2000dc:local",
796 "samba.tests.encrypted_secrets",
797 extra_args
=['-U"$USERNAME%$PASSWORD"'])
799 planpythontestsuite("none",
800 "samba.tests.lsa_string")
802 planoldpythontestsuite("ad_dc_ntvfs",
803 "samba.tests.krb5_credentials",
804 extra_args
=['-U"$USERNAME%$PASSWORD"'])
806 for env
in ["ad_dc_ntvfs", "vampire_dc", "promoted_dc"]:
807 planoldpythontestsuite(env
,
808 "samba.tests.py_credentials",
809 extra_args
=['-U"$USERNAME%$PASSWORD"'])
810 planoldpythontestsuite("ad_dc_ntvfs",
811 "samba.tests.emulate.traffic",
812 extra_args
=['-U"$USERNAME%$PASSWORD"'])
813 planoldpythontestsuite("ad_dc_ntvfs",
814 "samba.tests.emulate.traffic_packet",
815 extra_args
=['-U"$USERNAME%$PASSWORD"'])
816 planoldpythontestsuite("ad_dc_ntvfs",
817 "samba.tests.blackbox.traffic_replay",
818 extra_args
=['-U"$USERNAME%$PASSWORD"'])
819 planoldpythontestsuite("ad_dc_ntvfs",
820 "samba.tests.blackbox.traffic_learner",
821 extra_args
=['-U"$USERNAME%$PASSWORD"'])
822 planoldpythontestsuite("ad_dc_ntvfs",
823 "samba.tests.blackbox.traffic_summary",
824 extra_args
=['-U"$USERNAME%$PASSWORD"'])
825 planoldpythontestsuite("none", "samba.tests.loadparm")
828 # Want a selection of environments across the process models
830 for env
in ["ad_dc_ntvfs:local", "ad_dc:local",
831 "fl2003dc:local", "fl2008r2dc:local",
832 "promoted_dc:local"]:
833 planoldpythontestsuite(env
, "samba.tests.blackbox.smbcontrol")
835 plantestsuite_loadlist("samba4.ldap.python(ad_dc_default)", "ad_dc_default", [python
, os
.path
.join(samba4srcdir
, "dsdb/tests/python/ldap.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
836 plantestsuite_loadlist("samba4.tokengroups.krb5.python(ad_dc_default)", "ad_dc_default:local", [python
, os
.path
.join(samba4srcdir
, "dsdb/tests/python/token_group.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '-k', 'yes', '$LOADLIST', '$LISTOPT'])
837 plantestsuite_loadlist("samba4.tokengroups.ntlm.python(ad_dc_default)", "ad_dc_default:local", [python
, os
.path
.join(samba4srcdir
, "dsdb/tests/python/token_group.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '-k', 'no', '$LOADLIST', '$LISTOPT'])
838 plantestsuite("samba4.sam.python(fl2008r2dc)", "fl2008r2dc", [python
, os
.path
.join(samba4srcdir
, "dsdb/tests/python/sam.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN'])
839 plantestsuite("samba4.sam.python(ad_dc_default)", "ad_dc_default", [python
, os
.path
.join(samba4srcdir
, "dsdb/tests/python/sam.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN'])
840 plantestsuite("samba4.user_account_control.python(ad_dc_default)", "ad_dc_default", [python
, os
.path
.join(samba4srcdir
, "dsdb/tests/python/user_account_control.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN'])
842 for env
in ['ad_dc_default:local', 'schemaupgrade_dc:local']:
843 planoldpythontestsuite(env
, "dsdb_schema_info",
844 extra_path
=[os
.path
.join(samba4srcdir
, 'dsdb/tests/python')],
845 name
="samba4.schemaInfo.python(%s)" % (env
),
846 extra_args
=['-U"$DOMAIN/$DC_USERNAME%$DC_PASSWORD"'])
848 planpythontestsuite(env
, "samba.tests.dsdb_schema_attributes")
850 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'])
851 plantestsuite_loadlist("samba4.ldap.dirsync.python(ad_dc_default)", "ad_dc_default", [python
, os
.path
.join(samba4srcdir
, "dsdb/tests/python/dirsync.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
852 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'])
853 plantestsuite("samba4.ldap.index.python", "none", [python
, os
.path
.join(srcdir(), "lib/ldb-samba/tests/index.py")])
854 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'])
855 plantestsuite_loadlist("samba4.ldap.sites.python(ad_dc_default)", "ad_dc_default", [python
, os
.path
.join(samba4srcdir
, "dsdb/tests/python/sites.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
857 planoldpythontestsuite("ad_dc_default", "sort", environ
={'SERVER' : '$SERVER', 'DATA_DIR' : os
.path
.join(samba4srcdir
, 'dsdb/tests/python/testdata/')}, name
="samba4.ldap.sort.python", extra_path
=[os
.path
.join(samba4srcdir
, 'dsdb/tests/python')], extra_args
=['-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN'])
859 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'])
861 plantestsuite_loadlist("samba4.ldap.subtree_rename.python(ad_dc_ntvfs)",
863 [python
, os
.path
.join(samba4srcdir
,
864 "dsdb/tests/python/subtree_rename.py"),
865 '$PREFIX_ABS/ad_dc_ntvfs/private/sam.ldb',
866 '-U"$USERNAME%$PASSWORD"',
867 '--workgroup=$DOMAIN',
872 # These should be the first tests run against testenvs created by backup/restore
873 for env
in ['offlinebackupdc', 'restoredc', 'renamedc', 'labdc']:
874 # check that a restored DC matches the original DC (backupfromdc)
875 plantestsuite("samba4.blackbox.ldapcmp_restore", env
,
876 ["PYTHON=%s" % python
,
877 os
.path
.join(bbdir
, "ldapcmp_restoredc.sh"),
878 '$PREFIX_ABS/backupfromdc', '$PREFIX_ABS/%s' % env
])
880 # we also test joining backupfromdc here, as it's a bit special in that it
881 # doesn't have Default-First-Site-Name
882 for env
in ['backupfromdc', 'offlinebackupdc', 'restoredc', 'renamedc',
884 # basic test that we can join the testenv DC
885 plantestsuite("samba4.blackbox.join_ldapcmp", env
,
886 ["PYTHON=%s" % python
, os
.path
.join(bbdir
, "join_ldapcmp.sh")])
888 plantestsuite_loadlist("samba4.ldap.rodc.python(rodc)", "rodc",
890 os
.path
.join(samba4srcdir
, "dsdb/tests/python/rodc.py"),
891 '$SERVER', '-U"$USERNAME%$PASSWORD"',
892 '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
894 plantestsuite_loadlist("samba4.ldap.rodc_rwdc.python(rodc)", "rodc:local",
896 os
.path
.join(samba4srcdir
,
897 "dsdb/tests/python/rodc_rwdc.py"),
898 '$SERVER', '$DC_SERVER', '-U"$USERNAME%$PASSWORD"',
899 '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
901 planoldpythontestsuite("rodc:local", "replica_sync_rodc",
902 extra_path
=[os
.path
.join(samba4srcdir
, 'torture/drs/python')],
903 name
="samba4.drs.replica_sync_rodc.python(rodc)",
904 environ
={'DC1': '$DC_SERVER', 'DC2': '$SERVER'},
905 extra_args
=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
907 planoldpythontestsuite("ad_dc_default", "password_settings",
908 extra_path
=[os
.path
.join(samba4srcdir
, 'dsdb/tests/python')],
909 name
="samba4.ldap.passwordsettings.python",
910 extra_args
=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
912 for env
in all_fl_envs
+ ["schemaupgrade_dc"]:
913 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'])
914 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"])
915 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'])
916 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'])
917 if env
!= "fl2000dc":
918 # This test makes excessive use of the "userPassword" attribute which
919 # isn't available on DCs with Windows 2000 domain function level -
920 # therefore skip it in that configuration
921 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'])
923 for env
in ["ad_dc_slowtests"]:
924 # This test takes a lot of time, so we run it against a minimum of
925 # environments, please only add new ones if there's really a
926 # difference we need to test
927 plantestsuite_loadlist("samba4.ldap.vlv.python(%s)" % env
, env
, [python
, os
.path
.join(samba4srcdir
, "dsdb/tests/python/vlv.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
928 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'])
929 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'])
930 planoldpythontestsuite(env
, "tombstone_reanimation",
931 name
="samba4.tombstone_reanimation.python",
932 environ
={'TEST_SERVER': '$SERVER', 'TEST_USERNAME': '$USERNAME', 'TEST_PASSWORD': '$PASSWORD'},
933 extra_path
=[os
.path
.join(samba4srcdir
, 'dsdb/tests/python')]
935 planoldpythontestsuite(env
, "samba.tests.join",
936 name
="samba.tests.join.python(%s)" % env
,
937 extra_args
=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
939 # this is a basic sanity-check of Kerberos/NTLM user login
940 for env
in ["offlinebackupdc", "restoredc", "renamedc", "labdc"]:
941 plantestsuite_loadlist("samba4.ldap.login_basics.python(%s)" % env
, env
,
942 [python
, os
.path
.join(samba4srcdir
, "dsdb/tests/python/login_basics.py"),
943 "$SERVER", '-U"$USERNAME%$PASSWORD"', "-W$DOMAIN", "--realm=$REALM",
944 '$LOADLIST', '$LISTOPT'])
946 planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.upgradeprovisionneeddc")
947 planpythontestsuite("ad_dc:local", "samba.tests.posixacl")
948 planpythontestsuite("ad_dc_no_nss:local", "samba.tests.posixacl")
949 plantestsuite_loadlist("samba4.deletetest.python(ad_dc_default)", "ad_dc_default", [python
, os
.path
.join(samba4srcdir
, "dsdb/tests/python/deletetest.py"),
950 '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
951 plantestsuite("samba4.blackbox.samba3dump", "none", [os
.path
.join(samba4srcdir
, "selftest/test_samba3dump.sh")])
952 plantestsuite("samba4.blackbox.upgrade", "none", ["PYTHON=%s" % python
, os
.path
.join(samba4srcdir
, "setup/tests/blackbox_s3upgrade.sh"), '$PREFIX/provision'])
953 plantestsuite("samba4.blackbox.provision.py", "none", ["PYTHON=%s" % python
, os
.path
.join(samba4srcdir
, "setup/tests/blackbox_provision.sh"), '$PREFIX/provision'])
954 plantestsuite("samba4.blackbox.provision_fileperms", "none", ["PYTHON=%s" % python
, os
.path
.join(samba4srcdir
, "setup/tests/provision_fileperms.sh"), '$PREFIX/provision'])
955 plantestsuite("samba4.blackbox.supported_features", "none",
956 ["PYTHON=%s" % python
,
957 os
.path
.join(samba4srcdir
,
958 "setup/tests/blackbox_supported_features.sh"),
959 '$PREFIX/provision'])
960 plantestsuite("samba4.blackbox.start_backup", "none",
961 ["PYTHON=%s" % python
,
962 os
.path
.join(samba4srcdir
,
963 "setup/tests/blackbox_start_backup.sh"),
964 '$PREFIX/provision'])
965 plantestsuite("samba4.blackbox.upgradeprovision.current", "none", ["PYTHON=%s" % python
, os
.path
.join(samba4srcdir
, "setup/tests/blackbox_upgradeprovision.sh"), '$PREFIX/provision'])
966 plantestsuite("samba4.blackbox.setpassword.py", "none", ["PYTHON=%s" % python
, os
.path
.join(samba4srcdir
, "setup/tests/blackbox_setpassword.sh"), '$PREFIX/provision'])
967 plantestsuite("samba4.blackbox.newuser.py", "none", ["PYTHON=%s" % python
, os
.path
.join(samba4srcdir
, "setup/tests/blackbox_newuser.sh"), '$PREFIX/provision'])
968 plantestsuite("samba4.blackbox.group.py", "none", ["PYTHON=%s" % python
, os
.path
.join(samba4srcdir
, "setup/tests/blackbox_group.sh"), '$PREFIX/provision'])
969 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'])
970 plantestsuite_loadlist("samba4.ldap.bind(fl2008r2dc)", "fl2008r2dc", [python
, os
.path
.join(srcdir(), "auth/credentials/tests/bind.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '$LOADLIST', '$LISTOPT'])
972 # This makes sure we test the rid allocation code
973 t
= "rpc.samr.large-dc"
974 plansmbtorture4testsuite(t
, "vampire_dc", ['$SERVER', '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], modname
=("samba4.%s.one" % t
))
975 plansmbtorture4testsuite(t
, "vampire_dc", ['$SERVER', '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], modname
="samba4.%s.two" % t
)
977 # RPC smoke-tests for testenvs of interest (RODC, etc)
978 for env
in ['rodc', 'offlinebackupdc', 'restoredc', 'renamedc', 'labdc']:
979 plansmbtorture4testsuite('rpc.echo', env
, ['ncacn_np:$SERVER', "-k", "yes", '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], modname
="samba4.rpc.echo")
980 plansmbtorture4testsuite('rpc.echo', "%s:local" % env
, ['ncacn_np:$SERVER', "-k", "yes", '-P', '--workgroup=$DOMAIN'], modname
="samba4.rpc.echo")
981 plansmbtorture4testsuite('rpc.echo', "%s:local" % env
, ['ncacn_np:$SERVER', "-k", "no", '-Utestallowed\ account%$DC_PASSWORD', '--workgroup=$DOMAIN'], modname
="samba4.rpc.echo.testallowed")
982 plansmbtorture4testsuite('rpc.echo', "%s:local" % env
, ['ncacn_np:$SERVER', "-k", "no", '-Utestdenied%$DC_PASSWORD', '--workgroup=$DOMAIN'], modname
="samba4.rpc.echo.testdenied")
983 plantestsuite("samba4.blackbox.smbclient(%s:local)" % env
, "%s:local" % env
, [os
.path
.join(samba4srcdir
, "utils/tests/test_smbclient.sh"), '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', '$DOMAIN', binpath('smbclient')])
985 planpythontestsuite("rodc:local", "samba.tests.samba_tool.rodc")
987 plantestsuite("samba.blackbox.rpcclient_samlogon", "rodc:local", [os
.path
.join(samba3srcdir
, "script/tests/test_rpcclient_samlogon.sh"),
988 "$DC_USERNAME", "$DC_PASSWORD", "ncacn_np:$SERVER", configuration
])
990 plantestsuite("samba.blackbox.rpcclient_samlogon_testallowed", "rodc:local", [os
.path
.join(samba3srcdir
, "script/tests/test_rpcclient_samlogon.sh"),
991 "testallowed\ account", "$DC_PASSWORD", "ncacn_np:$SERVER", configuration
])
993 plantestsuite("samba.blackbox.rpcclient_samlogon_testdenied", "rodc:local", [os
.path
.join(samba3srcdir
, "script/tests/test_rpcclient_samlogon.sh"),
994 "testdenied", "$DC_PASSWORD", "ncacn_np:$SERVER", configuration
])
997 plantestsuite("samba4.blackbox.provision-backend", "none", ["PYTHON=%s" % python
, os
.path
.join(samba4srcdir
, "setup/tests/blackbox_provision-backend.sh"), '$PREFIX/provision'])
999 # Test renaming the DC
1000 plantestsuite("samba4.blackbox.renamedc.sh", "none", ["PYTHON=%s" % python
, os
.path
.join(bbdir
, "renamedc.sh"), '$PREFIX/provision'])
1003 # Note that $DC_SERVER is the PDC (e.g. ad_dc_ntvfs) and $SERVER is
1004 # the 2nd DC (e.g. vampire_dc).
1007 planoldpythontestsuite(env
, "ridalloc_exop",
1008 extra_path
=[os
.path
.join(samba4srcdir
, 'torture/drs/python')],
1009 name
="samba4.drs.ridalloc_exop.python(%s)" % env
,
1010 environ
={'DC1': "$DC_SERVER", 'DC2': '$SERVER'},
1011 extra_args
=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
1013 env
= 'schemaupgrade_pair_dc'
1014 planoldpythontestsuite("%s:local" % env
, "samba_tool_drs",
1015 extra_path
=[os
.path
.join(samba4srcdir
, 'torture/drs/python')],
1016 name
="samba4.drs.samba_tool_drs.python(%s)" % env
,
1017 environ
={'DC1': '$DC_SERVER', 'DC2': '$SERVER'},
1018 extra_args
=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
1020 for env
in ['vampire_dc', 'promoted_dc']:
1021 planoldpythontestsuite("%s:local" % env
, "samba_tool_drs",
1022 extra_path
=[os
.path
.join(samba4srcdir
, 'torture/drs/python')],
1023 name
="samba4.drs.samba_tool_drs.python(%s)" % env
,
1024 environ
={'DC1': '$DC_SERVER', 'DC2': '$SERVER'},
1025 extra_args
=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
1026 planoldpythontestsuite("%s:local" % env
, "samba_tool_drs_showrepl",
1027 extra_path
=[os
.path
.join(samba4srcdir
, 'torture/drs/python')],
1028 name
="samba4.drs.samba_tool_drs_showrepl.python(%s)" % env
,
1029 environ
={'DC1': '$DC_SERVER', 'DC2': '$SERVER'},
1030 extra_args
=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
1031 planoldpythontestsuite("%s:local" % env
, "replica_sync",
1032 extra_path
=[os
.path
.join(samba4srcdir
, 'torture/drs/python')],
1033 name
="samba4.drs.replica_sync.python(%s)" % env
,
1034 environ
={'DC1': '$DC_SERVER', 'DC2': '$SERVER'},
1035 extra_args
=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
1036 planoldpythontestsuite(env
, "delete_object",
1037 extra_path
=[os
.path
.join(samba4srcdir
, 'torture/drs/python')],
1038 name
="samba4.drs.delete_object.python(%s)" % env
,
1039 environ
={'DC1': '$DC_SERVER', 'DC2': '$SERVER'},
1040 extra_args
=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
1041 planoldpythontestsuite(env
, "fsmo",
1042 name
="samba4.drs.fsmo.python(%s)" % env
,
1043 extra_path
=[os
.path
.join(samba4srcdir
, 'torture/drs/python')],
1044 environ
={'DC1': "$DC_SERVER", 'DC2': '$SERVER'},
1045 extra_args
=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
1046 planoldpythontestsuite(env
, "repl_move",
1047 extra_path
=[os
.path
.join(samba4srcdir
, 'torture/drs/python')],
1048 name
="samba4.drs.repl_move.python(%s)" % env
,
1049 environ
={'DC1': "$DC_SERVER", 'DC2': '$SERVER'},
1050 extra_args
=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
1051 planoldpythontestsuite(env
, "getnc_exop",
1052 extra_path
=[os
.path
.join(samba4srcdir
, 'torture/drs/python')],
1053 name
="samba4.drs.getnc_exop.python(%s)" % env
,
1054 environ
={'DC1': "$DC_SERVER", 'DC2': '$SERVER'},
1055 extra_args
=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
1056 planoldpythontestsuite(env
, "getnc_unpriv",
1057 extra_path
=[os
.path
.join(samba4srcdir
, 'torture/drs/python')],
1058 name
="samba4.drs.getnc_unpriv.python(%s)" % env
,
1059 environ
={'DC1': "$DC_SERVER", 'DC2': '$SERVER'},
1060 extra_args
=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
1061 planoldpythontestsuite(env
, "linked_attributes_drs",
1062 extra_path
=[os
.path
.join(samba4srcdir
, 'torture/drs/python')],
1063 name
="samba4.drs.linked_attributes_drs.python(%s)" % env
,
1064 environ
={'DC1': "$DC_SERVER", 'DC2': '$SERVER'},
1065 extra_args
=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
1066 planoldpythontestsuite(env
, "link_conflicts",
1067 extra_path
=[os
.path
.join(samba4srcdir
, 'torture/drs/python')],
1068 name
="samba4.drs.link_conflicts.python(%s)" % env
,
1069 environ
={'DC1': "$DC_SERVER", 'DC2': '$SERVER'},
1070 extra_args
=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
1072 for env
in ['vampire_dc', 'promoted_dc', 'vampire_2000_dc']:
1073 planoldpythontestsuite(env
, "repl_schema",
1074 extra_path
=[os
.path
.join(samba4srcdir
, 'torture/drs/python')],
1075 name
="samba4.drs.repl_schema.python(%s)" % env
,
1076 environ
={'DC1': "$DC_SERVER", 'DC2': '$SERVER'},
1077 extra_args
=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
1079 # A side-effect of the getncchanges tests is that they will create hundreds of
1080 # tombstone objects, so run them last to avoid interferring with (and slowing
1081 # down) the other DRS tests
1082 for env
in ['vampire_dc', 'promoted_dc']:
1083 planoldpythontestsuite(env
, "getncchanges",
1084 extra_path
=[os
.path
.join(samba4srcdir
, 'torture/drs/python')],
1085 name
="samba4.drs.getncchanges.python(%s)" % env
,
1086 environ
={'DC1': "$DC_SERVER", 'DC2': '$SERVER'},
1087 extra_args
=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
1089 for env
in ['ad_dc_ntvfs']:
1090 planoldpythontestsuite(env
, "repl_rodc",
1091 extra_path
=[os
.path
.join(samba4srcdir
, 'torture/drs/python')],
1092 name
="samba4.drs.repl_rodc.python(%s)" % env
,
1093 environ
={'DC1': "$DC_SERVER", 'DC2': '$DC_SERVER'},
1094 extra_args
=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
1095 planoldpythontestsuite(env
, "cracknames",
1096 extra_path
=[os
.path
.join(samba4srcdir
, 'torture/drs/python')],
1097 name
="samba4.drs.cracknames.python(%s)" % env
,
1098 environ
={'DC1': "$DC_SERVER", 'DC2': '$DC_SERVER'},
1099 extra_args
=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
1101 planoldpythontestsuite("chgdcpass:local", "samba.tests.blackbox.samba_dnsupdate",
1102 environ
={'DNS_SERVER_IP': '$SERVER_IP'})
1104 for env
in ["ad_dc_ntvfs", "s4member", "rodc", "promoted_dc", "ad_dc", "ad_member"]:
1105 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
])
1111 # This test is for users cached at the RODC
1112 plansmbtorture4testsuite('krb5.kdc', "rodc", ['ncacn_np:$SERVER_IP', "-k", "yes", '-Utestdenied%$PASSWORD',
1113 '--workgroup=$DOMAIN', '--realm=$REALM',
1114 '--option=torture:krb5-upn=testdenied_upn@$REALM.upn',
1115 '--option=torture:expect_rodc=true'],
1116 "samba4.krb5.kdc with account DENIED permission to replicate to an RODC")
1117 plansmbtorture4testsuite('krb5.kdc', "rodc", ['ncacn_np:$SERVER_IP', "-k", "yes", '-Utestallowed\ account%$PASSWORD',
1118 '--workgroup=$DOMAIN', '--realm=$REALM',
1119 '--option=torture:expect_machine_account=true',
1120 '--option=torture:krb5-upn=testallowed\ upn@$REALM',
1121 '--option=torture:krb5-hostname=testallowed',
1122 '--option=torture:expect_rodc=true',
1123 '--option=torture:expect_cached_at_rodc=true'],
1124 "samba4.krb5.kdc with account ALLOWED permission to replicate to an RODC")
1126 # This ensures we have correct behaviour on a server that is not not the PDC emulator
1128 plansmbtorture4testsuite('krb5.kdc', env
, ['ncacn_np:$SERVER_IP', "-k", "yes", '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN', '--realm=$REALM'],
1129 "samba4.krb5.kdc with specified account")
1130 plansmbtorture4testsuite('krb5.kdc', env
, ['ncacn_np:$SERVER_IP', "-k", "yes", '-Utestupnspn%$PASSWORD', '--workgroup=$DOMAIN', '--realm=$REALM',
1131 '--option=torture:expect_machine_account=true',
1132 '--option=torture:krb5-upn=http/testupnspn.$DNSNAME@$REALM',
1133 '--option=torture:krb5-hostname=testupnspn.$DNSNAME',
1134 '--option=torture:krb5-service=http'],
1135 "samba4.krb5.kdc with account having identical UPN and SPN")
1138 for env
in ["rodc", "promoted_dc", "fl2000dc", "fl2008r2dc"]:
1140 # The machine account is cached at the RODC, as it is the local account
1141 extra_options
= ['--option=torture:expect_rodc=true', '--option=torture:expect_cached_at_rodc=true']
1145 plansmbtorture4testsuite('krb5.kdc', "%s:local" % env
, ['ncacn_np:$SERVER_IP', "-k", "yes", '-P',
1146 '--workgroup=$DOMAIN', '--realm=$REALM',
1147 '--option=torture:krb5-hostname=$SERVER',
1148 '--option=torture:run_removedollar_test=true',
1149 '--option=torture:expect_machine_account=true'] + extra_options
,
1150 "samba4.krb5.kdc with machine account")
1156 planoldpythontestsuite(env
, "samba.tests.kcc",
1157 name
="samba.tests.kcc",
1158 environ
={'TEST_SERVER': '$SERVER', 'TEST_USERNAME': '$USERNAME',
1159 'TEST_PASSWORD': '$PASSWORD',
1162 extra_path
=[os
.path
.join(srcdir(), "samba/python"), ])
1163 planpythontestsuite(env
, "samba.tests.samba_tool.visualize_drs")
1165 planpythontestsuite("ad_dc_default:local", "samba.tests.kcc.kcc_utils")
1167 for env
in ["simpleserver", "fileserver", "nt4_dc", "ad_dc", "ad_dc_ntvfs",
1168 "ad_member", "offlinebackupdc", "restoredc", "renamedc", "labdc", 'schemaupgrade_pair_dc']:
1169 planoldpythontestsuite(env
, "netlogonsvc",
1170 extra_path
=[os
.path
.join(srcdir(), 'python/samba/tests')],
1171 name
="samba.tests.netlogonsvc.python(%s)" % env
)
1173 for env
in ["ktest", "ad_member", "ad_dc_no_ntlm"]:
1174 planoldpythontestsuite(env
, "ntlmdisabled",
1175 extra_path
=[os
.path
.join(srcdir(), 'python/samba/tests')],
1176 name
="samba.tests.ntlmdisabled.python(%s)" % env
)
1178 # Demote the vampire DC, it must be the last test each DC, before the dbcheck
1179 for env
in ['vampire_dc', 'promoted_dc', 'rodc']:
1180 planoldpythontestsuite(env
, "samba.tests.samba_tool.demote",
1181 name
="samba.tests.samba_tool.demote",
1183 'CONFIGFILE': '$PREFIX/%s/etc/smb.conf' % env
1185 extra_args
=['-U"$USERNAME%$PASSWORD"'],
1186 extra_path
=[os
.path
.join(srcdir(), "samba/python")]
1188 # TODO: Verifying the databases really should be a part of the
1189 # environment teardown.
1190 # check the databases are all OK. PLEASE LEAVE THIS AS THE LAST TEST
1191 for env
in ["ad_dc_ntvfs", "ad_dc", "fl2000dc", "fl2003dc", "fl2008r2dc",
1192 'vampire_dc', 'promoted_dc', 'backupfromdc', 'restoredc',
1193 'renamedc', 'offlinebackupdc', 'labdc']:
1194 plantestsuite("samba4.blackbox.dbcheck(%s)" % env
, env
+ ":local", ["PYTHON=%s" % python
, os
.path
.join(bbdir
, "dbcheck.sh"), '$PREFIX/provision', configuration
])
1197 # Tests to verify bug 13653 https://bugzilla.samba.org/show_bug.cgi?id=13653
1198 # ad_dc has an lmdb backend, ad_dc_ntvfs has a tdb backend.
1200 planoldpythontestsuite("ad_dc_ntvfs:local",
1201 "samba.tests.blackbox.bug13653",
1202 extra_args
=['-U"$USERNAME%$PASSWORD"'],
1203 environ
={'TEST_ENV': 'ad_dc_ntvfs'})
1204 planoldpythontestsuite("ad_dc:local",
1205 "samba.tests.blackbox.bug13653",
1206 extra_args
=['-U"$USERNAME%$PASSWORD"'],
1207 environ
={'TEST_ENV': 'ad_dc'})
1208 # cmocka tests not requiring a specific environment
1210 plantestsuite("samba4.dsdb.samdb.ldb_modules.unique_object_sids", "none",
1211 [os
.path
.join(bindir(), "test_unique_object_sids")])
1212 plantestsuite("samba4.dsdb.samdb.ldb_modules.encrypted_secrets.tdb", "none",
1213 [os
.path
.join(bindir(), "test_encrypted_secrets_tdb")])
1214 plantestsuite("samba4.dsdb.samdb.ldb_modules.encrypted_secrets.mdb", "none",
1215 [os
.path
.join(bindir(), "test_encrypted_secrets_mdb")])
1216 plantestsuite("lib.audit_logging.audit_logging", "none",
1217 [os
.path
.join(bindir(), "audit_logging_test")])
1218 plantestsuite("lib.audit_logging.audit_logging.errors", "none",
1219 [os
.path
.join(bindir(), "audit_logging_error_test")])
1220 plantestsuite("samba4.dsdb.samdb.ldb_modules.audit_util", "none",
1221 [os
.path
.join(bindir(), "test_audit_util")])
1222 plantestsuite("samba4.dsdb.samdb.ldb_modules.audit_log", "none",
1223 [os
.path
.join(bindir(), "test_audit_log")])
1224 plantestsuite("samba4.dsdb.samdb.ldb_modules.audit_log.errors", "none",
1225 [os
.path
.join(bindir(), "test_audit_log_errors")])
1226 plantestsuite("samba4.dsdb.samdb.ldb_modules.group_audit", "none",
1227 [os
.path
.join(bindir(), "test_group_audit")])
1228 plantestsuite("samba4.dsdb.samdb.ldb_modules.group_audit.errors", "none",
1229 [os
.path
.join(bindir(), "test_group_audit_errors")])
1230 plantestsuite("samba4.dcerpc.dnsserver.dnsutils", "none",
1231 [os
.path
.join(bindir(), "test_rpc_dns_server_dnsutils")])
1233 # process restart and limit tests, these break the environment so need to run
1234 # in their own specific environment
1235 planoldpythontestsuite("preforkrestartdc:local",
1236 "samba.tests.prefork_restart",
1238 os
.path
.join(srcdir(), 'python/samba/tests')],
1239 extra_args
=['-U"$USERNAME%$PASSWORD"'],
1240 name
="samba.tests.prefork_restart")
1241 planoldpythontestsuite("preforkrestartdc:local",
1242 "samba.tests.blackbox.smbcontrol_process",
1244 os
.path
.join(srcdir(), 'python/samba/tests')],
1245 extra_args
=['-U"$USERNAME%$PASSWORD"'],
1246 name
="samba.tests.blackbox.smbcontrol_process")
1247 planoldpythontestsuite("proclimitdc",
1248 "samba.tests.process_limits",
1250 os
.path
.join(srcdir(), 'python/samba/tests')],
1251 extra_args
=['-U"$USERNAME%$PASSWORD"'],
1252 name
="samba.tests.process_limits")