torture: add LOCAL-sid_to_string testcase
[Samba.git] / source3 / selftest / tests.py
blobafab6872a0f1f9500ffff098252768bf86fc1244
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:winbindd_netbios_name=$SERVER"',
27 '--option="torture:winbindd_netbios_domain=$DOMAIN"',
28 '--option=torture:sharedelay=100000',
29 '--option=torture:writetimeupdatedelay=500000',
32 smbtorture4_possible = print_smbtorture4_version()
34 def plansmbtorture4testsuite(name, env, options, description=''):
35 if description == '':
36 modname = "samba3.%s" % (name, )
37 else:
38 modname = "samba3.%s %s" % (name, description)
40 if smbtorture4_possible:
41 selftesthelpers.plansmbtorture4testsuite(
42 name, env, options, target='samba3', modname=modname)
43 else:
44 skiptestsuite(name, "smbtorture4 is not available")
47 plantestsuite("samba3.blackbox.success", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/test_success.sh")])
48 plantestsuite("samba3.blackbox.failure", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/test_failure.sh")])
50 plantestsuite("samba3.local_s3", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/test_local_s3.sh")])
52 plantestsuite("samba3.blackbox.registry.upgrade", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/test_registry_upgrade.sh"), net, dbwrap_tool])
54 tests = ["FDPASS", "LOCK1", "LOCK2", "LOCK3", "LOCK4", "LOCK5", "LOCK6", "LOCK7", "LOCK9",
55 "UNLINK", "BROWSE", "ATTR", "TRANS2", "TORTURE",
56 "OPLOCK1", "OPLOCK2", "OPLOCK4", "STREAMERROR",
57 "DIR", "DIR1", "DIR-CREATETIME", "TCON", "TCONDEV", "RW1", "RW2", "RW3", "LARGE_READX", "RW-SIGNING",
58 "OPEN", "XCOPY", "RENAME", "DELETE", "DELETE-LN", "PROPERTIES", "W2K",
59 "TCON2", "IOCTL", "CHKPATH", "FDSESS", "CHAIN1", "CHAIN2",
60 "CHAIN3",
61 "GETADDRINFO", "UID-REGRESSION-TEST", "SHORTNAME-TEST",
62 "CASE-INSENSITIVE-CREATE", "SMB2-BASIC", "NTTRANS-FSCTL", "SMB2-NEGPROT",
63 "SMB2-SESSION-REAUTH", "SMB2-SESSION-RECONNECT",
64 "CLEANUP1",
65 "CLEANUP2",
66 "BAD-NBT-SESSION"]
68 for t in tests:
69 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"])
70 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"])
71 if t == "TORTURE":
72 # this is a negative test to verify that the server rejects
73 # access without encryption
74 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"])
75 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"])
77 tests = ["RW1", "RW2", "RW3"]
78 for t in tests:
79 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"])
81 posix_tests = ["POSIX", "POSIX-APPEND"]
83 for t in posix_tests:
84 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"])
85 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"])
86 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"])
88 env = "s3dc:local"
89 t = "CLEANUP3"
90 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"])
92 local_tests = [
93 "LOCAL-SUBSTITUTE",
94 "LOCAL-GENCACHE",
95 "LOCAL-TALLOC-DICT",
96 "LOCAL-BASE64",
97 "LOCAL-RBTREE",
98 "LOCAL-MEMCACHE",
99 "LOCAL-STREAM-NAME",
100 "LOCAL-WBCLIENT",
101 "LOCAL-string_to_sid",
102 "LOCAL-sid_to_string",
103 "LOCAL-binary_to_sid",
104 "LOCAL-DBTRANS",
105 "LOCAL-TEVENT-SELECT",
106 "LOCAL-CONVERT-STRING",
107 "LOCAL-CONV-AUTH-INFO",
108 "LOCAL-IDMAP-TDB-COMMON",
109 "LOCAL-hex_encode_buf",
110 "LOCAL-sprintf_append",
111 "LOCAL-remove_duplicate_addrs2"]
113 for t in local_tests:
114 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"])
116 tests = ["--ping", "--separator",
117 "--own-domain",
118 "--all-domains",
119 "--trusted-domains",
120 "--domain-info=BUILTIN",
121 "--domain-info=$DOMAIN",
122 "--online-status",
123 "--online-status --domain=BUILTIN",
124 "--online-status --domain=$DOMAIN",
125 "--check-secret --domain=$DOMAIN",
126 "--change-secret --domain=$DOMAIN",
127 "--check-secret --domain=$DOMAIN",
128 "--online-status --domain=$DOMAIN",
129 #Didn't pass yet# "--domain-users",
130 "--domain-groups",
131 "--name-to-sid=$DC_USERNAME",
132 "--name-to-sid=$DOMAIN\\\\$DC_USERNAME",
133 #Didn't pass yet# "--user-info=$USERNAME",
134 "--user-groups=$DOMAIN\\\\$DC_USERNAME",
135 "--authenticate=$DOMAIN\\\\$DC_USERNAME%$DC_PASSWORD",
136 "--allocate-uid",
137 "--allocate-gid"]
139 plantestsuite("samba.vfstest.stream_depot", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/stream-depot/run.sh"), binpath("vfstest"), "$PREFIX", configuration])
140 plantestsuite("samba.vfstest.xattr-tdb-1", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/xattr-tdb-1/run.sh"), binpath("vfstest"), "$PREFIX", configuration])
141 plantestsuite("samba.vfstest.acl", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/vfstest-acl/run.sh"), binpath("vfstest"), "$PREFIX", configuration])
142 plantestsuite("samba.vfstest.catia", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/vfstest-catia/run.sh"), binpath("vfstest"), "$PREFIX", configuration])
144 for options in ["--option=clientusespnego=no", " --option=clientntlmv2auth=no --option=clientlanmanauth=yes --max-protocol=LANMAN2", ""]:
145 env = "s3dc"
146 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])
148 for env in ["s3dc", "member", "s3member", "dc", "s4member"]:
149 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])
151 for env in ["s3dc", "member", "s3member"]:
152 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])
153 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])
155 for t in tests:
156 plantestsuite("samba3.wbinfo_s3.(%s:local).%s" % (env, t), "%s:local" % env, [os.path.join(samba3srcdir, "script/tests/test_wbinfo_s3.sh"), t])
158 plantestsuite(
159 "samba3.wbinfo_sids2xids.(%s:local)" % env, "%s:local" % env,
160 [os.path.join(samba3srcdir, "script/tests/test_wbinfo_sids2xids.sh")])
162 plantestsuite(
163 "samba3.ntlm_auth.diagnostics(%s:local)" % env, "%s:local" % env,
164 [os.path.join(samba3srcdir, "script/tests/test_ntlm_auth_diagnostics.sh"), ntlm_auth3, '$DOMAIN', '$DC_USERNAME', '$DC_PASSWORD', configuration])
166 plantestsuite("samba3.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])
168 env = "s3member"
169 t = "--krb5auth=$DOMAIN\\\\$DC_USERNAME%$DC_PASSWORD"
170 plantestsuite("samba3.wbinfo_s3.(%s:local).%s" % (env, t), "%s:local" % env, [os.path.join(samba3srcdir, "script/tests/test_wbinfo_s3.sh"), t])
172 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])
174 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])
177 for env in ["maptoguest", "simpleserver"]:
178 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"])
180 env = "maptoguest"
181 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"])
183 # plain
184 for env in ["s3dc"]:
185 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])
187 for env in ["member", "s3member"]:
188 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])
190 for env in ["s3dc"]:
191 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"])
193 for env in ["member", "s3member"]:
194 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"])
196 for env in ["s3dc"]:
197 # encrypted
198 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"])
200 # Test smbclient/tarmode
201 plantestsuite("samba3.blackbox.smbclient_tarmode (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_tarmode.sh"), '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', '$LOCAL_PATH', '$PREFIX', smbclient3, configuration])
203 #TODO encrypted against member, with member creds, and with DC creds
204 plantestsuite("samba3.blackbox.net.misc", "s3dc:local",
205 [os.path.join(samba3srcdir, "script/tests/test_net_misc.sh"),
206 scriptdir, "$SMB_CONF_PATH", net, configuration])
207 plantestsuite("samba3.blackbox.net.local.registry", "s3dc:local",
208 [os.path.join(samba3srcdir, "script/tests/test_net_registry.sh"),
209 scriptdir, "$SMB_CONF_PATH", net, configuration])
210 plantestsuite("samba3.blackbox.net.registry.check", "s3dc:local",
211 [os.path.join(samba3srcdir, "script/tests/test_net_registry_check.sh"),
212 scriptdir, "$SMB_CONF_PATH", net, configuration, dbwrap_tool])
213 plantestsuite("samba3.blackbox.net.rpc.registry", "s3dc",
214 [os.path.join(samba3srcdir, "script/tests/test_net_registry.sh"),
215 scriptdir, "$SMB_CONF_PATH", net, configuration, 'rpc'])
217 plantestsuite("samba3.blackbox.net.local.registry.roundtrip", "s3dc:local",
218 [os.path.join(samba3srcdir, "script/tests/test_net_registry_roundtrip.sh"),
219 scriptdir, "$SMB_CONF_PATH", net, configuration])
220 plantestsuite("samba3.blackbox.net.rpc.registry.roundtrip", "s3dc",
221 [os.path.join(samba3srcdir, "script/tests/test_net_registry_roundtrip.sh"),
222 scriptdir, "$SMB_CONF_PATH", net, configuration, 'rpc'])
224 plantestsuite("samba3.blackbox.net.local.conf", "s3dc:local",
225 [os.path.join(samba3srcdir, "script/tests/test_net_conf.sh"),
226 scriptdir, "$SMB_CONF_PATH", net, configuration])
227 plantestsuite("samba3.blackbox.net.rpc.conf", "s3dc",
228 [os.path.join(samba3srcdir, "script/tests/test_net_conf.sh"),
229 scriptdir, "$SMB_CONF_PATH", net, configuration, 'rpc'])
232 plantestsuite("samba3.blackbox.testparm", "s3dc:local",
233 [os.path.join(samba3srcdir, "script/tests/test_testparm_s3.sh"),
234 "$LOCAL_PATH"])
236 plantestsuite(
237 "samba3.pthreadpool", "s3dc",
238 [os.path.join(samba3srcdir, "script/tests/test_pthreadpool.sh")])
240 #smbtorture4 tests
242 base = ["base.attr", "base.charset", "base.chkpath", "base.defer_open", "base.delaywrite", "base.delete",
243 "base.deny1", "base.deny2", "base.deny3", "base.denydos", "base.dir1", "base.dir2",
244 "base.disconnect", "base.fdpass", "base.lock",
245 "base.mangle", "base.negnowait", "base.ntdeny1",
246 "base.ntdeny2", "base.open", "base.openattr", "base.properties", "base.rename", "base.rw1",
247 "base.secleak", "base.tcon", "base.tcondev", "base.trans2", "base.unlink", "base.vuid",
248 "base.xcopy", "base.samba3error"]
250 raw = ["raw.acls", "raw.chkpath", "raw.close", "raw.composite", "raw.context", "raw.eas",
251 "raw.ioctl", "raw.lock", "raw.mkdir", "raw.mux", "raw.notify", "raw.open", "raw.oplock",
252 "raw.qfileinfo", "raw.qfsinfo", "raw.read", "raw.rename", "raw.search", "raw.seek",
253 "raw.sfileinfo.base", "raw.sfileinfo.bug", "raw.streams", "raw.unlink", "raw.write",
254 "raw.samba3hide", "raw.samba3badpath", "raw.sfileinfo.rename", "raw.session",
255 "raw.samba3caseinsensitive", "raw.samba3posixtimedlock",
256 "raw.samba3rootdirfid", "raw.sfileinfo.end-of-file",
257 "raw.bench-oplock", "raw.bench-lock", "raw.bench-open", "raw.bench-tcon",
258 "raw.samba3checkfsp", "raw.samba3closeerr", "raw.samba3oplocklogoff", "raw.samba3badnameblob"]
260 smb2 = smbtorture4_testsuites("smb2.")
262 rpc = ["rpc.authcontext", "rpc.samba3.bind", "rpc.samba3.srvsvc", "rpc.samba3.sharesec",
263 "rpc.samba3.spoolss", "rpc.samba3.wkssvc", "rpc.samba3.winreg",
264 "rpc.samba3.getaliasmembership-0",
265 "rpc.samba3.netlogon", "rpc.samba3.sessionkey", "rpc.samba3.getusername",
266 "rpc.samba3.smb1-pipe-name", "rpc.samba3.smb2-pipe-name",
267 "rpc.samba3.smb-reauth1", "rpc.samba3.smb-reauth2",
268 "rpc.svcctl", "rpc.ntsvcs", "rpc.winreg", "rpc.eventlog",
269 "rpc.spoolss.printserver", "rpc.spoolss.win", "rpc.spoolss.notify", "rpc.spoolss.printer",
270 "rpc.spoolss.driver",
271 "rpc.lsa", "rpc.lsa-getuser", "rpc.lsa.lookupsids", "rpc.lsa.lookupnames",
272 "rpc.lsa.privileges", "rpc.lsa.secrets",
273 "rpc.samr", "rpc.samr.users", "rpc.samr.users.privileges", "rpc.samr.passwords",
274 "rpc.samr.passwords.pwdlastset", "rpc.samr.large-dc", "rpc.samr.machine.auth",
275 "rpc.samr.priv", "rpc.samr.passwords.validate",
276 "rpc.netlogon.admin",
277 "rpc.schannel", "rpc.schannel2", "rpc.bench-schannel1", "rpc.join", "rpc.bind"]
279 local = ["local.nss-wrapper", "local.ndr"]
281 winbind = ["winbind.struct", "winbind.wbclient", "winbind.pac"]
283 idmap = [ "idmap.rfc2307" ]
285 rap = ["rap.basic", "rap.rpc", "rap.printing", "rap.sam"]
287 unix = ["unix.info2", "unix.whoami"]
289 nbt = ["nbt.dgram" ]
291 libsmbclient = ["libsmbclient"]
293 tests= base + raw + smb2 + rpc + unix + local + winbind + rap + nbt + libsmbclient + idmap
295 for t in tests:
296 if t == "base.delaywrite":
297 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --maximum-runtime=900')
298 plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --maximum-runtime=900')
299 elif t == "rap.sam":
300 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --option=doscharset=ISO-8859-1')
301 plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --option=doscharset=ISO-8859-1')
302 elif t == "winbind.pac":
303 plansmbtorture4testsuite(t, "s3member:local", '//$SERVER/tmp --realm=$REALM --machine-pass --option=torture:addc=$DC_SERVER', description="machine account")
304 elif t == "unix.whoami":
305 plansmbtorture4testsuite(t, "member:local", '//$SERVER/tmp --machine-pass', description="machine account")
306 plansmbtorture4testsuite(t, "s3member:local", '//$SERVER/tmp --machine-pass --option=torture:addc=$DC_SERVER', description="machine account")
307 for env in ["s3dc", "member"]:
308 plansmbtorture4testsuite(t, env, '//$SERVER/tmp -U$DC_USERNAME%$DC_PASSWORD')
309 plansmbtorture4testsuite(t, env, '//$SERVER/tmpguest -U%', description='anonymous connection')
310 for env in ["plugin_s4_dc", "s3member"]:
311 plansmbtorture4testsuite(t, env, '//$SERVER/tmp -U$DC_USERNAME@$REALM%$DC_PASSWORD --option=torture:addc=$DC_SERVER')
312 plansmbtorture4testsuite(t, env, '//$SERVER/tmp -k yes -U$DC_USERNAME@$REALM%$DC_PASSWORD --option=torture:addc=$DC_SERVER', description='kerberos connection')
313 plansmbtorture4testsuite(t, env, '//$SERVER/tmpguest -U% --option=torture:addc=$DC_SERVER', description='anonymous connection')
314 elif t == "raw.samba3posixtimedlock":
315 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmpguest -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/s3dc/share')
316 plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER_IP/tmpguest -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/plugin_s4_dc/share')
317 elif t == "raw.chkpath":
318 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD')
319 plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD')
320 elif t == "raw.samba3hide" or t == "raw.samba3checkfsp" or t == "raw.samba3closeerr":
321 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
322 plansmbtorture4testsuite(t, "simpleserver", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
323 plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
324 elif t == "raw.session" or t == "smb2.session":
325 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD', 'plain')
326 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmpenc -U$USERNAME%$PASSWORD', 'enc')
327 plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER/tmp -k no -U$USERNAME%$PASSWORD', 'ntlm')
328 plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER/tmp -k yes -U$USERNAME%$PASSWORD', 'krb5')
329 elif t == "rpc.lsa":
330 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD', 'over ncacn_np ')
331 plansmbtorture4testsuite(t, "s3dc", 'ncacn_ip_tcp:$SERVER_IP -U$USERNAME%$PASSWORD', 'over ncacn_ip_tcp ')
332 plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD', 'over ncacn_np ')
333 plansmbtorture4testsuite(t, "plugin_s4_dc", 'ncacn_ip_tcp:$SERVER_IP -U$USERNAME%$PASSWORD', 'over ncacn_ip_tcp ')
334 elif t == "rpc.samr.passwords.validate":
335 plansmbtorture4testsuite(t, "s3dc", 'ncacn_ip_tcp:$SERVER_IP -U$USERNAME%$PASSWORD', 'over ncacn_ip_tcp ')
336 plansmbtorture4testsuite(t, "plugin_s4_dc", 'ncacn_ip_tcp:$SERVER_IP -U$USERNAME%$PASSWORD', 'over ncacn_ip_tcp ')
337 elif t == "smb2.durable-open" or t == "smb2.durable-v2-open":
338 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/durable -U$USERNAME%$PASSWORD')
339 plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER_IP/durable -U$USERNAME%$PASSWORD')
340 elif t == "base.rw1":
341 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
342 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/valid-users-tmp -U$USERNAME%$PASSWORD')
343 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/write-list-tmp -U$USERNAME%$PASSWORD')
344 plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
345 elif t == "idmap.rfc2307":
346 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'])
347 elif t == "raw.acls":
348 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
349 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/nfs4acl_simple -U$USERNAME%$PASSWORD', description='nfs4acl_xattr-simple')
350 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/nfs4acl_special -U$USERNAME%$PASSWORD', description='nfs4acl_xattr-special')
351 plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD')
352 else:
353 plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
354 plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
357 test = 'rpc.lsa.lookupsids'
358 auth_options = ["", "ntlm", "spnego", "spnego,ntlm" ]
359 signseal_options = ["", ",connect", ",sign", ",seal"]
360 endianness_options = ["", ",bigendian"]
361 for s in signseal_options:
362 for e in endianness_options:
363 for a in auth_options:
364 binding_string = "ncacn_np:$SERVER[%s%s%s]" % (a, s, e)
365 options = binding_string + " -U$USERNAME%$PASSWORD"
366 plansmbtorture4testsuite(test, "s3dc", options, 'over ncacn_np with [%s%s%s] ' % (a, s, e))
367 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"),
368 "none", options, configuration])
370 # We should try more combinations in future, but this is all
371 # the pre-calculated credentials cache supports at the moment
372 e = ""
373 a = ""
374 binding_string = "ncacn_np:$SERVER[%s%s%s]" % (a, s, e)
375 options = binding_string + " -k yes --krb5-ccache=$PREFIX/ktest/krb5_ccache-2"
376 plansmbtorture4testsuite(test, "ktest", options, 'krb5 with old ccache ncacn_np with [%s%s%s] ' % (a, s, e))
378 options = binding_string + " -k yes --krb5-ccache=$PREFIX/ktest/krb5_ccache-3"
379 plansmbtorture4testsuite(test, "ktest", options, 'krb5 ncacn_np with [%s%s%s] ' % (a, s, e))
381 auth_options2 = ["krb5", "spnego,krb5"]
382 for a in auth_options2:
383 binding_string = "ncacn_np:$SERVER[%s%s%s]" % (a, s, e)
385 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"),
386 "$PREFIX/ktest/krb5_ccache-3", binding_string, "-k", configuration])
389 options_list = ["", "-e"]
390 for options in options_list:
391 plantestsuite("samba3.blackbox.smbclient_krb5 old ccache %s" % options, "ktest:local",
392 [os.path.join(samba3srcdir, "script/tests/test_smbclient_krb5.sh"),
393 "$PREFIX/ktest/krb5_ccache-2",
394 smbclient3, "$SERVER", options, configuration])
396 plantestsuite("samba3.blackbox.smbclient_krb5 old ccache %s" % options, "ktest:local",
397 [os.path.join(samba3srcdir, "script/tests/test_smbclient_krb5.sh"),
398 "$PREFIX/ktest/krb5_ccache-2",
399 smbclient3, "$SERVER", options, configuration])
401 plantestsuite("samba3.blackbox.smbclient_large_file %s" % options, "ktest:local",
402 [os.path.join(samba3srcdir, "script/tests/test_smbclient_posix_large.sh"),
403 "$PREFIX/ktest/krb5_ccache-3",
404 smbclient3, "$SERVER", "$PREFIX", options, "-k " + configuration])
406 plantestsuite("samba3.blackbox.smbclient_posix_large %s krb5" % options, "ktest:local",
407 [os.path.join(samba3srcdir, "script/tests/test_smbclient_posix_large.sh"),
408 "$PREFIX/ktest/krb5_ccache-3",
409 smbclient3, "$SERVER", "$PREFIX", options, "-k " + configuration])
411 plantestsuite("samba3.blackbox.smbclient_posix_large %s NTLM" % options, "s3dc:local",
412 [os.path.join(samba3srcdir, "script/tests/test_smbclient_posix_large.sh"),
413 "none",
414 smbclient3, "$SERVER", "$PREFIX", options, "-U$USERNAME%$PASSWORD " + configuration])
416 for e in endianness_options:
417 for a in auth_options:
418 for s in signseal_options:
419 binding_string = "ncacn_ip_tcp:$SERVER_IP[%s%s%s]" % (a, s, e)
420 options = binding_string + " -U$USERNAME%$PASSWORD"
421 plansmbtorture4testsuite(test, "s3dc", options, 'over ncacn_ip_tcp with [%s%s%s] ' % (a, s, e))
423 plansmbtorture4testsuite('rpc.epmapper', 's3dc:local', 'ncalrpc: -U$USERNAME%$PASSWORD', 'over ncalrpc')