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