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