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 import selftesthelpers
24 from selftesthelpers
import *
25 smbtorture4_options
.extend([
26 '--option=torture:sharedelay=100000',
27 '--option=torture:writetimeupdatedelay=500000',
30 def plansmbtorture4testsuite(name
, env
, options
, description
=''):
32 modname
= "samba3.%s" % (name
, )
34 modname
= "samba3.%s %s" % (name
, description
)
36 selftesthelpers
.plansmbtorture4testsuite(
37 name
, env
, options
, target
='samba3', modname
=modname
)
40 plantestsuite("samba3.blackbox.success", "nt4_dc:local", [os
.path
.join(samba3srcdir
, "script/tests/test_success.sh")])
41 plantestsuite("samba3.blackbox.failure", "nt4_dc:local", [os
.path
.join(samba3srcdir
, "script/tests/test_failure.sh")])
43 plantestsuite("samba3.local_s3", "nt4_dc:local", [os
.path
.join(samba3srcdir
, "script/tests/test_local_s3.sh")])
45 plantestsuite("samba3.blackbox.registry.upgrade", "nt4_dc:local", [os
.path
.join(samba3srcdir
, "script/tests/test_registry_upgrade.sh"), net
, dbwrap_tool
])
47 tests
= ["FDPASS", "LOCK1", "LOCK2", "LOCK3", "LOCK4", "LOCK5", "LOCK6", "LOCK7", "LOCK9",
48 "UNLINK", "BROWSE", "ATTR", "TRANS2", "TORTURE",
49 "OPLOCK1", "OPLOCK2", "OPLOCK4", "STREAMERROR",
50 "DIR", "DIR1", "DIR-CREATETIME", "TCON", "TCONDEV", "RW1", "RW2", "RW3", "LARGE_READX", "RW-SIGNING",
51 "OPEN", "XCOPY", "RENAME", "DELETE", "DELETE-LN", "WILDDELETE", "PROPERTIES", "W2K",
52 "TCON2", "IOCTL", "CHKPATH", "FDSESS", "CHAIN1", "CHAIN2",
54 "GETADDRINFO", "UID-REGRESSION-TEST", "SHORTNAME-TEST",
55 "CASE-INSENSITIVE-CREATE", "SMB2-BASIC", "NTTRANS-FSCTL", "SMB2-NEGPROT",
56 "SMB2-SESSION-REAUTH", "SMB2-SESSION-RECONNECT",
63 plantestsuite("samba3.smbtorture_s3.plain(nt4_dc).%s" % t
, "nt4_dc", [os
.path
.join(samba3srcdir
, "script/tests/test_smbtorture_s3.sh"), t
, '//$SERVER_IP/tmp', '$USERNAME', '$PASSWORD', smbtorture3
, "", "-l $LOCAL_PATH"])
64 plantestsuite("samba3.smbtorture_s3.crypt_client(nt4_dc).%s" % t
, "nt4_dc", [os
.path
.join(samba3srcdir
, "script/tests/test_smbtorture_s3.sh"), t
, '//$SERVER_IP/tmp', '$USERNAME', '$PASSWORD', smbtorture3
, "-e", "-l $LOCAL_PATH"])
66 # this is a negative test to verify that the server rejects
67 # access without encryption
68 plantestsuite("samba3.smbtorture_s3.crypt_server(nt4_dc).%s" % t
, "nt4_dc", [os
.path
.join(samba3srcdir
, "script/tests/test_smbtorture_s3.sh"), t
, '//$SERVER_IP/tmpenc', '$USERNAME', '$PASSWORD', smbtorture3
, "", "-l $LOCAL_PATH"])
69 plantestsuite("samba3.smbtorture_s3.plain(ad_dc_ntvfs).%s" % t
, "ad_dc_ntvfs", [os
.path
.join(samba3srcdir
, "script/tests/test_smbtorture_s3.sh"), t
, '//$SERVER_IP/tmp', '$USERNAME', '$PASSWORD', smbtorture3
, "", "-l $LOCAL_PATH"])
73 tests
= ["OPLOCK-CANCEL"]
75 plantestsuite("samba3.smbtorture_s3.plain(nt4_dc).%s" % t
, "nt4_dc", [os
.path
.join(samba3srcdir
, "script/tests/test_smbtorture_s3.sh"), t
, '//$SERVER_IP/tmp', '$USERNAME', '$PASSWORD', smbtorture3
, "", "-l $LOCAL_PATH"])
77 tests
= ["RW1", "RW2", "RW3"]
79 plantestsuite("samba3.smbtorture_s3.vfs_aio_fork(simpleserver).%s" % t
, "simpleserver", [os
.path
.join(samba3srcdir
, "script/tests/test_smbtorture_s3.sh"), t
, '//$SERVER_IP/vfs_aio_fork', '$USERNAME', '$PASSWORD', smbtorture3
, "", "-l $LOCAL_PATH"])
81 posix_tests
= ["POSIX", "POSIX-APPEND"]
84 plantestsuite("samba3.smbtorture_s3.plain(nt4_dc).%s" % t
, "nt4_dc", [os
.path
.join(samba3srcdir
, "script/tests/test_smbtorture_s3.sh"), t
, '//$SERVER_IP/posix_share', '$USERNAME', '$PASSWORD', smbtorture3
, "", "-l $LOCAL_PATH"])
85 plantestsuite("samba3.smbtorture_s3.crypt(nt4_dc).%s" % t
, "nt4_dc", [os
.path
.join(samba3srcdir
, "script/tests/test_smbtorture_s3.sh"), t
, '//$SERVER_IP/posix_share', '$USERNAME', '$PASSWORD', smbtorture3
, "-e", "-l $LOCAL_PATH"])
86 plantestsuite("samba3.smbtorture_s3.plain(ad_dc_ntvfs).%s" % t
, "ad_dc_ntvfs", [os
.path
.join(samba3srcdir
, "script/tests/test_smbtorture_s3.sh"), t
, '//$SERVER_IP/posix_share', '$USERNAME', '$PASSWORD', smbtorture3
, "", "-l $LOCAL_PATH"])
90 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"])
100 "LOCAL-string_to_sid",
101 "LOCAL-sid_to_string",
102 "LOCAL-binary_to_sid",
104 "LOCAL-TEVENT-SELECT",
105 "LOCAL-CONVERT-STRING",
106 "LOCAL-CONV-AUTH-INFO",
107 "LOCAL-IDMAP-TDB-COMMON",
108 "LOCAL-MESSAGING-READ1",
109 "LOCAL-MESSAGING-READ2",
110 "LOCAL-MESSAGING-READ3",
111 "LOCAL-MESSAGING-READ4",
112 "LOCAL-MESSAGING-FDPASS1",
113 "LOCAL-MESSAGING-FDPASS2",
114 "LOCAL-MESSAGING-FDPASS2a",
115 "LOCAL-MESSAGING-FDPASS2b",
116 "LOCAL-hex_encode_buf",
117 "LOCAL-sprintf_append",
118 "LOCAL-remove_duplicate_addrs2"]
120 for t
in local_tests
:
121 plantestsuite("samba3.smbtorture_s3.%s" % t
, "none", [os
.path
.join(samba3srcdir
, "script/tests/test_smbtorture_s3.sh"), t
, '//foo/bar', '""', '""', smbtorture3
, ""])
123 plantestsuite("samba.vfstest.stream_depot", "nt4_dc:local", [os
.path
.join(samba3srcdir
, "script/tests/stream-depot/run.sh"), binpath("vfstest"), "$PREFIX", configuration
])
124 plantestsuite("samba.vfstest.xattr-tdb-1", "nt4_dc:local", [os
.path
.join(samba3srcdir
, "script/tests/xattr-tdb-1/run.sh"), binpath("vfstest"), "$PREFIX", configuration
])
125 plantestsuite("samba.vfstest.acl", "nt4_dc:local", [os
.path
.join(samba3srcdir
, "script/tests/vfstest-acl/run.sh"), binpath("vfstest"), "$PREFIX", configuration
])
126 plantestsuite("samba.vfstest.catia", "nt4_dc:local", [os
.path
.join(samba3srcdir
, "script/tests/vfstest-catia/run.sh"), binpath("vfstest"), "$PREFIX", configuration
])
128 for options
in ["--option=clientusespnego=no", " --option=clientntlmv2auth=no --option=clientlanmanauth=yes --max-protocol=LANMAN2", ""]:
130 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', smbclient3
, configuration
, options
])
132 for env
in ["nt4_dc", "nt4_member", "ad_member", "ad_dc_ntvfs", "s4member"]:
133 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', smbclient3
, configuration
])
135 for env
in ["nt4_dc", "nt4_member", "ad_member"]:
136 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', smbclient3
, configuration
])
137 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', smbclient3
, configuration
])
139 for env
in ["nt4_member", "ad_member"]:
140 plantestsuite("samba3.blackbox.net_cred_change.(%s:local)" % env
, "%s:local" % env
, [os
.path
.join(samba3srcdir
, "script/tests/test_net_cred_change.sh"), configuration
])
143 t
= "--krb5auth=$DOMAIN/$DC_USERNAME%$DC_PASSWORD"
144 plantestsuite("samba3.wbinfo_simple.(%s:local).%s" % (env
, t
), "%s:local" % env
, [os
.path
.join(srcdir(), "nsswitch/tests/test_wbinfo_simple.sh"), t
])
145 t
= "WBCLIENT-MULTI-PING"
146 plantestsuite("samba3.smbtorture_s3.%s" % t
, env
, [os
.path
.join(samba3srcdir
, "script/tests/test_smbtorture_s3.sh"), t
, '//foo/bar', '""', '""', smbtorture3
, ""])
149 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_auth3
, '$PREFIX/ktest/krb5_ccache-2', '$SERVER', configuration
])
151 plantestsuite("samba3.ntlm_auth.krb5(ktest:local)", "ktest:local", [os
.path
.join(samba3srcdir
, "script/tests/test_ntlm_auth_krb5.sh"), valgrindify(python
), samba3srcdir
, ntlm_auth3
, '$PREFIX/ktest/krb5_ccache-3', '$SERVER', configuration
])
154 for env
in ["maptoguest", "simpleserver"]:
155 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', smbclient3
, configuration
+ " --option=clientntlmv2auth=no --option=clientlanmanauth=yes"])
158 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', smbclient3
, configuration
+ " --option=clientntlmv2auth=no --option=clientlanmanauth=yes"])
161 for env
in ["nt4_dc"]:
162 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', smbclient3
, wbinfo
, net
, configuration
])
164 for env
in ["nt4_member", "ad_member"]:
165 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', smbclient3
, wbinfo
, net
, configuration
])
167 for env
in ["nt4_dc"]:
168 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', smbclient3
, wbinfo
, net
, configuration
, "--signing=required"])
170 for env
in ["nt4_member", "ad_member"]:
171 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', smbclient3
, wbinfo
, net
, configuration
, "--signing=required"])
173 for env
in ["nt4_dc"]:
175 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', smbclient3
, wbinfo
, net
, configuration
, "-e"])
177 for env
in ["fileserver"]:
178 plantestsuite("samba3.blackbox.preserve_case (%s)" % env
, env
, [os
.path
.join(samba3srcdir
, "script/tests/test_preserve_case.sh"), '$SERVER', '$DOMAIN', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3
])
179 plantestsuite("samba3.blackbox.dfree_command (%s)" % env
, env
, [os
.path
.join(samba3srcdir
, "script/tests/test_dfree_command.sh"), '$SERVER', '$DOMAIN', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3
])
180 plantestsuite("samba3.blackbox.valid_users (%s)" % env
, env
, [os
.path
.join(samba3srcdir
, "script/tests/test_valid_users.sh"), '$SERVER', '$SERVER_IP', '$DOMAIN', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3
])
181 plantestsuite("samba3.blackbox.offline (%s)" % env
, env
, [os
.path
.join(samba3srcdir
, "script/tests/test_offline.sh"), '$SERVER', '$SERVER_IP', '$DOMAIN', '$USERNAME', '$PASSWORD', '$LOCAL_PATH/offline', smbclient3
])
189 config_h
= os
.environ
["CONFIG_H"]
191 config_h
= os
.path
.join(samba4bindir
, "default/include/config.h")
193 # see if libarchive is supported
194 f
= open(config_h
, 'r')
196 have_libarchive
= ("HAVE_LIBARCHIVE 1" in f
.read())
200 # tar command enabled only if built with libarchive
202 # Test smbclient/tarmode
203 plantestsuite("samba3.blackbox.smbclient_tarmode (%s)" % env
, env
,
204 [os
.path
.join(samba3srcdir
, "script/tests/test_smbclient_tarmode.sh"),
205 '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD',
206 '$LOCAL_PATH', '$PREFIX', smbclient3
, configuration
])
208 # Test suite for new smbclient/tar with libarchive (GSoC 13)
209 plantestsuite("samba3.blackbox.smbclient_tar (%s)" % env
, env
,
210 [os
.path
.join(samba3srcdir
, "script/tests/test_smbclient_tarmode.pl"),
211 '-n', '$SERVER', '-i', '$SERVER_IP', '-s', 'tmp',
212 '-u', '$USERNAME', '-p', '$PASSWORD', '-l', '$LOCAL_PATH',
213 '-d', '$PREFIX', '-b', smbclient3
,
214 '--subunit', '--', configuration
])
216 #TODO encrypted against member, with member creds, and with DC creds
217 plantestsuite("samba3.blackbox.net.misc", "nt4_dc:local",
218 [os
.path
.join(samba3srcdir
, "script/tests/test_net_misc.sh"),
219 scriptdir
, "$SMB_CONF_PATH", net
, configuration
])
220 plantestsuite("samba3.blackbox.net.local.registry", "nt4_dc:local",
221 [os
.path
.join(samba3srcdir
, "script/tests/test_net_registry.sh"),
222 scriptdir
, "$SMB_CONF_PATH", net
, configuration
])
223 plantestsuite("samba3.blackbox.net.registry.check", "nt4_dc:local",
224 [os
.path
.join(samba3srcdir
, "script/tests/test_net_registry_check.sh"),
225 scriptdir
, "$SMB_CONF_PATH", net
, configuration
, dbwrap_tool
])
226 plantestsuite("samba3.blackbox.net.rpc.registry", "nt4_dc",
227 [os
.path
.join(samba3srcdir
, "script/tests/test_net_registry.sh"),
228 scriptdir
, "$SMB_CONF_PATH", net
, configuration
, 'rpc'])
230 plantestsuite("samba3.blackbox.net.local.registry.roundtrip", "nt4_dc:local",
231 [os
.path
.join(samba3srcdir
, "script/tests/test_net_registry_roundtrip.sh"),
232 scriptdir
, "$SMB_CONF_PATH", net
, configuration
])
233 plantestsuite("samba3.blackbox.net.rpc.registry.roundtrip", "nt4_dc",
234 [os
.path
.join(samba3srcdir
, "script/tests/test_net_registry_roundtrip.sh"),
235 scriptdir
, "$SMB_CONF_PATH", net
, configuration
, 'rpc'])
237 plantestsuite("samba3.blackbox.net.local.conf", "nt4_dc:local",
238 [os
.path
.join(samba3srcdir
, "script/tests/test_net_conf.sh"),
239 scriptdir
, "$SMB_CONF_PATH", net
, configuration
])
240 plantestsuite("samba3.blackbox.net.rpc.conf", "nt4_dc",
241 [os
.path
.join(samba3srcdir
, "script/tests/test_net_conf.sh"),
242 scriptdir
, "$SMB_CONF_PATH", net
, configuration
, 'rpc'])
245 plantestsuite("samba3.blackbox.testparm", "nt4_dc:local",
246 [os
.path
.join(samba3srcdir
, "script/tests/test_testparm_s3.sh"),
250 "samba3.pthreadpool", "nt4_dc",
251 [os
.path
.join(samba3srcdir
, "script/tests/test_pthreadpool.sh")])
253 plantestsuite("samba3.async_req", "nt4_dc",
254 [os
.path
.join(samba3srcdir
, "script/tests/test_async_req.sh")])
258 base
= ["base.attr", "base.charset", "base.chkpath", "base.defer_open", "base.delaywrite", "base.delete",
259 "base.deny1", "base.deny2", "base.deny3", "base.denydos", "base.dir1", "base.dir2",
260 "base.disconnect", "base.fdpass", "base.lock",
261 "base.mangle", "base.negnowait", "base.ntdeny1",
262 "base.ntdeny2", "base.open", "base.openattr", "base.properties", "base.rename", "base.rw1",
263 "base.secleak", "base.tcon", "base.tcondev", "base.trans2", "base.unlink", "base.vuid",
264 "base.xcopy", "base.samba3error"]
266 raw
= ["raw.acls", "raw.chkpath", "raw.close", "raw.composite", "raw.context", "raw.eas",
267 "raw.ioctl", "raw.lock", "raw.mkdir", "raw.mux", "raw.notify", "raw.open", "raw.oplock",
268 "raw.qfileinfo", "raw.qfsinfo", "raw.read", "raw.rename", "raw.search", "raw.seek",
269 "raw.sfileinfo.base", "raw.sfileinfo.bug", "raw.streams", "raw.unlink", "raw.write",
270 "raw.samba3hide", "raw.samba3badpath", "raw.sfileinfo.rename", "raw.session",
271 "raw.samba3caseinsensitive", "raw.samba3posixtimedlock",
272 "raw.samba3rootdirfid", "raw.sfileinfo.end-of-file",
273 "raw.bench-oplock", "raw.bench-lock", "raw.bench-open", "raw.bench-tcon",
274 "raw.samba3checkfsp", "raw.samba3closeerr", "raw.samba3oplocklogoff", "raw.samba3badnameblob"]
276 smb2
= smbtorture4_testsuites("smb2.")
278 rpc
= ["rpc.authcontext", "rpc.samba3.bind", "rpc.samba3.srvsvc", "rpc.samba3.sharesec",
279 "rpc.samba3.spoolss", "rpc.samba3.wkssvc", "rpc.samba3.winreg",
280 "rpc.samba3.getaliasmembership-0",
281 "rpc.samba3.netlogon", "rpc.samba3.sessionkey", "rpc.samba3.getusername",
282 "rpc.samba3.smb1-pipe-name", "rpc.samba3.smb2-pipe-name",
283 "rpc.samba3.smb-reauth1", "rpc.samba3.smb-reauth2",
284 "rpc.svcctl", "rpc.ntsvcs", "rpc.winreg", "rpc.eventlog",
285 "rpc.spoolss.printserver", "rpc.spoolss.win", "rpc.spoolss.notify", "rpc.spoolss.printer",
286 "rpc.spoolss.driver",
287 "rpc.lsa", "rpc.lsa-getuser", "rpc.lsa.lookupsids", "rpc.lsa.lookupnames",
288 "rpc.lsa.privileges", "rpc.lsa.secrets",
289 "rpc.samr", "rpc.samr.users", "rpc.samr.users.privileges", "rpc.samr.passwords",
290 "rpc.samr.passwords.pwdlastset", "rpc.samr.passwords.lockout", "rpc.samr.passwords.badpwdcount", "rpc.samr.large-dc", "rpc.samr.machine.auth",
291 "rpc.samr.priv", "rpc.samr.passwords.validate",
292 "rpc.netlogon.admin",
293 "rpc.schannel", "rpc.schannel2", "rpc.bench-schannel1", "rpc.schannel_anon_setpw", "rpc.join", "rpc.bind"]
295 local
= ["local.nss", "local.ndr"]
297 idmap
= [ "idmap.rfc2307" ]
299 rap
= ["rap.basic", "rap.rpc", "rap.printing", "rap.sam"]
301 unix
= ["unix.info2", "unix.whoami"]
305 libsmbclient
= ["libsmbclient"]
309 tests
= base
+ raw
+ smb2
+ rpc
+ unix
+ local
+ rap
+ nbt
+ libsmbclient
+ idmap
+ vfs
312 if t
== "base.delaywrite":
313 plansmbtorture4testsuite(t
, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD -k yes --maximum-runtime=900')
315 plansmbtorture4testsuite(t
, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --option=doscharset=ISO-8859-1')
316 plansmbtorture4testsuite(t
, "ad_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --option=doscharset=ISO-8859-1')
317 elif t
== "winbind.pac":
318 plansmbtorture4testsuite(t
, "ad_member:local", '//$SERVER/tmp --realm=$REALM --machine-pass --option=torture:addc=$DC_SERVER', description
="machine account")
319 elif t
== "unix.whoami":
320 plansmbtorture4testsuite(t
, "nt4_member:local", '//$SERVER/tmp --machine-pass', description
="machine account")
321 plansmbtorture4testsuite(t
, "ad_member:local", '//$SERVER/tmp --machine-pass --option=torture:addc=$DC_SERVER', description
="machine account")
322 for env
in ["nt4_dc", "nt4_member"]:
323 plansmbtorture4testsuite(t
, env
, '//$SERVER/tmp -U$DC_USERNAME%$DC_PASSWORD')
324 plansmbtorture4testsuite(t
, env
, '//$SERVER/tmpguest -U%', description
='anonymous connection')
325 for env
in ["ad_dc", "ad_member"]:
326 plansmbtorture4testsuite(t
, env
, '//$SERVER/tmp -U$DC_USERNAME@$REALM%$DC_PASSWORD --option=torture:addc=$DC_SERVER')
327 plansmbtorture4testsuite(t
, env
, '//$SERVER/tmp -k yes -U$DC_USERNAME@$REALM%$DC_PASSWORD --option=torture:addc=$DC_SERVER', description
='kerberos connection')
328 plansmbtorture4testsuite(t
, env
, '//$SERVER/tmpguest -U% --option=torture:addc=$DC_SERVER', description
='anonymous connection')
329 elif t
== "raw.samba3posixtimedlock":
330 plansmbtorture4testsuite(t
, "nt4_dc", '//$SERVER_IP/tmpguest -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/nt4_dc/share')
331 plansmbtorture4testsuite(t
, "ad_dc", '//$SERVER_IP/tmpguest -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/ad_dc/share')
332 elif t
== "raw.chkpath":
333 plansmbtorture4testsuite(t
, "nt4_dc", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD')
334 plansmbtorture4testsuite(t
, "ad_dc", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD')
335 elif t
== "raw.samba3hide" or t
== "raw.samba3checkfsp" or t
== "raw.samba3closeerr":
336 plansmbtorture4testsuite(t
, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
337 plansmbtorture4testsuite(t
, "simpleserver", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
338 plansmbtorture4testsuite(t
, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
339 elif t
== "raw.session" or t
== "smb2.session":
340 plansmbtorture4testsuite(t
, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD', 'plain')
341 plansmbtorture4testsuite(t
, "nt4_dc", '//$SERVER_IP/tmpenc -U$USERNAME%$PASSWORD', 'enc')
342 plansmbtorture4testsuite(t
, "ad_dc", '//$SERVER/tmp -k no -U$USERNAME%$PASSWORD', 'ntlm')
343 plansmbtorture4testsuite(t
, "ad_dc", '//$SERVER/tmp -k yes -U$USERNAME%$PASSWORD', 'krb5')
345 plansmbtorture4testsuite(t
, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD', 'over ncacn_np ')
346 plansmbtorture4testsuite(t
, "nt4_dc", 'ncacn_ip_tcp:$SERVER_IP -U$USERNAME%$PASSWORD', 'over ncacn_ip_tcp ')
347 plansmbtorture4testsuite(t
, "ad_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD', 'over ncacn_np ')
348 plansmbtorture4testsuite(t
, "ad_dc", 'ncacn_ip_tcp:$SERVER_IP -U$USERNAME%$PASSWORD', 'over ncacn_ip_tcp ')
349 elif t
== "rpc.samr.passwords.validate":
350 plansmbtorture4testsuite(t
, "nt4_dc", 'ncacn_ip_tcp:$SERVER_IP -U$USERNAME%$PASSWORD', 'over ncacn_ip_tcp ')
351 plansmbtorture4testsuite(t
, "ad_dc", 'ncacn_ip_tcp:$SERVER_IP -U$USERNAME%$PASSWORD', 'over ncacn_ip_tcp ')
352 elif t
== "smb2.durable-open" or t
== "smb2.durable-v2-open" or t
== "smb2.replay":
353 plansmbtorture4testsuite(t
, "nt4_dc", '//$SERVER_IP/durable -U$USERNAME%$PASSWORD')
354 plansmbtorture4testsuite(t
, "ad_dc", '//$SERVER_IP/durable -U$USERNAME%$PASSWORD')
355 elif t
== "base.rw1":
356 plansmbtorture4testsuite(t
, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
357 plansmbtorture4testsuite(t
, "nt4_dc", '//$SERVER_IP/valid-users-tmp -U$USERNAME%$PASSWORD')
358 plansmbtorture4testsuite(t
, "nt4_dc", '//$SERVER_IP/write-list-tmp -U$USERNAME%$PASSWORD')
359 plansmbtorture4testsuite(t
, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
360 elif t
== "idmap.rfc2307":
361 plantestsuite(t
, "ad_member_rfc2307", [os
.path
.join(samba3srcdir
, "../nsswitch/tests/test_idmap_rfc2307.sh"), '$DOMAIN', 'Administrator', '2000000', 'Guest', '2000001', '"Domain Users"', '2000002', 'DnsAdmins', '2000003', 'ou=idmap,dc=samba,dc=example,dc=com', '$DC_SERVER', '$DC_USERNAME', '$DC_PASSWORD'])
362 elif t
== "raw.acls":
363 plansmbtorture4testsuite(t
, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
364 plansmbtorture4testsuite(t
, "nt4_dc", '//$SERVER_IP/nfs4acl_simple -U$USERNAME%$PASSWORD', description
='nfs4acl_xattr-simple')
365 plansmbtorture4testsuite(t
, "nt4_dc", '//$SERVER_IP/nfs4acl_special -U$USERNAME%$PASSWORD', description
='nfs4acl_xattr-special')
366 plansmbtorture4testsuite(t
, "ad_dc", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD')
367 elif t
== "smb2.ioctl":
368 plansmbtorture4testsuite(t
, "nt4_dc", '//$SERVER_IP/fs_specific -U$USERNAME%$PASSWORD', 'fs_specific')
369 plansmbtorture4testsuite(t
, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
370 plansmbtorture4testsuite(t
, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
371 elif t
== "smb2.lock":
372 plansmbtorture4testsuite(t
, "nt4_dc", '//$SERVER_IP/aio -U$USERNAME%$PASSWORD', 'aio')
373 plansmbtorture4testsuite(t
, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
374 plansmbtorture4testsuite(t
, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
375 elif t
== "raw.read":
376 plansmbtorture4testsuite(t
, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
377 plansmbtorture4testsuite(t
, "nt4_dc", '//$SERVER_IP/aio -U$USERNAME%$PASSWORD', 'aio')
378 plansmbtorture4testsuite(t
, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
379 elif t
== "raw.search":
380 plansmbtorture4testsuite(t
, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
381 # test the dirsort module.
382 plansmbtorture4testsuite(t
, "nt4_dc", '//$SERVER_IP/tmpsort -U$USERNAME%$PASSWORD')
383 plansmbtorture4testsuite(t
, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
384 elif t
== "vfs.fruit":
385 plansmbtorture4testsuite(t
, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --option=torture:share1=vfs_fruit --option=torture:share2=tmp --option=torture:localdir=$SELFTEST_PREFIX/nt4_dc/share')
386 plansmbtorture4testsuite(t
, "ad_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --option=torture:share1=vfs_fruit --option=torture:share2=tmp --option=torture:localdir=$SELFTEST_PREFIX/ad_dc/share')
387 elif t
== "rpc.schannel_anon_setpw":
388 plansmbtorture4testsuite(t
, "nt4_dc", '//$SERVER_IP/tmp -U$%', description
="anonymous password set")
389 plansmbtorture4testsuite(t
, "nt4_dc_schannel", '//$SERVER_IP/tmp -U$%', description
="anonymous password set (schannel enforced server-side)")
390 plansmbtorture4testsuite(t
, "ad_dc", '//$SERVER/tmp -U$%', description
="anonymous password set")
391 elif t
== "local.nss":
392 for env
in ["nt4_dc:local", "ad_member:local", "nt4_member:local", "ad_dc:local", "ad_dc_ntvfs:local"]:
393 plansmbtorture4testsuite(t
, env
, '//$SERVER/tmp -U$USERNAME%$PASSWORD')
394 elif t
== "smb2.change_notify_disabled":
395 plansmbtorture4testsuite(t
, "simpleserver", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
396 elif t
== "smb2.notify":
397 plansmbtorture4testsuite(t
, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --signing=required')
398 plansmbtorture4testsuite(t
, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD --signing=required')
400 plansmbtorture4testsuite(t
, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
401 plansmbtorture4testsuite(t
, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
404 test
= 'rpc.lsa.lookupsids'
405 auth_options
= ["", "ntlm", "spnego", "spnego,ntlm" ]
406 signseal_options
= ["", ",connect", ",sign", ",seal"]
407 endianness_options
= ["", ",bigendian"]
408 for s
in signseal_options
:
409 for e
in endianness_options
:
410 for a
in auth_options
:
411 binding_string
= "ncacn_np:$SERVER[%s%s%s]" % (a
, s
, e
)
412 options
= binding_string
+ " -U$USERNAME%$PASSWORD"
413 plansmbtorture4testsuite(test
, "nt4_dc", options
, 'over ncacn_np with [%s%s%s] ' % (a
, s
, e
))
414 plantestsuite("samba3.blackbox.rpcclient over ncacn_np with [%s%s%s] " % (a
, s
, e
), "nt4_dc:local", [os
.path
.join(samba3srcdir
, "script/tests/test_rpcclient.sh"),
415 "none", options
, configuration
])
417 # We should try more combinations in future, but this is all
418 # the pre-calculated credentials cache supports at the moment
421 binding_string
= "ncacn_np:$SERVER[%s%s%s]" % (a
, s
, e
)
422 options
= binding_string
+ " -k yes --krb5-ccache=$PREFIX/ktest/krb5_ccache-2"
423 plansmbtorture4testsuite(test
, "ktest", options
, 'krb5 with old ccache ncacn_np with [%s%s%s] ' % (a
, s
, e
))
425 options
= binding_string
+ " -k yes --krb5-ccache=$PREFIX/ktest/krb5_ccache-3"
426 plansmbtorture4testsuite(test
, "ktest", options
, 'krb5 ncacn_np with [%s%s%s] ' % (a
, s
, e
))
428 auth_options2
= ["krb5", "spnego,krb5"]
429 for a
in auth_options2
:
430 binding_string
= "ncacn_np:$SERVER[%s%s%s]" % (a
, s
, e
)
432 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"),
433 "$PREFIX/ktest/krb5_ccache-3", binding_string
, "-k", configuration
])
435 plantestsuite("samba3.blackbox.rpcclient_samlogon", "ad_member:local", [os
.path
.join(samba3srcdir
, "script/tests/test_rpcclient_samlogon.sh"),
436 "$DC_USERNAME", "$DC_PASSWORD", "ncacn_np:$DC_SERVER", configuration
])
437 plantestsuite("samba3.blackbox.sharesec", "simpleserver:local",
438 [os
.path
.join(samba3srcdir
, "script/tests/test_sharesec.sh"),
439 configuration
, os
.path
.join(bindir(), "sharesec"), "tmp"])
441 plantestsuite("samba3.blackbox.net_dom_join_fail_dc", "nt4_dc",
442 [os
.path
.join(samba3srcdir
, "script/tests/test_net_dom_join_fail_dc.sh"),
443 "$USERNAME", "$PASSWORD", "$SERVER", "$PREFIX/net_dom_join_fail_dc",
445 plantestsuite("samba3.blackbox.net_rpc_join", "nt4_dc",
446 [os
.path
.join(samba3srcdir
, "script/tests/test_net_rpc_join.sh"),
447 "$USERNAME", "$PASSWORD", "$SERVER", "$PREFIX/net_rpc_join",
450 plantestsuite("samba3.blackbox.rpcclient_srvsvc", "simpleserver",
451 [os
.path
.join(samba3srcdir
, "script/tests/test_rpcclientsrvsvc.sh"),
452 "$USERNAME", "$PASSWORD", "$SERVER",
453 os
.path
.join(bindir(), "rpcclient"), "tmp"])
455 options_list
= ["", "-e"]
456 for options
in options_list
:
457 plantestsuite("samba3.blackbox.smbclient_krb5 old ccache %s" % options
, "ktest:local",
458 [os
.path
.join(samba3srcdir
, "script/tests/test_smbclient_krb5.sh"),
459 "$PREFIX/ktest/krb5_ccache-2",
460 smbclient3
, "$SERVER", options
, configuration
])
462 plantestsuite("samba3.blackbox.smbclient_krb5 old ccache %s" % options
, "ktest:local",
463 [os
.path
.join(samba3srcdir
, "script/tests/test_smbclient_krb5.sh"),
464 "$PREFIX/ktest/krb5_ccache-2",
465 smbclient3
, "$SERVER", options
, configuration
])
467 plantestsuite("samba3.blackbox.smbclient_large_file %s" % options
, "ktest:local",
468 [os
.path
.join(samba3srcdir
, "script/tests/test_smbclient_posix_large.sh"),
469 "$PREFIX/ktest/krb5_ccache-3",
470 smbclient3
, "$SERVER", "$PREFIX", options
, "-k " + configuration
])
472 plantestsuite("samba3.blackbox.smbclient_posix_large %s krb5" % options
, "ktest:local",
473 [os
.path
.join(samba3srcdir
, "script/tests/test_smbclient_posix_large.sh"),
474 "$PREFIX/ktest/krb5_ccache-3",
475 smbclient3
, "$SERVER", "$PREFIX", options
, "-k " + configuration
])
477 plantestsuite("samba3.blackbox.smbclient_posix_large %s NTLM" % options
, "nt4_dc:local",
478 [os
.path
.join(samba3srcdir
, "script/tests/test_smbclient_posix_large.sh"),
480 smbclient3
, "$SERVER", "$PREFIX", options
, "-U$USERNAME%$PASSWORD " + configuration
])
482 for e
in endianness_options
:
483 for a
in auth_options
:
484 for s
in signseal_options
:
485 binding_string
= "ncacn_ip_tcp:$SERVER_IP[%s%s%s]" % (a
, s
, e
)
486 options
= binding_string
+ " -U$USERNAME%$PASSWORD"
487 plansmbtorture4testsuite(test
, "nt4_dc", options
, 'over ncacn_ip_tcp with [%s%s%s] ' % (a
, s
, e
))
489 plansmbtorture4testsuite('rpc.epmapper', 'nt4_dc:local', 'ncalrpc: -U$USERNAME%$PASSWORD', 'over ncalrpc')
490 plansmbtorture4testsuite('rpc.fsrvp', 'nt4_dc:local', 'ncacn_np:$SERVER_IP[/pipe/FssagentRpc] -U$USERNAME%$PASSWORD', 'over ncacn_np')