provision/sambadns: remove redundant site parameter
[Samba.git] / source3 / selftest / tests.py
blob5cee5245a95b3024a7568900d41cd28b9c1e0aef
1 #!/usr/bin/python
2 # This script generates a list of testsuites that should be run as part of
3 # the Samba 3 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 3, 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/samba3-knownfail. This makes it
12 # very easy to see what functionality is still missing in Samba 3 and makes
13 # it possible to run the testsuite against other servers, such as Samba 4 or
14 # Windows that have a different set of features.
16 # The syntax for a testsuite is "-- TEST --" on a single line, followed
17 # by the name of the test, the environment it needs and the command to run, all
18 # three separated by newlines. All other lines in the output are considered
19 # comments.
21 import os, sys
22 sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), "../../selftest")))
23 import selftesthelpers
24 from selftesthelpers import *
25 smbtorture4_options.extend([
26 '--option=torture:sharedelay=100000',
27 '--option=torture:writetimeupdatedelay=500000',
30 def plansmbtorture4testsuite(name, env, options, description=''):
31 if description == '':
32 modname = "samba3.%s" % (name, )
33 else:
34 modname = "samba3.%s %s" % (name, description)
36 selftesthelpers.plansmbtorture4testsuite(
37 name, env, options, target='samba3', modname=modname)
40 plantestsuite("samba3.blackbox.success", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/test_success.sh")])
41 plantestsuite("samba3.blackbox.failure", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/test_failure.sh")])
43 plantestsuite("samba3.local_s3", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/test_local_s3.sh")])
45 plantestsuite("samba3.blackbox.registry.upgrade", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/test_registry_upgrade.sh"), net, dbwrap_tool])
47 tests = ["FDPASS", "LOCK1", "LOCK2", "LOCK3", "LOCK4", "LOCK5", "LOCK6", "LOCK7", "LOCK9",
48 "UNLINK", "BROWSE", "ATTR", "TRANS2", "TORTURE",
49 "OPLOCK1", "OPLOCK2", "OPLOCK4", "STREAMERROR",
50 "DIR", "DIR1", "DIR-CREATETIME", "TCON", "TCONDEV", "RW1", "RW2", "RW3", "LARGE_READX", "RW-SIGNING",
51 "OPEN", "XCOPY", "RENAME", "DELETE", "DELETE-LN", "PROPERTIES", "W2K",
52 "TCON2", "IOCTL", "CHKPATH", "FDSESS", "CHAIN1", "CHAIN2",
53 "CHAIN3",
54 "GETADDRINFO", "UID-REGRESSION-TEST", "SHORTNAME-TEST",
55 "CASE-INSENSITIVE-CREATE", "SMB2-BASIC", "NTTRANS-FSCTL", "SMB2-NEGPROT",
56 "SMB2-SESSION-REAUTH", "SMB2-SESSION-RECONNECT",
57 "CLEANUP1",
58 "CLEANUP2",
59 "CLEANUP4",
60 "BAD-NBT-SESSION"]
62 for t in tests:
63 plantestsuite("samba3.smbtorture_s3.plain(s3dc).%s" % t, "s3dc", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/tmp', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
64 plantestsuite("samba3.smbtorture_s3.crypt_client(s3dc).%s" % t, "s3dc", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/tmp', '$USERNAME', '$PASSWORD', smbtorture3, "-e", "-l $LOCAL_PATH"])
65 if t == "TORTURE":
66 # this is a negative test to verify that the server rejects
67 # access without encryption
68 plantestsuite("samba3.smbtorture_s3.crypt_server(s3dc).%s" % t, "s3dc", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/tmpenc', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
69 plantestsuite("samba3.smbtorture_s3.plain(dc).%s" % t, "dc", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/tmp', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
71 tests = ["RW1", "RW2", "RW3"]
72 for t in tests:
73 plantestsuite("samba3.smbtorture_s3.vfs_aio_fork(simpleserver).%s" % t, "simpleserver", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/vfs_aio_fork', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
75 posix_tests = ["POSIX", "POSIX-APPEND"]
77 for t in posix_tests:
78 plantestsuite("samba3.smbtorture_s3.plain(s3dc).%s" % t, "s3dc", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/posix_share', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
79 plantestsuite("samba3.smbtorture_s3.crypt(s3dc).%s" % t, "s3dc", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/posix_share', '$USERNAME', '$PASSWORD', smbtorture3, "-e", "-l $LOCAL_PATH"])
80 plantestsuite("samba3.smbtorture_s3.plain(dc).%s" % t, "dc", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/posix_share', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
82 env = "s3dc:local"
83 t = "CLEANUP3"
84 plantestsuite("samba3.smbtorture_s3.plain(%s).%s" % (env, t), env, [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/tmp', '$USERNAME', '$PASSWORD', binpath('smbtorture3'), "", "-l $LOCAL_PATH"])
86 local_tests = [
87 "LOCAL-SUBSTITUTE",
88 "LOCAL-GENCACHE",
89 "LOCAL-TALLOC-DICT",
90 "LOCAL-BASE64",
91 "LOCAL-RBTREE",
92 "LOCAL-MEMCACHE",
93 "LOCAL-STREAM-NAME",
94 "LOCAL-WBCLIENT",
95 "LOCAL-string_to_sid",
96 "LOCAL-sid_to_string",
97 "LOCAL-binary_to_sid",
98 "LOCAL-DBTRANS",
99 "LOCAL-TEVENT-SELECT",
100 "LOCAL-CONVERT-STRING",
101 "LOCAL-CONV-AUTH-INFO",
102 "LOCAL-IDMAP-TDB-COMMON",
103 "LOCAL-MESSAGING-READ1",
104 "LOCAL-MESSAGING-READ2",
105 "LOCAL-MESSAGING-READ3",
106 "LOCAL-hex_encode_buf",
107 "LOCAL-sprintf_append",
108 "LOCAL-remove_duplicate_addrs2"]
110 for t in local_tests:
111 plantestsuite("samba3.smbtorture_s3.%s" % t, "s3dc", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/tmp', '$USERNAME', '$PASSWORD', smbtorture3, "-e"])
113 plantestsuite("samba.vfstest.stream_depot", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/stream-depot/run.sh"), binpath("vfstest"), "$PREFIX", configuration])
114 plantestsuite("samba.vfstest.xattr-tdb-1", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/xattr-tdb-1/run.sh"), binpath("vfstest"), "$PREFIX", configuration])
115 plantestsuite("samba.vfstest.acl", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/vfstest-acl/run.sh"), binpath("vfstest"), "$PREFIX", configuration])
116 plantestsuite("samba.vfstest.catia", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/vfstest-catia/run.sh"), binpath("vfstest"), "$PREFIX", configuration])
118 for options in ["--option=clientusespnego=no", " --option=clientntlmv2auth=no --option=clientlanmanauth=yes --max-protocol=LANMAN2", ""]:
119 env = "s3dc"
120 plantestsuite("samba3.blackbox.smbclient_auth.plain (%s) %s" % (env, options), env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IP', '$DC_USERNAME', '$DC_PASSWORD', smbclient3, configuration, options])
122 for env in ["s3dc", "member", "s3member", "dc", "s4member"]:
123 plantestsuite("samba3.blackbox.smbclient_machine_auth.plain (%s:local)" % env, "%s:local" % env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_machine_auth.sh"), '$SERVER', smbclient3, configuration])
125 for env in ["s3dc", "member", "s3member"]:
126 plantestsuite("samba3.blackbox.smbclient_auth.plain (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IP', '$DC_USERNAME', '$DC_PASSWORD', smbclient3, configuration])
127 plantestsuite("samba3.blackbox.smbclient_auth.plain (%s) member creds" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IP', '$SERVER/$USERNAME', '$PASSWORD', smbclient3, configuration])
129 for env in ["member", "s3member"]:
130 plantestsuite("samba3.blackbox.net_cred_change.(%s:local)" % env, "%s:local" % env, [os.path.join(samba3srcdir, "script/tests/test_net_cred_change.sh"), configuration])
132 env = "s3member"
133 t = "--krb5auth=$DOMAIN/$DC_USERNAME%$DC_PASSWORD"
134 plantestsuite("samba3.wbinfo_simple.(%s:local).%s" % (env, t), "%s:local" % env, [os.path.join(srcdir(), "nsswitch/tests/test_wbinfo_simple.sh"), t])
136 plantestsuite("samba3.ntlm_auth.krb5(ktest:local) old ccache", "ktest:local", [os.path.join(samba3srcdir, "script/tests/test_ntlm_auth_krb5.sh"), valgrindify(python), samba3srcdir, ntlm_auth3, '$PREFIX/ktest/krb5_ccache-2', '$SERVER', configuration])
138 plantestsuite("samba3.ntlm_auth.krb5(ktest:local)", "ktest:local", [os.path.join(samba3srcdir, "script/tests/test_ntlm_auth_krb5.sh"), valgrindify(python), samba3srcdir, ntlm_auth3, '$PREFIX/ktest/krb5_ccache-3', '$SERVER', configuration])
141 for env in ["maptoguest", "simpleserver"]:
142 plantestsuite("samba3.blackbox.smbclient_auth.plain (%s) local creds" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', smbclient3, configuration + " --option=clientntlmv2auth=no --option=clientlanmanauth=yes"])
144 env = "maptoguest"
145 plantestsuite("samba3.blackbox.smbclient_auth.plain (%s) bad username" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IP', 'notmy$USERNAME', '$PASSWORD', smbclient3, configuration + " --option=clientntlmv2auth=no --option=clientlanmanauth=yes"])
147 # plain
148 for env in ["s3dc"]:
149 plantestsuite("samba3.blackbox.smbclient_s3.plain (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_s3.sh"), '$SERVER', '$SERVER_IP', '$DOMAIN', '$DC_USERNAME', '$DC_PASSWORD', '$USERID', '$LOCAL_PATH', '$PREFIX', smbclient3, wbinfo, net, configuration])
151 for env in ["member", "s3member"]:
152 plantestsuite("samba3.blackbox.smbclient_s3.plain (%s) member creds" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_s3.sh"), '$SERVER', '$SERVER_IP', '$SERVER', '$SERVER/$USERNAME', '$PASSWORD', '$USERID', '$LOCAL_PATH', '$PREFIX', smbclient3, wbinfo, net, configuration])
154 for env in ["s3dc"]:
155 plantestsuite("samba3.blackbox.smbclient_s3.sign (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_s3.sh"), '$SERVER', '$SERVER_IP', '$DOMAIN', '$DC_USERNAME', '$DC_PASSWORD', '$USERID', '$LOCAL_PATH', '$PREFIX', smbclient3, wbinfo, net, configuration, "--signing=required"])
157 for env in ["member", "s3member"]:
158 plantestsuite("samba3.blackbox.smbclient_s3.sign (%s) member creds" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_s3.sh"), '$SERVER', '$SERVER_IP', '$SERVER', '$SERVER/$USERNAME', '$PASSWORD', '$USERID', '$LOCAL_PATH', '$PREFIX', smbclient3, wbinfo, net, configuration, "--signing=required"])
160 for env in ["s3dc"]:
161 # encrypted
162 plantestsuite("samba3.blackbox.smbclient_s3.crypt (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_s3.sh"), '$SERVER', '$SERVER_IP', '$DOMAIN', '$USERNAME', '$PASSWORD', '$USERID', '$LOCAL_PATH', '$PREFIX', smbclient3, wbinfo, net, configuration, "-e"])
166 # tar command tests
169 # find config.h
170 try:
171 config_h = os.environ["CONFIG_H"]
172 except KeyError:
173 config_h = os.path.join(samba4bindir, "default/include/config.h")
175 # see if libarchive is supported
176 f = open(config_h, 'r')
177 try:
178 have_libarchive = ("HAVE_LIBARCHIVE 1" in f.read())
179 finally:
180 f.close()
182 # tar command enabled only if built with libarchive
183 if have_libarchive:
184 # Test smbclient/tarmode
185 plantestsuite("samba3.blackbox.smbclient_tarmode (%s)" % env, env,
186 [os.path.join(samba3srcdir, "script/tests/test_smbclient_tarmode.sh"),
187 '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD',
188 '$LOCAL_PATH', '$PREFIX', smbclient3, configuration])
190 # Test suite for new smbclient/tar with libarchive (GSoC 13)
191 plantestsuite("samba3.blackbox.smbclient_tar (%s)" % env, env,
192 [os.path.join(samba3srcdir, "script/tests/test_smbclient_tarmode.pl"),
193 '-n', '$SERVER', '-i', '$SERVER_IP', '-s', 'tmp',
194 '-u', '$USERNAME', '-p', '$PASSWORD', '-l', '$LOCAL_PATH',
195 '-d', '$PREFIX', '-b', smbclient3,
196 '--subunit', '--', configuration])
198 #TODO encrypted against member, with member creds, and with DC creds
199 plantestsuite("samba3.blackbox.net.misc", "s3dc:local",
200 [os.path.join(samba3srcdir, "script/tests/test_net_misc.sh"),
201 scriptdir, "$SMB_CONF_PATH", net, configuration])
202 plantestsuite("samba3.blackbox.net.local.registry", "s3dc:local",
203 [os.path.join(samba3srcdir, "script/tests/test_net_registry.sh"),
204 scriptdir, "$SMB_CONF_PATH", net, configuration])
205 plantestsuite("samba3.blackbox.net.registry.check", "s3dc:local",
206 [os.path.join(samba3srcdir, "script/tests/test_net_registry_check.sh"),
207 scriptdir, "$SMB_CONF_PATH", net, configuration, dbwrap_tool])
208 plantestsuite("samba3.blackbox.net.rpc.registry", "s3dc",
209 [os.path.join(samba3srcdir, "script/tests/test_net_registry.sh"),
210 scriptdir, "$SMB_CONF_PATH", net, configuration, 'rpc'])
212 plantestsuite("samba3.blackbox.net.local.registry.roundtrip", "s3dc:local",
213 [os.path.join(samba3srcdir, "script/tests/test_net_registry_roundtrip.sh"),
214 scriptdir, "$SMB_CONF_PATH", net, configuration])
215 plantestsuite("samba3.blackbox.net.rpc.registry.roundtrip", "s3dc",
216 [os.path.join(samba3srcdir, "script/tests/test_net_registry_roundtrip.sh"),
217 scriptdir, "$SMB_CONF_PATH", net, configuration, 'rpc'])
219 plantestsuite("samba3.blackbox.net.local.conf", "s3dc:local",
220 [os.path.join(samba3srcdir, "script/tests/test_net_conf.sh"),
221 scriptdir, "$SMB_CONF_PATH", net, configuration])
222 plantestsuite("samba3.blackbox.net.rpc.conf", "s3dc",
223 [os.path.join(samba3srcdir, "script/tests/test_net_conf.sh"),
224 scriptdir, "$SMB_CONF_PATH", net, configuration, 'rpc'])
227 plantestsuite("samba3.blackbox.testparm", "s3dc:local",
228 [os.path.join(samba3srcdir, "script/tests/test_testparm_s3.sh"),
229 "$LOCAL_PATH"])
231 plantestsuite(
232 "samba3.pthreadpool", "s3dc",
233 [os.path.join(samba3srcdir, "script/tests/test_pthreadpool.sh")])
235 #smbtorture4 tests
237 base = ["base.attr", "base.charset", "base.chkpath", "base.defer_open", "base.delaywrite", "base.delete",
238 "base.deny1", "base.deny2", "base.deny3", "base.denydos", "base.dir1", "base.dir2",
239 "base.disconnect", "base.fdpass", "base.lock",
240 "base.mangle", "base.negnowait", "base.ntdeny1",
241 "base.ntdeny2", "base.open", "base.openattr", "base.properties", "base.rename", "base.rw1",
242 "base.secleak", "base.tcon", "base.tcondev", "base.trans2", "base.unlink", "base.vuid",
243 "base.xcopy", "base.samba3error"]
245 raw = ["raw.acls", "raw.chkpath", "raw.close", "raw.composite", "raw.context", "raw.eas",
246 "raw.ioctl", "raw.lock", "raw.mkdir", "raw.mux", "raw.notify", "raw.open", "raw.oplock",
247 "raw.qfileinfo", "raw.qfsinfo", "raw.read", "raw.rename", "raw.search", "raw.seek",
248 "raw.sfileinfo.base", "raw.sfileinfo.bug", "raw.streams", "raw.unlink", "raw.write",
249 "raw.samba3hide", "raw.samba3badpath", "raw.sfileinfo.rename", "raw.session",
250 "raw.samba3caseinsensitive", "raw.samba3posixtimedlock",
251 "raw.samba3rootdirfid", "raw.sfileinfo.end-of-file",
252 "raw.bench-oplock", "raw.bench-lock", "raw.bench-open", "raw.bench-tcon",
253 "raw.samba3checkfsp", "raw.samba3closeerr", "raw.samba3oplocklogoff", "raw.samba3badnameblob"]
255 smb2 = smbtorture4_testsuites("smb2.")
257 rpc = ["rpc.authcontext", "rpc.samba3.bind", "rpc.samba3.srvsvc", "rpc.samba3.sharesec",
258 "rpc.samba3.spoolss", "rpc.samba3.wkssvc", "rpc.samba3.winreg",
259 "rpc.samba3.getaliasmembership-0",
260 "rpc.samba3.netlogon", "rpc.samba3.sessionkey", "rpc.samba3.getusername",
261 "rpc.samba3.smb1-pipe-name", "rpc.samba3.smb2-pipe-name",
262 "rpc.samba3.smb-reauth1", "rpc.samba3.smb-reauth2",
263 "rpc.svcctl", "rpc.ntsvcs", "rpc.winreg", "rpc.eventlog",
264 "rpc.spoolss.printserver", "rpc.spoolss.win", "rpc.spoolss.notify", "rpc.spoolss.printer",
265 "rpc.spoolss.driver",
266 "rpc.lsa", "rpc.lsa-getuser", "rpc.lsa.lookupsids", "rpc.lsa.lookupnames",
267 "rpc.lsa.privileges", "rpc.lsa.secrets",
268 "rpc.samr", "rpc.samr.users", "rpc.samr.users.privileges", "rpc.samr.passwords",
269 "rpc.samr.passwords.pwdlastset", "rpc.samr.passwords.lockout", "rpc.samr.passwords.badpwdcount", "rpc.samr.large-dc", "rpc.samr.machine.auth",
270 "rpc.samr.priv", "rpc.samr.passwords.validate",
271 "rpc.netlogon.admin",
272 "rpc.schannel", "rpc.schannel2", "rpc.bench-schannel1", "rpc.join", "rpc.bind"]
274 local = ["local.ndr"]
276 idmap = [ "idmap.rfc2307" ]
278 rap = ["rap.basic", "rap.rpc", "rap.printing", "rap.sam"]
280 unix = ["unix.info2", "unix.whoami"]
282 nbt = ["nbt.dgram" ]
284 libsmbclient = ["libsmbclient"]
286 tests= base + raw + smb2 + rpc + unix + local + rap + nbt + libsmbclient + idmap
288 for t in tests:
289 if t == "base.delaywrite":
290 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --maximum-runtime=900')
291 plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --maximum-runtime=900')
292 elif t == "rap.sam":
293 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --option=doscharset=ISO-8859-1')
294 plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --option=doscharset=ISO-8859-1')
295 elif t == "winbind.pac":
296 plansmbtorture4testsuite(t, "s3member:local", '//$SERVER/tmp --realm=$REALM --machine-pass --option=torture:addc=$DC_SERVER', description="machine account")
297 elif t == "unix.whoami":
298 plansmbtorture4testsuite(t, "member:local", '//$SERVER/tmp --machine-pass', description="machine account")
299 plansmbtorture4testsuite(t, "s3member:local", '//$SERVER/tmp --machine-pass --option=torture:addc=$DC_SERVER', description="machine account")
300 for env in ["s3dc", "member"]:
301 plansmbtorture4testsuite(t, env, '//$SERVER/tmp -U$DC_USERNAME%$DC_PASSWORD')
302 plansmbtorture4testsuite(t, env, '//$SERVER/tmpguest -U%', description='anonymous connection')
303 for env in ["plugin_s4_dc", "s3member"]:
304 plansmbtorture4testsuite(t, env, '//$SERVER/tmp -U$DC_USERNAME@$REALM%$DC_PASSWORD --option=torture:addc=$DC_SERVER')
305 plansmbtorture4testsuite(t, env, '//$SERVER/tmp -k yes -U$DC_USERNAME@$REALM%$DC_PASSWORD --option=torture:addc=$DC_SERVER', description='kerberos connection')
306 plansmbtorture4testsuite(t, env, '//$SERVER/tmpguest -U% --option=torture:addc=$DC_SERVER', description='anonymous connection')
307 elif t == "raw.samba3posixtimedlock":
308 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmpguest -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/s3dc/share')
309 plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER_IP/tmpguest -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/plugin_s4_dc/share')
310 elif t == "raw.chkpath":
311 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD')
312 plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD')
313 elif t == "raw.samba3hide" or t == "raw.samba3checkfsp" or t == "raw.samba3closeerr":
314 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
315 plansmbtorture4testsuite(t, "simpleserver", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
316 plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
317 elif t == "raw.session" or t == "smb2.session":
318 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD', 'plain')
319 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmpenc -U$USERNAME%$PASSWORD', 'enc')
320 plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER/tmp -k no -U$USERNAME%$PASSWORD', 'ntlm')
321 plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER/tmp -k yes -U$USERNAME%$PASSWORD', 'krb5')
322 elif t == "rpc.lsa":
323 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD', 'over ncacn_np ')
324 plansmbtorture4testsuite(t, "s3dc", 'ncacn_ip_tcp:$SERVER_IP -U$USERNAME%$PASSWORD', 'over ncacn_ip_tcp ')
325 plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD', 'over ncacn_np ')
326 plansmbtorture4testsuite(t, "plugin_s4_dc", 'ncacn_ip_tcp:$SERVER_IP -U$USERNAME%$PASSWORD', 'over ncacn_ip_tcp ')
327 elif t == "rpc.samr.passwords.validate":
328 plansmbtorture4testsuite(t, "s3dc", 'ncacn_ip_tcp:$SERVER_IP -U$USERNAME%$PASSWORD', 'over ncacn_ip_tcp ')
329 plansmbtorture4testsuite(t, "plugin_s4_dc", 'ncacn_ip_tcp:$SERVER_IP -U$USERNAME%$PASSWORD', 'over ncacn_ip_tcp ')
330 elif t == "smb2.durable-open" or t == "smb2.durable-v2-open":
331 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/durable -U$USERNAME%$PASSWORD')
332 plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER_IP/durable -U$USERNAME%$PASSWORD')
333 elif t == "base.rw1":
334 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
335 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/valid-users-tmp -U$USERNAME%$PASSWORD')
336 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/write-list-tmp -U$USERNAME%$PASSWORD')
337 plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
338 elif t == "idmap.rfc2307":
339 plantestsuite(t, "s3member_rfc2307", [os.path.join(samba3srcdir, "../nsswitch/tests/test_idmap_rfc2307.sh"), '$DOMAIN', 'Administrator', '2000000', '"Domain Users"', '2000001', 'ou=idmap,dc=samba,dc=example,dc=com', '$DC_SERVER', '$DC_USERNAME', '$DC_PASSWORD'])
340 elif t == "raw.acls":
341 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
342 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/nfs4acl_simple -U$USERNAME%$PASSWORD', description='nfs4acl_xattr-simple')
343 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/nfs4acl_special -U$USERNAME%$PASSWORD', description='nfs4acl_xattr-special')
344 plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD')
345 elif t == "smb2.ioctl":
346 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/fs_specific -U$USERNAME%$PASSWORD', 'fs_specific')
347 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
348 plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
349 elif t == "smb2.lock":
350 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/aio -U$USERNAME%$PASSWORD', 'aio')
351 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
352 plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
353 elif t == "raw.search":
354 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
355 # test the dirsort module.
356 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmpsort -U$USERNAME%$PASSWORD')
357 plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
358 else:
359 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
360 plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
363 test = 'rpc.lsa.lookupsids'
364 auth_options = ["", "ntlm", "spnego", "spnego,ntlm" ]
365 signseal_options = ["", ",connect", ",sign", ",seal"]
366 endianness_options = ["", ",bigendian"]
367 for s in signseal_options:
368 for e in endianness_options:
369 for a in auth_options:
370 binding_string = "ncacn_np:$SERVER[%s%s%s]" % (a, s, e)
371 options = binding_string + " -U$USERNAME%$PASSWORD"
372 plansmbtorture4testsuite(test, "s3dc", options, 'over ncacn_np with [%s%s%s] ' % (a, s, e))
373 plantestsuite("samba3.blackbox.rpcclient over ncacn_np with [%s%s%s] " % (a, s, e), "s3dc:local", [os.path.join(samba3srcdir, "script/tests/test_rpcclient.sh"),
374 "none", options, configuration])
376 # We should try more combinations in future, but this is all
377 # the pre-calculated credentials cache supports at the moment
378 e = ""
379 a = ""
380 binding_string = "ncacn_np:$SERVER[%s%s%s]" % (a, s, e)
381 options = binding_string + " -k yes --krb5-ccache=$PREFIX/ktest/krb5_ccache-2"
382 plansmbtorture4testsuite(test, "ktest", options, 'krb5 with old ccache ncacn_np with [%s%s%s] ' % (a, s, e))
384 options = binding_string + " -k yes --krb5-ccache=$PREFIX/ktest/krb5_ccache-3"
385 plansmbtorture4testsuite(test, "ktest", options, 'krb5 ncacn_np with [%s%s%s] ' % (a, s, e))
387 auth_options2 = ["krb5", "spnego,krb5"]
388 for a in auth_options2:
389 binding_string = "ncacn_np:$SERVER[%s%s%s]" % (a, s, e)
391 plantestsuite("samba3.blackbox.rpcclient krb5 ncacn_np with [%s%s%s] " % (a, s, e), "ktest:local", [os.path.join(samba3srcdir, "script/tests/test_rpcclient.sh"),
392 "$PREFIX/ktest/krb5_ccache-3", binding_string, "-k", configuration])
394 plantestsuite("samba3.blackbox.rpcclient_samlogon", "s3member:local", [os.path.join(samba3srcdir, "script/tests/test_rpcclient_samlogon.sh"),
395 "$DC_USERNAME", "$DC_PASSWORD", "ncacn_np:$DC_SERVER", configuration])
397 options_list = ["", "-e"]
398 for options in options_list:
399 plantestsuite("samba3.blackbox.smbclient_krb5 old ccache %s" % options, "ktest:local",
400 [os.path.join(samba3srcdir, "script/tests/test_smbclient_krb5.sh"),
401 "$PREFIX/ktest/krb5_ccache-2",
402 smbclient3, "$SERVER", options, configuration])
404 plantestsuite("samba3.blackbox.smbclient_krb5 old ccache %s" % options, "ktest:local",
405 [os.path.join(samba3srcdir, "script/tests/test_smbclient_krb5.sh"),
406 "$PREFIX/ktest/krb5_ccache-2",
407 smbclient3, "$SERVER", options, configuration])
409 plantestsuite("samba3.blackbox.smbclient_large_file %s" % options, "ktest:local",
410 [os.path.join(samba3srcdir, "script/tests/test_smbclient_posix_large.sh"),
411 "$PREFIX/ktest/krb5_ccache-3",
412 smbclient3, "$SERVER", "$PREFIX", options, "-k " + configuration])
414 plantestsuite("samba3.blackbox.smbclient_posix_large %s krb5" % options, "ktest:local",
415 [os.path.join(samba3srcdir, "script/tests/test_smbclient_posix_large.sh"),
416 "$PREFIX/ktest/krb5_ccache-3",
417 smbclient3, "$SERVER", "$PREFIX", options, "-k " + configuration])
419 plantestsuite("samba3.blackbox.smbclient_posix_large %s NTLM" % options, "s3dc:local",
420 [os.path.join(samba3srcdir, "script/tests/test_smbclient_posix_large.sh"),
421 "none",
422 smbclient3, "$SERVER", "$PREFIX", options, "-U$USERNAME%$PASSWORD " + configuration])
424 for e in endianness_options:
425 for a in auth_options:
426 for s in signseal_options:
427 binding_string = "ncacn_ip_tcp:$SERVER_IP[%s%s%s]" % (a, s, e)
428 options = binding_string + " -U$USERNAME%$PASSWORD"
429 plansmbtorture4testsuite(test, "s3dc", options, 'over ncacn_ip_tcp with [%s%s%s] ' % (a, s, e))
431 plansmbtorture4testsuite('rpc.epmapper', 's3dc:local', 'ncalrpc: -U$USERNAME%$PASSWORD', 'over ncalrpc')