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
22 sys
.path
.insert(0, os
.path
.normpath(os
.path
.join(os
.path
.dirname(__file__
), "../../selftest")))
23 from selftesthelpers
import *
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')
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)
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
=''):
66 modname
= "%s.%s" % (target
, name
)
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",
89 "GETADDRINFO", "UID-REGRESSION-TEST", "SHORTNAME-TEST",
90 "CASE-INSENSITIVE-CREATE", "SMB2-BASIC", "NTTRANS-FSCTL", "SMB2-NEGPROT",
91 "SMB2-SESSION-REAUTH", "SMB2-SESSION-RECONNECT",
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"])
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"]
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"])
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"])
129 "LOCAL-string_to_sid",
130 "LOCAL-binary_to_sid",
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",
147 "--domain-info=BUILTIN",
148 "--domain-info=$DOMAIN",
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",
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",
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", ""]:
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
])
182 plantestsuite("samba3.wbinfo_s3.(%s:local).%s" % (env
, t
), "%s:local" % env
, [os
.path
.join(samba3srcdir
, "script/tests/test_wbinfo_s3.sh"), t
])
185 "samba3.wbinfo_sids2xids.(%s:local)" % env
, "%s:local" % env
,
186 [os
.path
.join(samba3srcdir
, "script/tests/test_wbinfo_sids2xids.sh")])
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
])
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"])
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"])
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
])
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"])
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"),
263 "samba3.pthreadpool", "s3dc",
264 [os
.path
.join(samba3srcdir
, "script/tests/test_pthreadpool.sh")])
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",
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", "winbind.pac"]
309 rap
= ["rap.basic", "rap.rpc", "rap.printing", "rap.sam"]
311 unix
= ["unix.info2", "unix.whoami"]
315 libsmbclient
= ["libsmbclient"]
317 tests
= base
+ raw
+ smb2
+ rpc
+ unix
+ local
+ winbind
+ rap
+ nbt
+ libsmbclient
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')
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
== "winbind.pac":
327 plansmbtorturetestsuite(t
, "s3member:local", '//$SERVER/tmp --realm=$REALM --machine-pass --option=torture:addc=$DC_SERVER', description
="machine account")
328 elif t
== "unix.whoami":
329 plansmbtorturetestsuite(t
, "member:local", '//$SERVER/tmp --machine-pass', description
="machine account")
330 plansmbtorturetestsuite(t
, "s3member:local", '//$SERVER/tmp --machine-pass --option=torture:addc=$DC_SERVER', description
="machine account")
331 for env
in ["s3dc", "member"]:
332 plansmbtorturetestsuite(t
, env
, '//$SERVER/tmp -U$DC_USERNAME%$DC_PASSWORD')
333 plansmbtorturetestsuite(t
, env
, '//$SERVER/tmpguest -U%', description
='anonymous connection')
334 for env
in ["plugin_s4_dc", "s3member"]:
335 plansmbtorturetestsuite(t
, env
, '//$SERVER/tmp -U$DC_USERNAME@$REALM%$DC_PASSWORD --option=torture:addc=$DC_SERVER')
336 plansmbtorturetestsuite(t
, env
, '//$SERVER/tmp -k yes -U$DC_USERNAME@$REALM%$DC_PASSWORD --option=torture:addc=$DC_SERVER', description
='kerberos connection')
337 plansmbtorturetestsuite(t
, env
, '//$SERVER/tmpguest -U% --option=torture:addc=$DC_SERVER', description
='anonymous connection')
338 elif t
== "raw.samba3posixtimedlock":
339 plansmbtorturetestsuite(t
, "s3dc", '//$SERVER_IP/tmpguest -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/s3dc/share')
340 plansmbtorturetestsuite(t
, "plugin_s4_dc", '//$SERVER_IP/tmpguest -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/plugin_s4_dc/share')
341 elif t
== "raw.chkpath":
342 plansmbtorturetestsuite(t
, "s3dc", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD')
343 plansmbtorturetestsuite(t
, "plugin_s4_dc", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD')
344 elif t
== "raw.samba3hide" or t
== "raw.samba3checkfsp" or t
== "raw.samba3closeerr":
345 plansmbtorturetestsuite(t
, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
346 plansmbtorturetestsuite(t
, "secshare", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
347 plansmbtorturetestsuite(t
, "plugin_s4_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
348 elif t
== "raw.session" or t
== "smb2.session":
349 plansmbtorturetestsuite(t
, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD', 'plain')
350 plansmbtorturetestsuite(t
, "s3dc", '//$SERVER_IP/tmpenc -U$USERNAME%$PASSWORD', 'enc')
351 plansmbtorturetestsuite(t
, "plugin_s4_dc", '//$SERVER/tmp -k no -U$USERNAME%$PASSWORD', 'ntlm')
352 plansmbtorturetestsuite(t
, "plugin_s4_dc", '//$SERVER/tmp -k yes -U$USERNAME%$PASSWORD', 'krb5')
354 plansmbtorturetestsuite(t
, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD', 'over ncacn_np ')
355 plansmbtorturetestsuite(t
, "s3dc", 'ncacn_ip_tcp:$SERVER_IP -U$USERNAME%$PASSWORD', 'over ncacn_ip_tcp ')
356 plansmbtorturetestsuite(t
, "plugin_s4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD', 'over ncacn_np ')
357 plansmbtorturetestsuite(t
, "plugin_s4_dc", 'ncacn_ip_tcp:$SERVER_IP -U$USERNAME%$PASSWORD', 'over ncacn_ip_tcp ')
358 elif t
== "smb2.durable-open" or t
== "smb2.durable-v2-open":
359 plansmbtorturetestsuite(t
, "s3dc", '//$SERVER_IP/durable -U$USERNAME%$PASSWORD')
360 plansmbtorturetestsuite(t
, "plugin_s4_dc", '//$SERVER_IP/durable -U$USERNAME%$PASSWORD')
362 plansmbtorturetestsuite(t
, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
363 plansmbtorturetestsuite(t
, "plugin_s4_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
366 test
= 'rpc.lsa.lookupsids'
367 auth_options
= ["", "ntlm", "spnego", "spnego,ntlm" ]
368 signseal_options
= ["", ",connect", ",sign", ",seal"]
369 endianness_options
= ["", ",bigendian"]
370 for s
in signseal_options
:
371 for e
in endianness_options
:
372 for a
in auth_options
:
373 binding_string
= "ncacn_np:$SERVER[%s%s%s]" % (a
, s
, e
)
374 options
= binding_string
+ " -U$USERNAME%$PASSWORD"
375 plansmbtorturetestsuite(test
, "s3dc", options
, 'over ncacn_np with [%s%s%s] ' % (a
, s
, e
))
376 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"),
377 "none", options
, configuration
])
379 # We should try more combinations in future, but this is all
380 # the pre-calculated credentials cache supports at the moment
383 binding_string
= "ncacn_np:$SERVER[%s%s%s]" % (a
, s
, e
)
384 options
= binding_string
+ " -k yes --krb5-ccache=$PREFIX/ktest/krb5_ccache-2"
385 plansmbtorturetestsuite(test
, "ktest", options
, 'krb5 with old ccache ncacn_np with [%s%s%s] ' % (a
, s
, e
))
387 options
= binding_string
+ " -k yes --krb5-ccache=$PREFIX/ktest/krb5_ccache-3"
388 plansmbtorturetestsuite(test
, "ktest", options
, 'krb5 ncacn_np with [%s%s%s] ' % (a
, s
, e
))
390 auth_options2
= ["krb5", "spnego,krb5"]
391 for a
in auth_options2
:
392 binding_string
= "ncacn_np:$SERVER[%s%s%s]" % (a
, s
, e
)
394 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"),
395 "$PREFIX/ktest/krb5_ccache-3", binding_string
, "-k", configuration
])
398 options_list
= ["", "-e"]
399 for options
in options_list
:
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_krb5 old ccache %s" % options
, "ktest:local",
406 [os
.path
.join(samba3srcdir
, "script/tests/test_smbclient_krb5.sh"),
407 "$PREFIX/ktest/krb5_ccache-2",
408 smbclient
, "$SERVER", options
, configuration
])
410 plantestsuite("samba3.blackbox.smbclient_large_file %s" % 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 krb5" % options
, "ktest:local",
416 [os
.path
.join(samba3srcdir
, "script/tests/test_smbclient_posix_large.sh"),
417 "$PREFIX/ktest/krb5_ccache-3",
418 smbclient
, "$SERVER", "$PREFIX", options
, "-k " + configuration
])
420 plantestsuite("samba3.blackbox.smbclient_posix_large %s NTLM" % options
, "s3dc:local",
421 [os
.path
.join(samba3srcdir
, "script/tests/test_smbclient_posix_large.sh"),
423 smbclient
, "$SERVER", "$PREFIX", options
, "-U$USERNAME%$PASSWORD " + configuration
])
425 for e
in endianness_options
:
426 for a
in auth_options
:
427 for s
in signseal_options
:
428 binding_string
= "ncacn_ip_tcp:$SERVER_IP[%s%s%s]" % (a
, s
, e
)
429 options
= binding_string
+ " -U$USERNAME%$PASSWORD"
430 plansmbtorturetestsuite(test
, "s3dc", options
, 'over ncacn_ip_tcp with [%s%s%s] ' % (a
, s
, e
))
432 test
= 'rpc.epmapper'
434 binding_string
= 'ncalrpc:'
435 options
= binding_string
+ " -U$USERNAME%$PASSWORD"
437 plansmbtorturetestsuite(test
, env
, options
, 'over ncalrpc')