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 |
|
---|
72 | if have_tls_support:
|
---|
73 | for options in ['-U"$USERNAME%$PASSWORD"']:
|
---|
74 | plantestsuite("samba4.ldb.ldaps with options %s(ad_dc_ntvfs)" % options, "ad_dc_ntvfs",
|
---|
75 | "%s/test_ldb.sh ldaps $SERVER_IP %s" % (bbdir, options))
|
---|
76 |
|
---|
77 | creds_options = [
|
---|
78 | '--simple-bind-dn=$USERNAME@$REALM --password=$PASSWORD',
|
---|
79 | ]
|
---|
80 | peer_options = {
|
---|
81 | 'SERVER_IP': '$SERVER_IP',
|
---|
82 | 'SERVER_NAME': '$SERVER',
|
---|
83 | 'SERVER.REALM': '$SERVER.$REALM',
|
---|
84 | }
|
---|
85 | tls_verify_options = [
|
---|
86 | '--option="tlsverifypeer=no_check"',
|
---|
87 | '--option="tlsverifypeer=ca_only"',
|
---|
88 | '--option="tlsverifypeer=ca_and_name_if_available"',
|
---|
89 | '--option="tlsverifypeer=ca_and_name"',
|
---|
90 | '--option="tlsverifypeer=as_strict_as_possible"',
|
---|
91 | ]
|
---|
92 |
|
---|
93 | # we use :local for fl2008r2dc because of the self-signed certificate
|
---|
94 | for env in ["ad_dc_ntvfs", "fl2008r2dc:local"]:
|
---|
95 | for peer_key in peer_options.keys():
|
---|
96 | peer_val = peer_options[peer_key]
|
---|
97 | for creds in creds_options:
|
---|
98 | for tls_verify in tls_verify_options:
|
---|
99 | options = creds + ' ' + tls_verify
|
---|
100 | plantestsuite("samba4.ldb.simple.ldaps with options %s %s(%s)" % (
|
---|
101 | peer_key, options, env), env,
|
---|
102 | "%s/test_ldb_simple.sh ldaps %s %s" % (bbdir, peer_val, options))
|
---|
103 |
|
---|
104 | # test all "ldap server require strong auth" combinations
|
---|
105 | for env in ["ad_dc_ntvfs", "fl2008r2dc", "fl2003dc"]:
|
---|
106 | options = '--simple-bind-dn="$USERNAME@$REALM" --password="$PASSWORD"'
|
---|
107 | plantestsuite("samba4.ldb.simple.ldap with SIMPLE-BIND %s(%s)" % (options, env),
|
---|
108 | env, "%s/test_ldb_simple.sh ldap $SERVER %s" % (bbdir, options))
|
---|
109 | if have_tls_support:
|
---|
110 | options += ' --option="tlsverifypeer=no_check"'
|
---|
111 | plantestsuite("samba4.ldb.simple.ldaps with SIMPLE-BIND %s(%s)" % (options, env),
|
---|
112 | env, "%s/test_ldb_simple.sh ldaps $SERVER %s" % (bbdir, options))
|
---|
113 |
|
---|
114 | auth_options = [
|
---|
115 | '--option=clientldapsaslwrapping=plain',
|
---|
116 | '--sign',
|
---|
117 | '--encrypt',
|
---|
118 | ]
|
---|
119 |
|
---|
120 | for auth_option in auth_options:
|
---|
121 | options = '-U"$USERNAME%$PASSWORD"' + ' ' + auth_option
|
---|
122 | plantestsuite("samba4.ldb.simple.ldap with SASL-BIND %s(%s)" % (options, env),
|
---|
123 | env, "%s/test_ldb_simple.sh ldap $SERVER %s" % (bbdir, options))
|
---|
124 | if have_tls_support:
|
---|
125 | options = '-U"$USERNAME%$PASSWORD" --option="tlsverifypeer=no_check"'
|
---|
126 | plantestsuite("samba4.ldb.simple.ldaps with SASL-BIND %s(%s)" % (options, env),
|
---|
127 | env, "%s/test_ldb_simple.sh ldaps $SERVER %s" % (bbdir, options))
|
---|
128 |
|
---|
129 | for options in ['-U"$USERNAME%$PASSWORD"']:
|
---|
130 | plantestsuite("samba4.ldb.ldapi with options %s(ad_dc_ntvfs:local)" % options, "ad_dc_ntvfs:local",
|
---|
131 | "%s/test_ldb.sh ldapi $PREFIX_ABS/ad_dc_ntvfs/private/ldapi %s" % (bbdir, options))
|
---|
132 |
|
---|
133 | for t in smbtorture4_testsuites("ldap."):
|
---|
134 | plansmbtorture4testsuite(t, "ad_dc_ntvfs", '-U"$USERNAME%$PASSWORD" //$SERVER_IP/_none_')
|
---|
135 |
|
---|
136 | ldbdir = os.path.join(srcdir(), "lib/ldb")
|
---|
137 | # Don't run LDB tests when using system ldb, as we won't have ldbtest installed
|
---|
138 | if os.path.exists(os.path.join(samba4bindir, "ldbtest")):
|
---|
139 | plantestsuite("ldb.base", "none", "%s/tests/test-tdb-subunit.sh %s" % (ldbdir, samba4bindir))
|
---|
140 | else:
|
---|
141 | skiptestsuite("ldb.base", "Using system LDB, ldbtest not available")
|
---|
142 |
|
---|
143 | # Tests for RPC
|
---|
144 |
|
---|
145 | # add tests to this list as they start passing, so we test
|
---|
146 | # that they stay passing
|
---|
147 | 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"]
|
---|
148 | 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"]
|
---|
149 | drs_rpc_tests = smbtorture4_testsuites("drs.rpc")
|
---|
150 | ncacn_ip_tcp_tests = ["rpc.schannel", "rpc.join", "rpc.lsa", "rpc.dssetup", "rpc.drsuapi", "rpc.netlogon", "rpc.netlogon.admin", "rpc.asyncbind", "rpc.lsalookup", "rpc.lsa-getuser", "rpc.schannel2", "rpc.authcontext", "rpc.samr.passwords.validate"] + drs_rpc_tests
|
---|
151 | 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"]
|
---|
152 | slow_ncacn_ip_tcp_tests = ["rpc.cracknames"]
|
---|
153 |
|
---|
154 | 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"]
|
---|
155 |
|
---|
156 | # Make sure all tests get run
|
---|
157 | rpc_tests = smbtorture4_testsuites("rpc.")
|
---|
158 | auto_rpc_tests = filter(lambda t: t not in all_rpc_tests, rpc_tests)
|
---|
159 |
|
---|
160 | for bindoptions in ["seal,padcheck"] + validate_list + ["bigendian"]:
|
---|
161 | for transport in ["ncalrpc", "ncacn_np", "ncacn_ip_tcp"]:
|
---|
162 | env = "ad_dc_ntvfs"
|
---|
163 | if transport == "ncalrpc":
|
---|
164 | tests = ncalrpc_tests
|
---|
165 | env = "ad_dc_ntvfs:local"
|
---|
166 | elif transport == "ncacn_np":
|
---|
167 | tests = ncacn_np_tests
|
---|
168 | elif transport == "ncacn_ip_tcp":
|
---|
169 | tests = ncacn_ip_tcp_tests
|
---|
170 | else:
|
---|
171 | raise AssertionError("invalid transport %r"% transport)
|
---|
172 | for t in tests:
|
---|
173 | plansmbtorture4testsuite(t, env, ["%s:$SERVER[%s]" % (transport, bindoptions), '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.%s on %s with %s" % (t, transport, bindoptions))
|
---|
174 | 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))
|
---|
175 |
|
---|
176 | #Plugin S4 DC tests (confirms named pipe auth forwarding). This can be expanded once kerberos is supported in the plugin DC
|
---|
177 | #
|
---|
178 | for bindoptions in ["seal,padcheck"] + validate_list + ["bigendian"]:
|
---|
179 | for t in ncacn_np_tests:
|
---|
180 | env = "ad_dc"
|
---|
181 | transport = "ncacn_np"
|
---|
182 | plansmbtorture4testsuite(t, env, ["%s:$SERVER[%s]" % (transport, bindoptions), '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.%s with %s" % (t, bindoptions))
|
---|
183 |
|
---|
184 | for bindoptions in [""] + validate_list + ["bigendian"]:
|
---|
185 | for t in auto_rpc_tests:
|
---|
186 | plansmbtorture4testsuite(t, "ad_dc_ntvfs", ["$SERVER[%s]" % bindoptions, '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.%s with %s" % (t, bindoptions))
|
---|
187 |
|
---|
188 | t = "rpc.countcalls"
|
---|
189 | plansmbtorture4testsuite(t, "ad_dc_ntvfs:local", ["$SERVER[%s]" % bindoptions, '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], modname="samba4.%s" % t)
|
---|
190 |
|
---|
191 | for transport in ["ncacn_np", "ncacn_ip_tcp"]:
|
---|
192 | env = "ad_dc_ntvfs"
|
---|
193 | if transport == "ncacn_np":
|
---|
194 | tests = slow_ncacn_np_tests
|
---|
195 | elif transport == "ncacn_ip_tcp":
|
---|
196 | tests = slow_ncacn_ip_tcp_tests
|
---|
197 | else:
|
---|
198 | raise AssertionError("Invalid transport %r" % transport)
|
---|
199 | for t in tests:
|
---|
200 | bindoptions = ''
|
---|
201 | if t == 'rpc.cracknames':
|
---|
202 | bindoptions = 'seal'
|
---|
203 | plansmbtorture4testsuite(t, env, ["%s:$SERVER[%s]" % (transport,bindoptions), '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.%s on %s with %s" % (t, transport, bindoptions))
|
---|
204 |
|
---|
205 | # Tests for the DFS referral calls implementation
|
---|
206 | for t in smbtorture4_testsuites("dfs."):
|
---|
207 | plansmbtorture4testsuite(t, "ad_dc_ntvfs", '//$SERVER/ipc\$ -U$USERNAME%$PASSWORD')
|
---|
208 | plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/ipc\$ -U$USERNAME%$PASSWORD')
|
---|
209 |
|
---|
210 | # Tests for the NET API (net.api.become.dc tested below against all the roles)
|
---|
211 | net_tests = filter(lambda x: "net.api.become.dc" not in x, smbtorture4_testsuites("net."))
|
---|
212 | for t in net_tests:
|
---|
213 | plansmbtorture4testsuite(t, "ad_dc_ntvfs", '$SERVER[%s] -U$USERNAME%%$PASSWORD -W$DOMAIN' % validate)
|
---|
214 |
|
---|
215 | # Tests for session keys and encryption of RPC pipes
|
---|
216 | # FIXME: Integrate these into a single smbtorture test
|
---|
217 |
|
---|
218 | transport = "ncacn_np"
|
---|
219 | for env in ["ad_dc_ntvfs", "nt4_dc"]:
|
---|
220 | for ntlmoptions in [
|
---|
221 | "-k no --option=usespnego=yes",
|
---|
222 | "-k no --option=usespnego=yes --option=ntlmssp_client:128bit=no",
|
---|
223 | "-k no --option=usespnego=yes --option=ntlmssp_client:56bit=yes",
|
---|
224 | "-k no --option=usespnego=yes --option=ntlmssp_client:56bit=no",
|
---|
225 | "-k no --option=usespnego=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=yes",
|
---|
226 | "-k no --option=usespnego=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=no",
|
---|
227 | "-k no --option=usespnego=yes --option=clientntlmv2auth=yes",
|
---|
228 | "-k no --option=usespnego=yes --option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no",
|
---|
229 | "-k no --option=usespnego=yes --option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=yes",
|
---|
230 | "-k no --option=usespnego=no --option=clientntlmv2auth=yes",
|
---|
231 | "-k no --option=gensec:spnego=no --option=clientntlmv2auth=yes",
|
---|
232 | "-k no --option=usespnego=no"]:
|
---|
233 | name = "rpc.lsa.secrets on %s with with %s" % (transport, ntlmoptions)
|
---|
234 | plansmbtorture4testsuite('rpc.lsa.secrets', env, ["%s:$SERVER[]" % (transport), ntlmoptions, '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN', '--option=gensec:target_hostname=$NETBIOSNAME'], "samba4.%s" % name)
|
---|
235 | plantestsuite("samba.blackbox.pdbtest(%s)" % env, "%s:local" % env, [os.path.join(bbdir, "test_pdbtest.sh"), '$SERVER', "$PREFIX", "pdbtest", smbclient4, '$SMB_CONF_PATH', configuration])
|
---|
236 | plantestsuite("samba.blackbox.pdbtest.winbind(%s)" % env, "%s:local" % env, [os.path.join(bbdir, "test_pdbtest.sh"), '$SERVER', "$PREFIX", "pdbtest2", smbclient4, '$SMB_CONF_PATH', configuration + " --option='authmethods=wbc'"])
|
---|
237 |
|
---|
238 | plantestsuite("samba.blackbox.pdbtest.s4winbind(ad_dc_ntvfs)", "ad_dc_ntvfs:local", [os.path.join(bbdir, "test_pdbtest.sh"), '$SERVER', "$PREFIX", "pdbtest3", smbclient4, '$SMB_CONF_PATH', configuration + " --option='authmethods=samba4:winbind'"])
|
---|
239 | plantestsuite("samba.blackbox.pdbtest.s4winbind_wbclient(ad_dc_ntvfs)", "ad_dc_ntvfs:local", [os.path.join(bbdir, "test_pdbtest.sh"), '$SERVER', "$PREFIX", "pdbtest4", smbclient4, '$SMB_CONF_PATH', configuration + " --option='authmethods=samba4:winbind_wbclient'"])
|
---|
240 |
|
---|
241 | transports = ["ncacn_np", "ncacn_ip_tcp"]
|
---|
242 |
|
---|
243 | #Kerberos varies between functional levels, so it is important to check this on all of them
|
---|
244 | for env in ["ad_dc_ntvfs", "fl2000dc", "fl2003dc", "fl2008r2dc", "ad_dc"]:
|
---|
245 | transport = "ncacn_np"
|
---|
246 | plansmbtorture4testsuite('rpc.pac', env, ["%s:$SERVER[]" % (transport, ), '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.rpc.pac on %s" % (transport,))
|
---|
247 | 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,))
|
---|
248 | 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,))
|
---|
249 | 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,))
|
---|
250 | 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,))
|
---|
251 | 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,))
|
---|
252 | 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)
|
---|
253 | 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)
|
---|
254 | 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)
|
---|
255 |
|
---|
256 | # Winreg tests test bulk Kerberos encryption of DCE/RPC
|
---|
257 | # We test rpc.winreg here too, because the winreg interface if
|
---|
258 | # handled by the source3/rpc_server code.
|
---|
259 | for bindoptions in ["connect", "krb5", "krb5,sign", "krb5,seal", "spnego", "spnego,sign", "spnego,seal"]:
|
---|
260 | 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))
|
---|
261 |
|
---|
262 | for transport in transports:
|
---|
263 | plansmbtorture4testsuite('rpc.echo', env, ["%s:$SERVER[]" % (transport,), '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.rpc.echo on %s" % (transport, ))
|
---|
264 |
|
---|
265 | # Echo tests test bulk Kerberos encryption of DCE/RPC
|
---|
266 | for bindoptions in ["connect", "krb5", "krb5,sign", "krb5,seal", "spnego", "spnego,sign", "spnego,seal"] + validate_list + ["padcheck", "bigendian", "bigendian,seal"]:
|
---|
267 | echooptions = "--option=socket:testnonblock=True --option=torture:quick=yes -k yes"
|
---|
268 | 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))
|
---|
269 | plansmbtorture4testsuite("net.api.become.dc", env, '$SERVER[%s] -U$USERNAME%%$PASSWORD -W$DOMAIN' % validate)
|
---|
270 |
|
---|
271 | for bindoptions in ["sign", "seal"]:
|
---|
272 | plansmbtorture4testsuite('rpc.backupkey', "ad_dc_ntvfs", ["ncacn_np:$SERVER[%s]" % ( bindoptions), '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.rpc.backupkey with %s" % (bindoptions))
|
---|
273 |
|
---|
274 | for transport in transports:
|
---|
275 | for bindoptions in ["sign", "seal"]:
|
---|
276 | for ntlmoptions in [
|
---|
277 | "--option=ntlmssp_client:ntlm2=yes --option=torture:quick=yes",
|
---|
278 | "--option=ntlmssp_client:ntlm2=no --option=torture:quick=yes",
|
---|
279 | "--option=ntlmssp_client:ntlm2=yes --option=ntlmssp_client:128bit=no --option=torture:quick=yes",
|
---|
280 | "--option=ntlmssp_client:ntlm2=no --option=ntlmssp_client:128bit=no --option=torture:quick=yes",
|
---|
281 | "--option=ntlmssp_client:ntlm2=yes --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes",
|
---|
282 | "--option=ntlmssp_client:ntlm2=no --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes",
|
---|
283 | "--option=clientntlmv2auth=yes --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes",
|
---|
284 | "--option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:keyexchange=yes --option=torture:quick=yes",
|
---|
285 | "--option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes"]:
|
---|
286 | if transport == "ncalrpc":
|
---|
287 | env = "ad_dc_ntvfs:local"
|
---|
288 | else:
|
---|
289 | env = "ad_dc_ntvfs"
|
---|
290 | 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))
|
---|
291 |
|
---|
292 | plansmbtorture4testsuite('rpc.echo', "ad_dc_ntvfs", ['ncacn_np:$SERVER[smb2]', '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.rpc.echo on ncacn_np over smb2")
|
---|
293 |
|
---|
294 | plansmbtorture4testsuite('ntp.signd', "ad_dc_ntvfs:local", ['ncacn_np:$SERVER', '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], "samba4.ntp.signd")
|
---|
295 |
|
---|
296 | nbt_tests = smbtorture4_testsuites("nbt.")
|
---|
297 | for t in nbt_tests:
|
---|
298 | plansmbtorture4testsuite(t, "ad_dc_ntvfs", "//$SERVER/_none_ -U\"$USERNAME%$PASSWORD\"")
|
---|
299 |
|
---|
300 | # Tests against the NTVFS POSIX backend
|
---|
301 | ntvfsargs = ["--option=torture:sharedelay=100000", "--option=torture:oplocktimeout=3", "--option=torture:writetimeupdatedelay=500000"]
|
---|
302 |
|
---|
303 | # Filter smb2 tests that should not run against ad_dc_ntvfs
|
---|
304 | smb2_s3only = ["smb2.change_notify_disabled", "smb2.dosmode"]
|
---|
305 | smb2 = [x for x in smbtorture4_testsuites("smb2.") if x not in smb2_s3only]
|
---|
306 |
|
---|
307 | #The QFILEINFO-IPC test needs to be on ipc$
|
---|
308 | raw = filter(lambda x: "raw.qfileinfo.ipc" not in x, smbtorture4_testsuites("raw."))
|
---|
309 | base = smbtorture4_testsuites("base.")
|
---|
310 |
|
---|
311 | netapi = smbtorture4_testsuites("netapi.")
|
---|
312 |
|
---|
313 | libsmbclient = smbtorture4_testsuites("libsmbclient.")
|
---|
314 |
|
---|
315 | for t in base + raw + smb2 + netapi + libsmbclient:
|
---|
316 | plansmbtorture4testsuite(t, "ad_dc_ntvfs", ['//$SERVER/tmp', '-U$USERNAME%$PASSWORD'] + ntvfsargs)
|
---|
317 |
|
---|
318 | plansmbtorture4testsuite("raw.qfileinfo.ipc", "ad_dc_ntvfs", '//$SERVER/ipc\$ -U$USERNAME%$PASSWORD')
|
---|
319 |
|
---|
320 | for t in smbtorture4_testsuites("rap."):
|
---|
321 | plansmbtorture4testsuite(t, "ad_dc_ntvfs", '//$SERVER/IPC\$ -U$USERNAME%$PASSWORD')
|
---|
322 |
|
---|
323 | # Tests against the NTVFS CIFS backend
|
---|
324 | for t in base + raw:
|
---|
325 | plansmbtorture4testsuite(t, "ad_dc_ntvfs", ['//$NETBIOSNAME/cifs', '-U$USERNAME%$PASSWORD', '--kerberos=yes'] + ntvfsargs, modname="samba4.ntvfs.cifs.krb5.%s" % t)
|
---|
326 |
|
---|
327 | # Test NTVFS CIFS backend with S4U2Self and S4U2Proxy
|
---|
328 | t = "base.unlink"
|
---|
329 | plansmbtorture4testsuite(t, "ad_dc_ntvfs", ['//$NETBIOSNAME/cifs', '-U$USERNAME%$PASSWORD', '--kerberos=no'] + ntvfsargs, "samba4.ntvfs.cifs.ntlm.%s" % t)
|
---|
330 | plansmbtorture4testsuite(t, "rpc_proxy", ['//$NETBIOSNAME/cifs_to_dc', '-U$DC_USERNAME%$DC_PASSWORD', '--kerberos=yes'] + ntvfsargs, "samba4.ntvfs.cifs.krb5.%s" % t)
|
---|
331 | plansmbtorture4testsuite(t, "rpc_proxy", ['//$NETBIOSNAME/cifs_to_dc', '-U$DC_USERNAME%$DC_PASSWORD', '--kerberos=no'] + ntvfsargs, "samba4.ntvfs.cifs.ntlm.%s" % t)
|
---|
332 |
|
---|
333 | plansmbtorture4testsuite('echo.udp', 'ad_dc_ntvfs:local', '//$SERVER/whatever')
|
---|
334 |
|
---|
335 | # Local tests
|
---|
336 | for t in smbtorture4_testsuites("local."):
|
---|
337 | #The local.resolve test needs a name to look up using real system (not emulated) name routines
|
---|
338 | plansmbtorture4testsuite(t, "none", "ncalrpc:localhost")
|
---|
339 |
|
---|
340 | # Confirm these tests with the system iconv too
|
---|
341 | for t in ["local.convert_string_handle", "local.convert_string", "local.ndr"]:
|
---|
342 | options = "ncalrpc: --option='iconv:use_builtin_handlers=false'"
|
---|
343 | plansmbtorture4testsuite(t, "none", options,
|
---|
344 | modname="samba4.%s.system.iconv" % t)
|
---|
345 |
|
---|
346 | tdbtorture4 = binpath("tdbtorture")
|
---|
347 | if os.path.exists(tdbtorture4):
|
---|
348 | plantestsuite("tdb.stress", "none", valgrindify(tdbtorture4))
|
---|
349 | else:
|
---|
350 | skiptestsuite("tdb.stress", "Using system TDB, tdbtorture not available")
|
---|
351 |
|
---|
352 | plansmbtorture4testsuite("drs.unit", "none", "ncalrpc:")
|
---|
353 |
|
---|
354 | # Pidl tests
|
---|
355 | for f in sorted(os.listdir(os.path.join(samba4srcdir, "../pidl/tests"))):
|
---|
356 | if f.endswith(".pl"):
|
---|
357 | planperltestsuite("pidl.%s" % f[:-3], os.path.normpath(os.path.join(samba4srcdir, "../pidl/tests", f)))
|
---|
358 |
|
---|
359 | # DNS tests
|
---|
360 | 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'])
|
---|
361 |
|
---|
362 | 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'])
|
---|
363 |
|
---|
364 | for t in smbtorture4_testsuites("dns_internal."):
|
---|
365 | plansmbtorture4testsuite(t, "ad_dc_ntvfs:local", '//$SERVER/whavever')
|
---|
366 |
|
---|
367 | # Local tests
|
---|
368 | for t in smbtorture4_testsuites("dlz_bind9."):
|
---|
369 | #The dlz_bind9 tests needs to look at the DNS database
|
---|
370 | plansmbtorture4testsuite(t, "chgdcpass:local", ["ncalrpc:$SERVER", '-U$USERNAME%$PASSWORD'])
|
---|
371 |
|
---|
372 | planpythontestsuite("nt4_dc", "samba.tests.libsmb_samba_internal");
|
---|
373 |
|
---|
374 | # Blackbox Tests:
|
---|
375 | # tests that interact directly with the command-line tools rather than using
|
---|
376 | # the API. These mainly test that the various command-line options of commands
|
---|
377 | # work correctly.
|
---|
378 |
|
---|
379 | for env in ["ad_member", "s4member", "ad_dc_ntvfs", "chgdcpass"]:
|
---|
380 | 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])
|
---|
381 |
|
---|
382 | 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])
|
---|
383 |
|
---|
384 | if have_heimdal_support:
|
---|
385 | plantestsuite("samba4.blackbox.pkinit(ad_dc_ntvfs:local)", "ad_dc_ntvfs:local", [os.path.join(bbdir, "test_pkinit_heimdal.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', '$PREFIX/ad_dc_ntvfs', "aes256-cts-hmac-sha1-96", smbclient4, configuration])
|
---|
386 | 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])
|
---|
387 | 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])
|
---|
388 | 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])
|
---|
389 | 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"])
|
---|
390 | 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"])
|
---|
391 |
|
---|
392 | 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"])
|
---|
393 | 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"])
|
---|
394 | plantestsuite("samba4.blackbox.ktpass(ad_dc_ntvfs)", "ad_dc_ntvfs", [os.path.join(bbdir, "test_ktpass.sh"), '$PREFIX/ad_dc_ntvfs'])
|
---|
395 | plantestsuite("samba4.blackbox.passwords(ad_dc_ntvfs:local)", "ad_dc_ntvfs:local", [os.path.join(bbdir, "test_passwords.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', "$PREFIX/ad_dc_ntvfs", smbclient4])
|
---|
396 | plantestsuite("samba4.blackbox.export.keytab(ad_dc_ntvfs:local)", "ad_dc_ntvfs:local", [os.path.join(bbdir, "test_export_keytab.sh"), '$SERVER', '$USERNAME', '$REALM', '$DOMAIN', "$PREFIX", smbclient4])
|
---|
397 | plantestsuite("samba4.blackbox.cifsdd(ad_dc_ntvfs)", "ad_dc_ntvfs", [os.path.join(samba4srcdir, "client/tests/test_cifsdd.sh"), '$SERVER', '$USERNAME', '$PASSWORD', "$DOMAIN"])
|
---|
398 | 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])
|
---|
399 | plantestsuite("samba4.blackbox.locktest(ad_dc_ntvfs)", "ad_dc_ntvfs", [os.path.join(samba4srcdir, "torture/tests/test_locktest.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$DOMAIN', '$PREFIX'])
|
---|
400 | plantestsuite("samba4.blackbox.masktest", "ad_dc_ntvfs", [os.path.join(samba4srcdir, "torture/tests/test_masktest.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$DOMAIN', '$PREFIX'])
|
---|
401 | plantestsuite("samba4.blackbox.gentest(ad_dc_ntvfs)", "ad_dc_ntvfs", [os.path.join(samba4srcdir, "torture/tests/test_gentest.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$DOMAIN', "$PREFIX"])
|
---|
402 | 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])
|
---|
403 | 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])
|
---|
404 | plantestsuite("samba4.blackbox.samba_upgradedns(chgdcpass:local)", "chgdcpass:local", [os.path.join(bbdir, "test_samba_upgradedns.sh"), '$SERVER', '$REALM', '$PREFIX', '$SELFTEST_PREFIX/chgdcpass'])
|
---|
405 | plantestsuite("samba4.blackbox.net_ads(ad_member:local)", "ad_member:local", [os.path.join(bbdir, "test_net_ads.sh"), '$DC_SERVER', '$DC_USERNAME', '$DC_PASSWORD'])
|
---|
406 | plantestsuite_loadlist("samba4.rpc.echo against NetBIOS alias", "ad_dc_ntvfs", [valgrindify(smbtorture4), "$LISTOPT", "$LOADLIST", 'ncacn_np:$NETBIOSALIAS', '-U$DOMAIN/$USERNAME%$PASSWORD', 'rpc.echo'])
|
---|
407 |
|
---|
408 | # Tests using the "Simple" NTVFS backend
|
---|
409 | for t in ["base.rw1"]:
|
---|
410 | plansmbtorture4testsuite(t, "ad_dc_ntvfs", ["//$SERVER/simple", '-U$USERNAME%$PASSWORD'], modname="samba4.ntvfs.simple.%s" % t)
|
---|
411 |
|
---|
412 | # Domain S4member Tests
|
---|
413 | plansmbtorture4testsuite('rpc.echo', "s4member", ['ncacn_np:$NETBIOSNAME', '-U$NETBIOSNAME/$USERNAME%$PASSWORD'], "samba4.rpc.echo against s4member server with local creds")
|
---|
414 | plansmbtorture4testsuite('rpc.echo', "s4member", ['ncacn_np:$NETBIOSNAME', '-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'], "samba4.rpc.echo against s4member server with domain creds")
|
---|
415 | plansmbtorture4testsuite('rpc.samr', "s4member", ['ncacn_np:$NETBIOSNAME', '-U$NETBIOSNAME/$USERNAME%$PASSWORD'], "samba4.rpc.samr against s4member server with local creds")
|
---|
416 | plansmbtorture4testsuite('rpc.samr.users', "s4member", ['ncacn_np:$NETBIOSNAME', '-U$NETBIOSNAME/$USERNAME%$PASSWORD'], "samba4.rpc.samr.users against s4member server with local creds",)
|
---|
417 | plansmbtorture4testsuite('rpc.samr.passwords', "s4member", ['ncacn_np:$NETBIOSNAME', '-U$NETBIOSNAME/$USERNAME%$PASSWORD'], "samba4.rpc.samr.passwords against s4member server with local creds")
|
---|
418 | 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])
|
---|
419 |
|
---|
420 | # RPC Proxy
|
---|
421 | 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")
|
---|
422 |
|
---|
423 | # Tests SMB signing
|
---|
424 | for mech in [
|
---|
425 | "-k no",
|
---|
426 | "-k no --option=usespnego=no",
|
---|
427 | "-k no --option=gensec:spengo=no",
|
---|
428 | "-k yes",
|
---|
429 | "-k yes --option=gensec:fake_gssapi_krb5=yes --option=gensec:gssapi_krb5=no"]:
|
---|
430 | for signing in ["--signing=on", "--signing=required"]:
|
---|
431 | signoptions = "%s %s" % (mech, signing)
|
---|
432 | name = "smb.signing on with %s" % signoptions
|
---|
433 | plansmbtorture4testsuite('base.xcopy', "ad_dc_ntvfs", ['//$NETBIOSNAME/xcopy_share', signoptions, '-U$USERNAME%$PASSWORD'], modname="samba4.%s" % name)
|
---|
434 |
|
---|
435 | for mech in [
|
---|
436 | "-k no",
|
---|
437 | "-k no --option=usespnego=no",
|
---|
438 | "-k no --option=gensec:spengo=no",
|
---|
439 | "-k yes"]:
|
---|
440 | signoptions = "%s --signing=off" % mech
|
---|
441 | name = "smb.signing disabled on with %s" % signoptions
|
---|
442 | plansmbtorture4testsuite('base.xcopy', "s4member", ['//$NETBIOSNAME/xcopy_share', signoptions, '-U$DC_USERNAME%$DC_PASSWORD'], "samba4.%s domain-creds" % name)
|
---|
443 | plansmbtorture4testsuite('base.xcopy', "ad_member", ['//$NETBIOSNAME/xcopy_share', signoptions, '-U$DC_USERNAME%$DC_PASSWORD'], "samba4.%s domain-creds" % name)
|
---|
444 | plansmbtorture4testsuite('base.xcopy', "ad_dc", ['//$NETBIOSNAME/xcopy_share', signoptions, '-U$USERNAME%$PASSWORD'], "samba4.%s" % name)
|
---|
445 | plansmbtorture4testsuite('base.xcopy', "ad_dc",
|
---|
446 | ['//$NETBIOSNAME/xcopy_share', signoptions, '-U$DC_USERNAME%$DC_PASSWORD'], "samba4.%s administrator" % name)
|
---|
447 |
|
---|
448 | plantestsuite("samba4.blackbox.bogusdomain", "ad_member", ["testprogs/blackbox/bogus.sh", "$NETBIOSNAME", "xcopy_share", '$USERNAME', '$PASSWORD', '$DC_USERNAME', '$DC_PASSWORD', smbclient4])
|
---|
449 | for mech in [
|
---|
450 | "-k no",
|
---|
451 | "-k no --option=usespnego=no",
|
---|
452 | "-k no --option=gensec:spengo=no"]:
|
---|
453 | signoptions = "%s --signing=off" % mech
|
---|
454 | plansmbtorture4testsuite('base.xcopy', "s4member", ['//$NETBIOSNAME/xcopy_share', signoptions, '-U$NETBIOSNAME/$USERNAME%$PASSWORD'], modname="samba4.smb.signing on with %s local-creds" % signoptions)
|
---|
455 |
|
---|
456 | plansmbtorture4testsuite('base.xcopy', "ad_dc_ntvfs", ['//$NETBIOSNAME/xcopy_share', '-k', 'no', '--signing=yes', '-U%'], modname="samba4.smb.signing --signing=yes anon")
|
---|
457 | plansmbtorture4testsuite('base.xcopy', "ad_dc_ntvfs", ['//$NETBIOSNAME/xcopy_share', '-k', 'no', '--signing=required', '-U%'], modname="samba4.smb.signing --signing=required anon")
|
---|
458 | plansmbtorture4testsuite('base.xcopy', "s4member", ['//$NETBIOSNAME/xcopy_share', '-k', 'no', '--signing=no', '-U%'], modname="samba4.smb.signing --signing=no anon")
|
---|
459 |
|
---|
460 |
|
---|
461 | 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\""]
|
---|
462 |
|
---|
463 | winbind_ad_client_tests = smbtorture4_testsuites("winbind.struct") + smbtorture4_testsuites("winbind.pac")
|
---|
464 | winbind_wbclient_tests = smbtorture4_testsuites("winbind.wbclient")
|
---|
465 | for env in ["ad_dc", "ad_dc_ntvfs", "s4member", "ad_member", "nt4_member"]:
|
---|
466 | wb_opts = wb_opts_default[:]
|
---|
467 | if env in ["ad_member"]:
|
---|
468 | wb_opts += ["--option=\"torture:winbindd_domain_without_prefix=$DOMAIN\""]
|
---|
469 | for t in winbind_ad_client_tests:
|
---|
470 | plansmbtorture4testsuite(t, "%s:local" % env, wb_opts + ['//$SERVER/tmp', '--realm=$REALM', '--machine-pass', '--option=torture:addc=$DC_SERVER'])
|
---|
471 |
|
---|
472 | for env in ["nt4_dc", "fl2003dc"]:
|
---|
473 | for t in winbind_wbclient_tests:
|
---|
474 | plansmbtorture4testsuite(t, "%s:local" % env, '//$SERVER/tmp -U$DC_USERNAME%$DC_PASSWORD')
|
---|
475 |
|
---|
476 | for env in ["nt4_dc", "nt4_member", "ad_dc", "ad_dc_ntvfs", "ad_member", "s4member", "chgdcpass"]:
|
---|
477 | tests = ["--ping", "--separator",
|
---|
478 | "--own-domain",
|
---|
479 | "--all-domains",
|
---|
480 | "--trusted-domains",
|
---|
481 | "--domain-info=BUILTIN",
|
---|
482 | "--domain-info=$DOMAIN",
|
---|
483 | "--online-status",
|
---|
484 | "--online-status --domain=BUILTIN",
|
---|
485 | "--online-status --domain=$DOMAIN",
|
---|
486 | "--check-secret --domain=$DOMAIN",
|
---|
487 | "--change-secret --domain=$DOMAIN",
|
---|
488 | "--check-secret --domain=$DOMAIN",
|
---|
489 | "--online-status --domain=$DOMAIN",
|
---|
490 | "--domain-users",
|
---|
491 | "--domain-groups",
|
---|
492 | "--name-to-sid=$DC_USERNAME",
|
---|
493 | "--name-to-sid=$DOMAIN/$DC_USERNAME",
|
---|
494 | "--user-info=$DOMAIN/$DC_USERNAME",
|
---|
495 | "--user-groups=$DOMAIN/$DC_USERNAME",
|
---|
496 | "--authenticate=$DOMAIN/$DC_USERNAME%$DC_PASSWORD",
|
---|
497 | "--allocate-uid",
|
---|
498 | "--allocate-gid"]
|
---|
499 |
|
---|
500 | for t in tests:
|
---|
501 | plantestsuite("samba.wbinfo_simple.(%s:local).%s" % (env, t), "%s:local" % env, [os.path.join(srcdir(), "nsswitch/tests/test_wbinfo_simple.sh"), t])
|
---|
502 |
|
---|
503 | plantestsuite(
|
---|
504 | "samba.wbinfo_sids2xids.(%s:local)" % env, "%s:local" % env,
|
---|
505 | [os.path.join(samba3srcdir, "script/tests/test_wbinfo_sids2xids.sh")])
|
---|
506 |
|
---|
507 | plantestsuite(
|
---|
508 | "samba.ntlm_auth.diagnostics(%s:local)" % env, "%s:local" % env,
|
---|
509 | [os.path.join(samba3srcdir, "script/tests/test_ntlm_auth_diagnostics.sh"), ntlm_auth3, '$DOMAIN', '$DC_USERNAME', '$DC_PASSWORD', configuration])
|
---|
510 |
|
---|
511 | 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])
|
---|
512 |
|
---|
513 | for env in ["s4member_dflt_domain", "s4member"]:
|
---|
514 | for cmd in ["id", "getent"]:
|
---|
515 | users = ["$DC_USERNAME", "$DC_USERNAME@$REALM"]
|
---|
516 | if env == "s4member":
|
---|
517 | users = ["$DOMAIN/$DC_USERNAME", "$DC_USERNAME@$REALM"]
|
---|
518 | for usr in users:
|
---|
519 | plantestsuite("samba4.winbind.dom_name_parse.cmd", env, "%s/dom_parse.sh %s %s" % (bbdir,cmd,usr))
|
---|
520 |
|
---|
521 | nsstest4 = binpath("nsstest")
|
---|
522 | for env in ["ad_dc:local", "ad_dc_ntvfs:local", "s4member:local", "nt4_dc:local", "ad_member:local", "nt4_member:local"]:
|
---|
523 | if os.path.exists(nsstest4):
|
---|
524 | 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")])
|
---|
525 | else:
|
---|
526 | skiptestsuite("samba.nss.test using winbind(%s)" % env, "nsstest not available")
|
---|
527 |
|
---|
528 | subunitrun = valgrindify(python) + " " + os.path.join(samba4srcdir, "scripting/bin/subunitrun")
|
---|
529 | def planoldpythontestsuite(env, module, name=None, extra_path=[], environ={}, extra_args=[]):
|
---|
530 | environ = dict(environ)
|
---|
531 | py_path = list(extra_path)
|
---|
532 | if py_path:
|
---|
533 | environ["PYTHONPATH"] = ":".join(["$PYTHONPATH"] + py_path)
|
---|
534 | args = ["%s=%s" % item for item in environ.iteritems()]
|
---|
535 | args += [subunitrun, "$LISTOPT", "$LOADLIST", module]
|
---|
536 | args += extra_args
|
---|
537 | if name is None:
|
---|
538 | name = module
|
---|
539 | plantestsuite_loadlist(name, env, args)
|
---|
540 |
|
---|
541 | planoldpythontestsuite("ad_dc_ntvfs:local", "samba.tests.gensec", extra_args=['-U"$USERNAME%$PASSWORD"'])
|
---|
542 | planoldpythontestsuite("none", "simple", extra_path=["%s/lib/tdb/python/tests" % srcdir()], name="tdb.python")
|
---|
543 | planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.dcerpc.sam")
|
---|
544 | planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.dsdb")
|
---|
545 | planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.dcerpc.bare")
|
---|
546 | planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.dcerpc.unix")
|
---|
547 | planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.dcerpc.srvsvc")
|
---|
548 | planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.timecmd")
|
---|
549 |
|
---|
550 | # test fsmo show
|
---|
551 | for env in ["ad_dc_ntvfs", "fl2000dc", "fl2003dc", "fl2008r2dc"]:
|
---|
552 | planpythontestsuite(env + ":local", "samba.tests.samba_tool.fsmo")
|
---|
553 |
|
---|
554 | # We run this test against both AD DC implemetnations because it is
|
---|
555 | # the only test we have of GPO get/set behaviour, and this involves
|
---|
556 | # the file server as well as the LDAP server.
|
---|
557 | planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.gpo")
|
---|
558 | planpythontestsuite("ad_dc:local", "samba.tests.samba_tool.gpo")
|
---|
559 |
|
---|
560 | planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.processes")
|
---|
561 | planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.user")
|
---|
562 | planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.group")
|
---|
563 | planpythontestsuite("ad_dc:local", "samba.tests.samba_tool.ntacl")
|
---|
564 |
|
---|
565 | planpythontestsuite("ad_dc:local", "samba.tests.samba_tool.sites")
|
---|
566 |
|
---|
567 | planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.dcerpc.rpcecho")
|
---|
568 | planoldpythontestsuite("ad_dc_ntvfs:local", "samba.tests.dcerpc.registry", extra_args=['-U"$USERNAME%$PASSWORD"'])
|
---|
569 | planoldpythontestsuite("ad_dc_ntvfs", "samba.tests.dcerpc.dnsserver", extra_args=['-U"$USERNAME%$PASSWORD"'])
|
---|
570 | planoldpythontestsuite("ad_dc", "samba.tests.dcerpc.dnsserver", extra_args=['-U"$USERNAME%$PASSWORD"'])
|
---|
571 | planoldpythontestsuite("ad_dc", "samba.tests.dcerpc.raw_protocol", extra_args=['-U"$USERNAME%$PASSWORD"'])
|
---|
572 | 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'])
|
---|
573 | plantestsuite_loadlist("samba4.tokengroups.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', '$LOADLIST', '$LISTOPT'])
|
---|
574 | 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'])
|
---|
575 | 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'])
|
---|
576 | planoldpythontestsuite("ad_dc_ntvfs", "dsdb_schema_info",
|
---|
577 | extra_path=[os.path.join(samba4srcdir, 'dsdb/tests/python')],
|
---|
578 | name="samba4.schemaInfo.python(ad_dc_ntvfs)",
|
---|
579 | extra_args=['-U"$DOMAIN/$DC_USERNAME%$DC_PASSWORD"'])
|
---|
580 | 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'])
|
---|
581 | 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'])
|
---|
582 | plantestsuite_loadlist("samba4.ldap.match_rules.python", "ad_dc_ntvfs", [python, os.path.join(srcdir(), "lib/ldb-samba/tests/match_rules.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
|
---|
583 | 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'])
|
---|
584 | for env in ["ad_dc_ntvfs", "fl2000dc", "fl2003dc", "fl2008r2dc"]:
|
---|
585 | 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'])
|
---|
586 | 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"])
|
---|
587 | 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'])
|
---|
588 | 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'])
|
---|
589 | if env != "fl2000dc":
|
---|
590 | # This test makes excessive use of the "userPassword" attribute which
|
---|
591 | # isn't available on DCs with Windows 2000 domain function level -
|
---|
592 | # therefore skip it in that configuration
|
---|
593 | 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'])
|
---|
594 | 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'])
|
---|
595 |
|
---|
596 | planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.upgradeprovisionneeddc")
|
---|
597 | planpythontestsuite("ad_dc:local", "samba.tests.posixacl")
|
---|
598 | planpythontestsuite("ad_dc_no_nss:local", "samba.tests.posixacl")
|
---|
599 | plantestsuite_loadlist("samba4.deletetest.python(ad_dc_ntvfs)", "ad_dc_ntvfs", [python, os.path.join(samba4srcdir, "dsdb/tests/python/deletetest.py"),
|
---|
600 | '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
|
---|
601 | plantestsuite("samba4.blackbox.samba3dump", "none", [os.path.join(samba4srcdir, "selftest/test_samba3dump.sh")])
|
---|
602 | plantestsuite("samba4.blackbox.upgrade", "none", ["PYTHON=%s" % python, os.path.join(samba4srcdir, "setup/tests/blackbox_s3upgrade.sh"), '$PREFIX/provision'])
|
---|
603 | plantestsuite("samba4.blackbox.provision.py", "none", ["PYTHON=%s" % python, os.path.join(samba4srcdir, "setup/tests/blackbox_provision.sh"), '$PREFIX/provision'])
|
---|
604 | plantestsuite("samba4.blackbox.upgradeprovision.current", "none", ["PYTHON=%s" % python, os.path.join(samba4srcdir, "setup/tests/blackbox_upgradeprovision.sh"), '$PREFIX/provision'])
|
---|
605 | plantestsuite("samba4.blackbox.setpassword.py", "none", ["PYTHON=%s" % python, os.path.join(samba4srcdir, "setup/tests/blackbox_setpassword.sh"), '$PREFIX/provision'])
|
---|
606 | plantestsuite("samba4.blackbox.newuser.py", "none", ["PYTHON=%s" % python, os.path.join(samba4srcdir, "setup/tests/blackbox_newuser.sh"), '$PREFIX/provision'])
|
---|
607 | plantestsuite("samba4.blackbox.group.py", "none", ["PYTHON=%s" % python, os.path.join(samba4srcdir, "setup/tests/blackbox_group.sh"), '$PREFIX/provision'])
|
---|
608 | 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'])
|
---|
609 | plantestsuite_loadlist("samba4.ldap.bind(fl2008r2dc)", "fl2008r2dc", [python, os.path.join(srcdir(), "auth/credentials/tests/bind.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '$LOADLIST', '$LISTOPT'])
|
---|
610 |
|
---|
611 | # This makes sure we test the rid allocation code
|
---|
612 | t = "rpc.samr.large-dc"
|
---|
613 | plansmbtorture4testsuite(t, "vampire_dc", ['$SERVER', '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], modname=("samba4.%s.one" % t))
|
---|
614 | plansmbtorture4testsuite(t, "vampire_dc", ['$SERVER', '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], modname="samba4.%s.two" % t)
|
---|
615 |
|
---|
616 | # some RODC testing
|
---|
617 | for env in ['rodc']:
|
---|
618 | plansmbtorture4testsuite('rpc.echo', env, ['ncacn_np:$SERVER', "-k", "yes", '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN'], modname="samba4.rpc.echo")
|
---|
619 | plansmbtorture4testsuite('rpc.echo', "%s:local" % env, ['ncacn_np:$SERVER', "-k", "yes", '-P', '--workgroup=$DOMAIN'], modname="samba4.rpc.echo")
|
---|
620 | plantestsuite("samba4.blackbox.provision-backend", "none", ["PYTHON=%s" % python, os.path.join(samba4srcdir, "setup/tests/blackbox_provision-backend.sh"), '$PREFIX/provision'])
|
---|
621 |
|
---|
622 | # Test renaming the DC
|
---|
623 | plantestsuite("samba4.blackbox.renamedc.sh", "none", ["PYTHON=%s" % python, os.path.join(bbdir, "renamedc.sh"), '$PREFIX/provision'])
|
---|
624 |
|
---|
625 | for env in ['vampire_dc', 'promoted_dc']:
|
---|
626 |
|
---|
627 | # DRS python tests
|
---|
628 | planoldpythontestsuite(env, "samba.tests.blackbox.samba_tool_drs",
|
---|
629 | environ={'DC1': '$DC_SERVER', 'DC2': '$%s_SERVER' % env.upper()},
|
---|
630 | extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
|
---|
631 | planoldpythontestsuite("%s:local" % env, "replica_sync",
|
---|
632 | extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
|
---|
633 | name="samba4.drs.replica_sync.python(%s)" % env,
|
---|
634 | environ={'DC1': '$DC_SERVER', 'DC2': '$%s_SERVER' % env.upper()},
|
---|
635 | extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
|
---|
636 | planoldpythontestsuite(env, "delete_object",
|
---|
637 | extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
|
---|
638 | name="samba4.drs.delete_object.python(%s)" % env,
|
---|
639 | environ={'DC1': '$DC_SERVER', 'DC2': '$%s_SERVER' % env.upper()},
|
---|
640 | extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
|
---|
641 | planoldpythontestsuite(env, "fsmo",
|
---|
642 | name="samba4.drs.fsmo.python(%s)" % env,
|
---|
643 | extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
|
---|
644 | environ={'DC1': "$DC_SERVER", 'DC2': '$%s_SERVER' % env.upper()},
|
---|
645 | extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
|
---|
646 | planoldpythontestsuite(env, "repl_schema",
|
---|
647 | extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
|
---|
648 | name="samba4.drs.repl_schema.python(%s)" % env,
|
---|
649 | environ={'DC1': "$DC_SERVER", 'DC2': '$%s_SERVER' % env.upper()},
|
---|
650 | extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
|
---|
651 |
|
---|
652 |
|
---|
653 | for env in ["ad_dc_ntvfs", "s4member", "rodc", "promoted_dc", "ad_dc", "ad_member"]:
|
---|
654 | 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])
|
---|
655 |
|
---|
656 | for env in ["ad_dc_ntvfs", "rodc", "promoted_dc", "ad_dc", "fl2000dc", "fl2003dc", "fl2008r2dc"]:
|
---|
657 | if env == "rodc":
|
---|
658 | extra_options = ['--option=torture:expect_rodc=true']
|
---|
659 | else:
|
---|
660 | extra_options = []
|
---|
661 |
|
---|
662 | plansmbtorture4testsuite('krb5.kdc', env, ['ncacn_np:$SERVER_IP', "-k", "yes", '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN', '--realm=$REALM'] + extra_options,
|
---|
663 | "samba4.krb5.kdc with specified account")
|
---|
664 | plansmbtorture4testsuite('krb5.kdc', env, ['ncacn_np:$SERVER_IP', "-k", "yes", '-Utestdenied%$PASSWORD', '--workgroup=$DOMAIN', '--realm=$REALM', '--option=torture:krb5-upn=testdenied_upn@$REALM.upn'] + extra_options,
|
---|
665 | "samba4.krb5.kdc with account DENIED permission to replicate to an RODC")
|
---|
666 |
|
---|
667 | # These last two tests are for users cached at the RODC
|
---|
668 | if env == "rodc":
|
---|
669 | extra_options = ['--option=torture:expect_rodc=true', '--option=torture:expect_cached_at_rodc=true']
|
---|
670 | else:
|
---|
671 | extra_options = []
|
---|
672 |
|
---|
673 | plansmbtorture4testsuite('krb5.kdc', "%s:local" % env, ['ncacn_np:$SERVER_IP', "-k", "yes", '-P',
|
---|
674 | '--workgroup=$DOMAIN', '--realm=$REALM',
|
---|
675 | '--option=torture:krb5-hostname=$SERVER',
|
---|
676 | '--option=torture:run_removedollar_test=true',
|
---|
677 | '--option=torture:expect_machine_account=true'] + extra_options,
|
---|
678 | "samba4.krb5.kdc with machine account")
|
---|
679 | plansmbtorture4testsuite('krb5.kdc', env, ['ncacn_np:$SERVER_IP', "-k", "yes", '-Utestallowed\ account%$PASSWORD',
|
---|
680 | '--workgroup=$DOMAIN', '--realm=$REALM',
|
---|
681 | '--option=torture:expect_machine_account=true',
|
---|
682 | '--option=torture:krb5-upn=testallowed\ upn@$REALM',
|
---|
683 | '--option=torture:krb5-hostname=testallowed'] + extra_options,
|
---|
684 | "samba4.krb5.kdc with account ALLOWED permission to replicate to an RODC")
|
---|
685 |
|
---|
686 |
|
---|
687 | for env in [
|
---|
688 | 'vampire_dc',
|
---|
689 | 'promoted_dc']:
|
---|
690 | planoldpythontestsuite(env, "samba.tests.kcc",
|
---|
691 | name="samba.tests.kcc",
|
---|
692 | environ={'TEST_SERVER': '$SERVER', 'TEST_USERNAME': '$USERNAME',
|
---|
693 | 'TEST_PASSWORD': '$PASSWORD',
|
---|
694 | 'TEST_ENV': env
|
---|
695 | },
|
---|
696 | extra_path=[os.path.join(srcdir(), "samba/python"), ]
|
---|
697 | )
|
---|
698 |
|
---|
699 | # Demote the vampire DC, it must be the last test each DC, before the dbcheck
|
---|
700 | for env in ['vampire_dc', 'promoted_dc', 'rodc']:
|
---|
701 | 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])
|
---|
702 |
|
---|
703 | # TODO: Verifying the databases really should be a part of the
|
---|
704 | # environment teardown.
|
---|
705 | # check the databases are all OK. PLEASE LEAVE THIS AS THE LAST TEST
|
---|
706 | for env in ["ad_dc_ntvfs", "ad_dc", "fl2000dc", "fl2003dc", "fl2008r2dc", 'vampire_dc', 'promoted_dc']:
|
---|
707 | plantestsuite("samba4.blackbox.dbcheck(%s)" % env, env + ":local" , ["PYTHON=%s" % python, os.path.join(bbdir, "dbcheck.sh"), '$PREFIX/provision', configuration])
|
---|