s3:vfs_gpfs: Use directory not file to get fileset id
[Samba/gebeck_regimport.git] / source3 / selftest / tests.py
blob8b65232e73d70462e4ca7e596aaf7b0a2499f3a7
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 from selftesthelpers import *
24 import subprocess
25 smb4torture = binpath("smbtorture4")
26 samba3srcdir = srcdir() + "/source3"
27 configuration = "--configfile=$SMB_CONF_PATH"
28 scriptdir=os.path.join(samba3srcdir, "../script/tests")
30 smbclient = binpath('smbclient3')
31 wbinfo = binpath('wbinfo')
32 net = binpath('net')
33 smbtorture3 = binpath('smbtorture3')
34 ntlm_auth = binpath('ntlm_auth3')
35 dbwrap_tool = binpath('dbwrap_tool')
36 vfstest = binpath('vfstest')
38 torture_options = [configuration, "--maximum-runtime=$SELFTEST_MAXTIME",
39 "--basedir=$SELFTEST_TMPDIR",
40 '--option="torture:winbindd_netbios_name=$SERVER"',
41 '--option="torture:winbindd_netbios_domain=$DOMAIN"',
42 '--option=torture:sharedelay=100000',
43 '--option=torture:writetimeupdatedelay=500000' ]
45 if not os.getenv("SELFTEST_VERBOSE"):
46 torture_options.append("--option=torture:progress=no")
47 torture_options.append("--format=subunit")
48 if os.getenv("SELFTEST_QUICK"):
49 torture_options.append("--option=torture:quick=yes")
51 smb4torture_testsuite_list = subprocess.Popen([smb4torture, "--list-suites"], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate("")[0].splitlines()
53 smb4torture += " " + " ".join(torture_options)
55 sub = subprocess.Popen("%s --version 2> /dev/null" % smb4torture, stdout=subprocess.PIPE, stdin=subprocess.PIPE, shell=True)
56 sub.communicate("")
57 smb4torture_possible = (sub.returncode == 0)
60 def smb4torture_testsuites(prefix):
61 return filter(lambda x: x.startswith(prefix), smb4torture_testsuite_list)
63 def plansmbtorturetestsuite(name, env, options, description=''):
64 target = "samba3"
65 if description == '':
66 modname = "%s.%s" % (target, name)
67 else:
68 modname = "%s.%s %s" % (target, name, description)
70 cmdline = "%s $LISTOPT %s --target=%s %s" % (valgrindify(smb4torture), options, target, name)
71 if smb4torture_possible:
72 plantestsuite_loadlist(modname, env, cmdline)
75 plantestsuite("samba3.blackbox.success", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/test_success.sh")])
76 plantestsuite("samba3.blackbox.failure", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/test_failure.sh")])
78 plantestsuite("samba3.local_s3", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/test_local_s3.sh")])
80 plantestsuite("samba3.blackbox.registry.upgrade", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/test_registry_upgrade.sh"), net, dbwrap_tool])
82 tests=[ "FDPASS", "LOCK1", "LOCK2", "LOCK3", "LOCK4", "LOCK5", "LOCK6", "LOCK7", "LOCK9",
83 "UNLINK", "BROWSE", "ATTR", "TRANS2", "TORTURE",
84 "OPLOCK1", "OPLOCK2", "OPLOCK4", "STREAMERROR",
85 "DIR", "DIR1", "DIR-CREATETIME", "TCON", "TCONDEV", "RW1", "RW2", "RW3", "RW-SIGNING",
86 "OPEN", "XCOPY", "RENAME", "DELETE", "DELETE-LN", "PROPERTIES", "W2K",
87 "TCON2", "IOCTL", "CHKPATH", "FDSESS", "CHAIN1", "CHAIN2",
88 "CHAIN3",
89 "GETADDRINFO", "UID-REGRESSION-TEST", "SHORTNAME-TEST",
90 "CASE-INSENSITIVE-CREATE", "SMB2-BASIC", "NTTRANS-FSCTL", "SMB2-NEGPROT",
91 "SMB2-SESSION-REAUTH", "SMB2-SESSION-RECONNECT",
92 "CLEANUP1",
93 "CLEANUP2",
94 "BAD-NBT-SESSION"]
96 for t in tests:
97 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"])
98 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"])
99 if t == "TORTURE":
100 # this is a negative test to verify that the server rejects
101 # access without encryption
102 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"])
103 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"])
105 tests = ["RW1", "RW2", "RW3"]
106 for t in tests:
107 plantestsuite("samba3.smbtorture_s3.vfs_aio_fork(secshare).%s" % t, "secshare", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/vfs_aio_fork', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
109 posix_tests=[ "POSIX", "POSIX-APPEND"]
111 for t in posix_tests:
112 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"])
113 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"])
114 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"])
116 env = "s3dc:local"
117 t = "CLEANUP3"
118 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"])
120 local_tests=[
121 "LOCAL-SUBSTITUTE",
122 "LOCAL-GENCACHE",
123 "LOCAL-TALLOC-DICT",
124 "LOCAL-BASE64",
125 "LOCAL-RBTREE",
126 "LOCAL-MEMCACHE",
127 "LOCAL-STREAM-NAME",
128 "LOCAL-WBCLIENT",
129 "LOCAL-string_to_sid",
130 "LOCAL-binary_to_sid",
131 "LOCAL-DBTRANS",
132 "LOCAL-TEVENT-SELECT",
133 "LOCAL-CONVERT-STRING",
134 "LOCAL-CONV-AUTH-INFO",
135 "LOCAL-IDMAP-TDB-COMMON",
136 "LOCAL-hex_encode_buf",
137 "LOCAL-sprintf_append",
138 "LOCAL-remove_duplicate_addrs2"]
140 for t in local_tests:
141 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"])
143 tests=["--ping", "--separator",
144 "--own-domain",
145 "--all-domains",
146 "--trusted-domains",
147 "--domain-info=BUILTIN",
148 "--domain-info=$DOMAIN",
149 "--online-status",
150 "--online-status --domain=BUILTIN",
151 "--online-status --domain=$DOMAIN",
152 "--check-secret --domain=$DOMAIN",
153 "--change-secret --domain=$DOMAIN",
154 "--check-secret --domain=$DOMAIN",
155 "--online-status --domain=$DOMAIN",
156 #Didn't pass yet# "--domain-users",
157 "--domain-groups",
158 "--name-to-sid=$DC_USERNAME",
159 "--name-to-sid=$DOMAIN\\\\$DC_USERNAME",
160 #Didn't pass yet# "--user-info=$USERNAME",
161 "--user-groups=$DOMAIN\\\\$DC_USERNAME",
162 "--authenticate=$DOMAIN\\\\$DC_USERNAME%$DC_PASSWORD",
163 "--allocate-uid",
164 "--allocate-gid"]
166 plantestsuite("samba.vfstest.stream_depot", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/stream-depot/run.sh"), binpath("vfstest"), "$PREFIX", configuration])
167 plantestsuite("samba.vfstest.xattr-tdb-1", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/xattr-tdb-1/run.sh"), binpath("vfstest"), "$PREFIX", configuration])
168 plantestsuite("samba.vfstest.acl", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/vfstest-acl/run.sh"), binpath("vfstest"), "$PREFIX", configuration])
170 for options in ["--option=clientusespnego=no", " --option=clientntlmv2auth=no --option=clientlanmanauth=yes --max-protocol=LANMAN2", ""]:
171 env = "s3dc"
172 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', smbclient, configuration, options])
174 for env in ["s3dc", "member", "s3member", "dc", "s4member"]:
175 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', smbclient, configuration])
177 for env in ["s3dc", "member", "s3member"]:
178 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', smbclient, configuration])
179 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', smbclient, configuration])
181 for t in tests:
182 plantestsuite("samba3.wbinfo_s3.(%s:local).%s" % (env, t), "%s:local" % env, [os.path.join(samba3srcdir, "script/tests/test_wbinfo_s3.sh"), t])
184 plantestsuite(
185 "samba3.wbinfo_sids2xids.(%s:local)" % env, "%s:local" % env,
186 [os.path.join(samba3srcdir, "script/tests/test_wbinfo_sids2xids.sh")])
188 plantestsuite(
189 "samba3.ntlm_auth.diagnostics(%s:local)" % env, "%s:local" % env,
190 [os.path.join(samba3srcdir, "script/tests/test_ntlm_auth_diagnostics.sh"), ntlm_auth, '$DOMAIN', '$DC_USERNAME', '$DC_PASSWORD', configuration])
192 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_auth, '$DOMAIN', '$DC_USERNAME', '$DC_PASSWORD', configuration])
194 env = "s3member"
195 t = "--krb5auth=$DOMAIN\\\\$DC_USERNAME%$DC_PASSWORD"
196 plantestsuite("samba3.wbinfo_s3.(%s:local).%s" % (env, t), "%s:local" % env, [os.path.join(samba3srcdir, "script/tests/test_wbinfo_s3.sh"), t])
198 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_auth, '$PREFIX/ktest/krb5_ccache-2', '$SERVER', configuration])
200 plantestsuite("samba3.ntlm_auth.krb5(ktest:local)", "ktest:local", [os.path.join(samba3srcdir, "script/tests/test_ntlm_auth_krb5.sh"), valgrindify(python), samba3srcdir, ntlm_auth, '$PREFIX/ktest/krb5_ccache-3', '$SERVER', configuration])
203 for env in ["maptoguest", "secshare"]:
204 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', smbclient, configuration + " --option=clientntlmv2auth=no --option=clientlanmanauth=yes"])
206 env = "maptoguest"
207 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', smbclient, configuration + " --option=clientntlmv2auth=no --option=clientlanmanauth=yes"])
209 # plain
210 for env in ["s3dc"]:
211 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', smbclient, wbinfo, configuration])
213 for env in ["member", "s3member"]:
214 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', smbclient, wbinfo, configuration])
216 for env in ["s3dc"]:
217 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', smbclient, wbinfo, configuration, "--signing=required"])
219 for env in ["member", "s3member"]:
220 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', smbclient, wbinfo, configuration, "--signing=required"])
222 for env in ["s3dc"]:
223 # encrypted
224 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', smbclient, wbinfo, configuration, "-e"])
226 # Test smbclient/tarmode
227 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', smbclient, configuration])
229 #TODO encrypted against member, with member creds, and with DC creds
230 plantestsuite("samba3.blackbox.net.misc", "s3dc:local",
231 [os.path.join(samba3srcdir, "script/tests/test_net_misc.sh"),
232 scriptdir, "$SMB_CONF_PATH", net, configuration])
233 plantestsuite("samba3.blackbox.net.local.registry", "s3dc:local",
234 [os.path.join(samba3srcdir, "script/tests/test_net_registry.sh"),
235 scriptdir, "$SMB_CONF_PATH", net, configuration])
236 plantestsuite("samba3.blackbox.net.registry.check", "s3dc:local",
237 [os.path.join(samba3srcdir, "script/tests/test_net_registry_check.sh"),
238 scriptdir, "$SMB_CONF_PATH", net, configuration,dbwrap_tool])
239 plantestsuite("samba3.blackbox.net.rpc.registry", "s3dc",
240 [os.path.join(samba3srcdir, "script/tests/test_net_registry.sh"),
241 scriptdir, "$SMB_CONF_PATH", net, configuration, 'rpc'])
243 plantestsuite("samba3.blackbox.net.local.registry.roundtrip", "s3dc:local",
244 [os.path.join(samba3srcdir, "script/tests/test_net_registry_roundtrip.sh"),
245 scriptdir, "$SMB_CONF_PATH", net, configuration])
246 plantestsuite("samba3.blackbox.net.rpc.registry.roundtrip", "s3dc",
247 [os.path.join(samba3srcdir, "script/tests/test_net_registry_roundtrip.sh"),
248 scriptdir, "$SMB_CONF_PATH", net, configuration, 'rpc'])
250 plantestsuite("samba3.blackbox.net.local.conf", "s3dc:local",
251 [os.path.join(samba3srcdir, "script/tests/test_net_conf.sh"),
252 scriptdir, "$SMB_CONF_PATH", net, configuration])
253 plantestsuite("samba3.blackbox.net.rpc.conf", "s3dc",
254 [os.path.join(samba3srcdir, "script/tests/test_net_conf.sh"),
255 scriptdir, "$SMB_CONF_PATH", net, configuration, 'rpc'])
258 plantestsuite("samba3.blackbox.testparm", "s3dc:local",
259 [os.path.join(samba3srcdir, "script/tests/test_testparm_s3.sh"),
260 "$LOCAL_PATH"])
262 plantestsuite(
263 "samba3.pthreadpool", "s3dc",
264 [os.path.join(samba3srcdir, "script/tests/test_pthreadpool.sh")])
266 #smbtorture4 tests
268 base = ["base.attr", "base.charset", "base.chkpath", "base.defer_open", "base.delaywrite", "base.delete",
269 "base.deny1", "base.deny2", "base.deny3", "base.denydos", "base.dir1", "base.dir2",
270 "base.disconnect", "base.fdpass", "base.lock",
271 "base.mangle", "base.negnowait", "base.ntdeny1",
272 "base.ntdeny2", "base.open", "base.openattr", "base.properties", "base.rename", "base.rw1",
273 "base.secleak", "base.tcon", "base.tcondev", "base.trans2", "base.unlink", "base.vuid",
274 "base.xcopy", "base.samba3error"]
276 raw = ["raw.acls", "raw.chkpath", "raw.close", "raw.composite", "raw.context", "raw.eas",
277 "raw.ioctl", "raw.lock", "raw.mkdir", "raw.mux", "raw.notify", "raw.open", "raw.oplock"
278 "raw.qfileinfo", "raw.qfsinfo", "raw.read", "raw.rename", "raw.search", "raw.seek",
279 "raw.sfileinfo.base", "raw.sfileinfo.bug", "raw.streams", "raw.unlink", "raw.write",
280 "raw.samba3hide", "raw.samba3badpath", "raw.sfileinfo.rename", "raw.session",
281 "raw.samba3caseinsensitive", "raw.samba3posixtimedlock",
282 "raw.samba3rootdirfid", "raw.sfileinfo.end-of-file",
283 "raw.bench-oplock", "raw.bench-lock", "raw.bench-open", "raw.bench-tcon",
284 "raw.samba3checkfsp", "raw.samba3closeerr", "raw.samba3oplocklogoff"]
286 smb2 = smb4torture_testsuites("smb2.")
288 rpc = ["rpc.authcontext", "rpc.samba3.bind", "rpc.samba3.srvsvc", "rpc.samba3.sharesec",
289 "rpc.samba3.spoolss", "rpc.samba3.wkssvc", "rpc.samba3.winreg",
290 "rpc.samba3.getaliasmembership-0",
291 "rpc.samba3.netlogon", "rpc.samba3.sessionkey", "rpc.samba3.getusername",
292 "rpc.samba3.smb1-pipe-name", "rpc.samba3.smb2-pipe-name",
293 "rpc.samba3.smb-reauth1", "rpc.samba3.smb-reauth2",
294 "rpc.svcctl", "rpc.ntsvcs", "rpc.winreg", "rpc.eventlog",
295 "rpc.spoolss.printserver", "rpc.spoolss.win", "rpc.spoolss.notify", "rpc.spoolss.printer",
296 "rpc.spoolss.driver",
297 "rpc.lsa", "rpc.lsa-getuser", "rpc.lsa.lookupsids", "rpc.lsa.lookupnames",
298 "rpc.lsa.privileges", "rpc.lsa.secrets",
299 "rpc.samr", "rpc.samr.users", "rpc.samr.users.privileges", "rpc.samr.passwords",
300 "rpc.samr.passwords.pwdlastset", "rpc.samr.large-dc", "rpc.samr.machine.auth",
301 "rpc.samr.priv",
302 "rpc.netlogon.admin",
303 "rpc.schannel", "rpc.schannel2", "rpc.bench-schannel1", "rpc.join", "rpc.bind"]
305 local = ["local.nss-wrapper", "local.ndr"]
307 winbind = ["winbind.struct", "winbind.wbclient"]
309 rap = ["rap.basic", "rap.rpc", "rap.printing", "rap.sam"]
311 unix = ["unix.info2", "unix.whoami"]
313 nbt = ["nbt.dgram" ]
315 libsmbclient = ["libsmbclient"]
317 tests= base + raw + smb2 + rpc + unix + local + winbind + rap + nbt + libsmbclient
319 for t in tests:
320 if t == "base.delaywrite":
321 plansmbtorturetestsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --maximum-runtime=900')
322 plansmbtorturetestsuite(t, "plugin_s4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --maximum-runtime=900')
323 elif t == "rap.sam":
324 plansmbtorturetestsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --option=doscharset=ISO-8859-1')
325 plansmbtorturetestsuite(t, "plugin_s4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --option=doscharset=ISO-8859-1')
326 elif t == "unix.whoami":
327 plansmbtorturetestsuite(t, "member:local", '//$SERVER/tmp --machine-pass', description="machine account")
328 plansmbtorturetestsuite(t, "s3member:local", '//$SERVER/tmp --machine-pass --option=torture:addc=$DC_SERVER', description="machine account")
329 for env in ["s3dc", "member"]:
330 plansmbtorturetestsuite(t, env, '//$SERVER/tmp -U$DC_USERNAME%$DC_PASSWORD')
331 plansmbtorturetestsuite(t, env, '//$SERVER/tmpguest -U%', description='anonymous connection')
332 for env in ["plugin_s4_dc", "s3member"]:
333 plansmbtorturetestsuite(t, env, '//$SERVER/tmp -U$DC_USERNAME@$REALM%$DC_PASSWORD --option=torture:addc=$DC_SERVER')
334 plansmbtorturetestsuite(t, env, '//$SERVER/tmp -k yes -U$DC_USERNAME@$REALM%$DC_PASSWORD --option=torture:addc=$DC_SERVER', description='kerberos connection')
335 plansmbtorturetestsuite(t, env, '//$SERVER/tmpguest -U% --option=torture:addc=$DC_SERVER', description='anonymous connection')
336 elif t == "raw.samba3posixtimedlock":
337 plansmbtorturetestsuite(t, "s3dc", '//$SERVER_IP/tmpguest -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/s3dc/share')
338 plansmbtorturetestsuite(t, "plugin_s4_dc", '//$SERVER_IP/tmpguest -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/plugin_s4_dc/share')
339 elif t == "raw.chkpath":
340 plansmbtorturetestsuite(t, "s3dc", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD')
341 plansmbtorturetestsuite(t, "plugin_s4_dc", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD')
342 elif t == "raw.samba3hide" or t == "raw.samba3checkfsp" or t == "raw.samba3closeerr":
343 plansmbtorturetestsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
344 plansmbtorturetestsuite(t, "secshare", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
345 plansmbtorturetestsuite(t, "plugin_s4_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
346 elif t == "raw.session" or t == "smb2.session":
347 plansmbtorturetestsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD', 'plain')
348 plansmbtorturetestsuite(t, "s3dc", '//$SERVER_IP/tmpenc -U$USERNAME%$PASSWORD', 'enc')
349 plansmbtorturetestsuite(t, "plugin_s4_dc", '//$SERVER/tmp -k no -U$USERNAME%$PASSWORD', 'ntlm')
350 plansmbtorturetestsuite(t, "plugin_s4_dc", '//$SERVER/tmp -k yes -U$USERNAME%$PASSWORD', 'krb5')
351 elif t == "rpc.lsa":
352 plansmbtorturetestsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD', 'over ncacn_np ')
353 plansmbtorturetestsuite(t, "s3dc", 'ncacn_ip_tcp:$SERVER_IP -U$USERNAME%$PASSWORD', 'over ncacn_ip_tcp ')
354 plansmbtorturetestsuite(t, "plugin_s4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD', 'over ncacn_np ')
355 plansmbtorturetestsuite(t, "plugin_s4_dc", 'ncacn_ip_tcp:$SERVER_IP -U$USERNAME%$PASSWORD', 'over ncacn_ip_tcp ')
356 else:
357 plansmbtorturetestsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
358 plansmbtorturetestsuite(t, "plugin_s4_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
361 test = 'rpc.lsa.lookupsids'
362 auth_options = ["", "ntlm", "spnego", "spnego,ntlm" ]
363 signseal_options = ["", ",connect", ",sign", ",seal"]
364 endianness_options = ["", ",bigendian"]
365 for s in signseal_options:
366 for e in endianness_options:
367 for a in auth_options:
368 binding_string = "ncacn_np:$SERVER[%s%s%s]" % (a, s, e)
369 options = binding_string + " -U$USERNAME%$PASSWORD"
370 plansmbtorturetestsuite(test, "s3dc", options, 'over ncacn_np with [%s%s%s] ' % (a, s, e))
371 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"),
372 "none", options, configuration])
374 # We should try more combinations in future, but this is all
375 # the pre-calculated credentials cache supports at the moment
376 e = ""
377 a = ""
378 binding_string = "ncacn_np:$SERVER[%s%s%s]" % (a, s, e)
379 options = binding_string + " -k yes --krb5-ccache=$PREFIX/ktest/krb5_ccache-2"
380 plansmbtorturetestsuite(test, "ktest", options, 'krb5 with old ccache ncacn_np with [%s%s%s] ' % (a, s, e))
382 options = binding_string + " -k yes --krb5-ccache=$PREFIX/ktest/krb5_ccache-3"
383 plansmbtorturetestsuite(test, "ktest", options, 'krb5 ncacn_np with [%s%s%s] ' % (a, s, e))
385 auth_options2 = ["krb5", "spnego,krb5"]
386 for a in auth_options2:
387 binding_string = "ncacn_np:$SERVER[%s%s%s]" % (a, s, e)
389 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"),
390 "$PREFIX/ktest/krb5_ccache-3", binding_string, "-k", configuration])
393 options_list = ["", "-e"]
394 for options in options_list:
395 plantestsuite("samba3.blackbox.smbclient_krb5 old ccache %s" % options, "ktest:local",
396 [os.path.join(samba3srcdir, "script/tests/test_smbclient_krb5.sh"),
397 "$PREFIX/ktest/krb5_ccache-2",
398 smbclient, "$SERVER", options, configuration])
400 plantestsuite("samba3.blackbox.smbclient_krb5 old ccache %s" % options, "ktest:local",
401 [os.path.join(samba3srcdir, "script/tests/test_smbclient_krb5.sh"),
402 "$PREFIX/ktest/krb5_ccache-2",
403 smbclient, "$SERVER", options, configuration])
405 plantestsuite("samba3.blackbox.smbclient_large_file %s" % options, "ktest:local",
406 [os.path.join(samba3srcdir, "script/tests/test_smbclient_posix_large.sh"),
407 "$PREFIX/ktest/krb5_ccache-3",
408 smbclient, "$SERVER", "$PREFIX", options, "-k " + configuration])
410 plantestsuite("samba3.blackbox.smbclient_posix_large %s krb5" % options, "ktest:local",
411 [os.path.join(samba3srcdir, "script/tests/test_smbclient_posix_large.sh"),
412 "$PREFIX/ktest/krb5_ccache-3",
413 smbclient, "$SERVER", "$PREFIX", options, "-k " + configuration])
415 plantestsuite("samba3.blackbox.smbclient_posix_large %s NTLM" % options, "s3dc:local",
416 [os.path.join(samba3srcdir, "script/tests/test_smbclient_posix_large.sh"),
417 "none",
418 smbclient, "$SERVER", "$PREFIX", options, "-U$USERNAME%$PASSWORD " + configuration])
420 for e in endianness_options:
421 for a in auth_options:
422 for s in signseal_options:
423 binding_string = "ncacn_ip_tcp:$SERVER_IP[%s%s%s]" % (a, s, e)
424 options = binding_string + " -U$USERNAME%$PASSWORD"
425 plansmbtorturetestsuite(test, "s3dc", options, 'over ncacn_ip_tcp with [%s%s%s] ' % (a, s, e))
427 test = 'rpc.epmapper'
428 env = 's3dc:local'
429 binding_string = 'ncalrpc:'
430 options = binding_string + " -U$USERNAME%$PASSWORD"
432 plansmbtorturetestsuite(test, env, options, 'over ncalrpc')