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