selftest: Test hide new files timeout
[amitay/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
22 import sys
23 sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), "../../selftest")))
24 import selftesthelpers
25 from selftesthelpers import bindir, srcdir, scriptdir, binpath
26 from selftesthelpers import plantestsuite, samba3srcdir
27 from selftesthelpers import smbtorture3, configuration, smbclient3
28 from selftesthelpers import net, wbinfo, dbwrap_tool, rpcclient, python
29 from selftesthelpers import smbget, smbcacls, smbcquotas, ntlm_auth3
30 from selftesthelpers import valgrindify, smbtorture4_testsuites
31 from selftesthelpers import smbtorture4_options
32 smbtorture4_options.extend([
33     '--option=torture:sharedelay=100000',
34    '--option=torture:writetimeupdatedelay=500000',
35 ])
36
37
38 def plansmbtorture4testsuite(name, env, options, description=''):
39     if description == '':
40         modname = "samba3.%s" % (name, )
41     else:
42         modname = "samba3.%s %s" % (name, description)
43
44     selftesthelpers.plansmbtorture4testsuite(
45         name, env, options, target='samba3', modname=modname)
46
47
48 # find config.h
49 try:
50     config_h = os.environ["CONFIG_H"]
51 except KeyError:
52     samba4bindir = bindir()
53     config_h = os.path.join(samba4bindir, "default/include/config.h")
54
55 # check available features
56 config_hash = dict()
57 f = open(config_h, 'r')
58 try:
59     lines = f.readlines()
60     config_hash = dict((x[0], ' '.join(x[1:]))
61                        for x in map(lambda line: line.strip().split(' ')[1:],
62                                     filter(lambda line: (line[0:7] == '#define') and (len(line.split(' ')) > 2), lines)))
63 finally:
64     f.close()
65
66 have_linux_kernel_oplocks = ("HAVE_KERNEL_OPLOCKS_LINUX" in config_hash)
67 have_inotify = ("HAVE_INOTIFY" in config_hash)
68 have_ldwrap = ("HAVE_LDWRAP" in config_hash)
69 with_pthreadpool = ("WITH_PTHREADPOOL" in config_hash)
70
71
72 plantestsuite("samba3.blackbox.success", "nt4_dc:local", [os.path.join(samba3srcdir, "script/tests/test_success.sh")])
73 plantestsuite("samba3.blackbox.failure", "nt4_dc:local", [os.path.join(samba3srcdir, "script/tests/test_failure.sh")])
74
75 plantestsuite("samba3.local_s3", "nt4_dc:local", [os.path.join(samba3srcdir, "script/tests/test_local_s3.sh")])
76
77 plantestsuite("samba3.blackbox.registry.upgrade", "nt4_dc:local", [os.path.join(samba3srcdir, "script/tests/test_registry_upgrade.sh"), net, dbwrap_tool])
78
79 tests = ["FDPASS", "LOCK1", "LOCK2", "LOCK3", "LOCK4", "LOCK5", "LOCK6", "LOCK7", "LOCK9",
80          "UNLINK", "BROWSE", "ATTR", "TRANS2", "TORTURE",
81          "OPLOCK1", "OPLOCK2", "OPLOCK4", "STREAMERROR",
82          "DIR", "DIR1", "DIR-CREATETIME", "TCON", "TCONDEV", "RW1", "RW2", "RW3", "LARGE_READX", "RW-SIGNING",
83          "OPEN", "XCOPY", "RENAME", "DELETE", "DELETE-LN", "WILDDELETE", "PROPERTIES", "W2K",
84          "TCON2", "IOCTL", "CHKPATH", "FDSESS", "CHAIN1", "CHAIN2", "OWNER-RIGHTS",
85          "CHAIN3", "PIDHIGH", "CLI_SPLICE",
86          "UID-REGRESSION-TEST", "SHORTNAME-TEST",
87          "CASE-INSENSITIVE-CREATE", "SMB2-BASIC", "NTTRANS-FSCTL", "SMB2-NEGPROT",
88          "SMB2-SESSION-REAUTH", "SMB2-SESSION-RECONNECT", "SMB2-FTRUNCATE",
89          "SMB2-ANONYMOUS", "SMB2-DIR-FSYNC",
90          "CLEANUP1",
91          "CLEANUP2",
92          "CLEANUP4",
93          "BAD-NBT-SESSION"]
94
95 for t in tests:
96     plantestsuite("samba3.smbtorture_s3.plain.%s" % t, "fileserver", [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_client.%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"])
98     if t == "TORTURE":
99         # this is a negative test to verify that the server rejects
100         # access without encryption
101         plantestsuite("samba3.smbtorture_s3.crypt_server.%s" % t, "nt4_dc", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/tmpenc', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
102     if t == "CLI_SPLICE":
103         # We must test this against the SMB1 fallback.
104         plantestsuite("samba3.smbtorture_s3.plain.%s" % t, "fileserver", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/tmp', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH", "-mNT1"])
105     plantestsuite("samba3.smbtorture_s3.plain.%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"])
106
107 t = "TLDAP"
108 plantestsuite("samba3.smbtorture_s3.plain.%s" % t, "ad_dc", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER/tmp', '$DC_USERNAME', '$DC_PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
109
110 #
111 # RENAME-ACCESS needs to run against a special share - acl_xattr_ign_sysacl_windows
112 #
113 plantestsuite("samba3.smbtorture_s3.plain.%s" % "RENAME-ACCESS", "nt4_dc", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), "RENAME-ACCESS", '//$SERVER_IP/acl_xattr_ign_sysacl_windows', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
114 plantestsuite("samba3.smbtorture_s3.crypt_client.%s" % "RENAME-ACCESS", "nt4_dc", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), "RENAME-ACCESS", '//$SERVER_IP/acl_xattr_ign_sysacl_windows', '$USERNAME', '$PASSWORD', smbtorture3, "-e", "-l $LOCAL_PATH"])
115 # non-crypt only
116
117 tests = ["OPLOCK-CANCEL"]
118 for t in tests:
119     plantestsuite("samba3.smbtorture_s3.plain.%s" % t, "nt4_dc", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/tmp', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
120
121 env = "nt4_dc"
122 tests = ["MANGLE-ILLEGAL"]
123 for t in tests:
124     plantestsuite("samba3.smbtorture_s3.plain.%s" % t, env, [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/mangle_illegal', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
125
126 tests = ["RW1", "RW2", "RW3", "SMB2-BASIC"]
127 for t in tests:
128     plantestsuite("samba3.smbtorture_s3.vfs_aio_pthread(simpleserver).%s" % t, "simpleserver", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/vfs_aio_pthread', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
129     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"])
130
131 plantestsuite("samba3.smbtorture_s3.hidenewfiles(simpleserver)",
132               "simpleserver",
133               [os.path.join(samba3srcdir,
134                             "script/tests/test_smbtorture_s3.sh"),
135                'hide-new-files-timeout',
136                '//$SERVER_IP/hidenewfiles',
137                '$USERNAME',
138                '$PASSWORD',
139                smbtorture3,
140                "",
141                "-l $LOCAL_PATH"])
142
143 shares = [
144     "vfs_aio_pthread_async_dosmode_default1",
145     "vfs_aio_pthread_async_dosmode_default2",
146     "vfs_aio_pthread_async_dosmode_force_sync1",
147     "vfs_aio_pthread_async_dosmode_force_sync2"
148 ]
149 for s in shares:
150     plantestsuite("samba3.smbtorture_s3.%s(simpleserver).SMB2-BASIC" % s, "simpleserver", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), 'SMB2-BASIC', '//$SERVER_IP/' + s, '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
151     t = "smb2.compound_find"
152     plansmbtorture4testsuite(t, "simpleserver", "//%s/%s %s" % ('$SERVER_IP', s, ' -U$USERNAME%$PASSWORD'), description=s)
153
154 posix_tests = ["POSIX", "POSIX-APPEND", "POSIX-SYMLINK-ACL", "POSIX-SYMLINK-EA", "POSIX-OFD-LOCK",
155                "POSIX-STREAM-DELETE", "WINDOWS-BAD-SYMLINK"]
156
157 for t in posix_tests:
158     plantestsuite("samba3.smbtorture_s3.plain.%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"])
159     plantestsuite("samba3.smbtorture_s3.crypt.%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"])
160     plantestsuite("samba3.smbtorture_s3.plain.%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"])
161
162 env = "nt4_dc:local"
163 t = "CLEANUP3"
164 plantestsuite("samba3.smbtorture_s3.plain.%s" % t, env, [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/tmp', '$USERNAME', '$PASSWORD', binpath('smbtorture3'), "", "-l $LOCAL_PATH"])
165
166 local_tests = [
167     "LOCAL-SUBSTITUTE",
168     "LOCAL-GENCACHE",
169     "LOCAL-BASE64",
170     "LOCAL-RBTREE",
171     "LOCAL-MEMCACHE",
172     "LOCAL-STREAM-NAME",
173     "LOCAL-string_to_sid",
174     "LOCAL-sid_to_string",
175     "LOCAL-binary_to_sid",
176     "LOCAL-DBTRANS",
177     "LOCAL-TEVENT-POLL",
178     "LOCAL-CONVERT-STRING",
179     "LOCAL-CONV-AUTH-INFO",
180     "LOCAL-IDMAP-TDB-COMMON",
181     "LOCAL-MESSAGING-READ1",
182     "LOCAL-MESSAGING-READ2",
183     "LOCAL-MESSAGING-READ3",
184     "LOCAL-MESSAGING-READ4",
185     "LOCAL-MESSAGING-FDPASS1",
186     "LOCAL-MESSAGING-FDPASS2",
187     "LOCAL-MESSAGING-FDPASS2a",
188     "LOCAL-MESSAGING-FDPASS2b",
189     "LOCAL-MESSAGING-SEND-ALL",
190     "LOCAL-PTHREADPOOL-TEVENT",
191     "LOCAL-CANONICALIZE-PATH",
192     "LOCAL-DBWRAP-WATCH1",
193     "LOCAL-DBWRAP-WATCH2",
194     "LOCAL-DBWRAP-DO-LOCKED1",
195     "LOCAL-G-LOCK1",
196     "LOCAL-G-LOCK2",
197     "LOCAL-G-LOCK3",
198     "LOCAL-G-LOCK4",
199     "LOCAL-G-LOCK5",
200     "LOCAL-G-LOCK6",
201     "LOCAL-NAMEMAP-CACHE1",
202     "LOCAL-hex_encode_buf",
203     "LOCAL-remove_duplicate_addrs2"]
204
205 for t in local_tests:
206     plantestsuite("samba3.smbtorture_s3.%s" % t, "none", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//foo/bar', '""', '""', smbtorture3, ""])
207
208 plantestsuite("samba.vfstest.stream_depot", "nt4_dc:local", [os.path.join(samba3srcdir, "script/tests/stream-depot/run.sh"), binpath("vfstest"), "$PREFIX", configuration])
209 plantestsuite("samba.vfstest.xattr-tdb-1", "nt4_dc:local", [os.path.join(samba3srcdir, "script/tests/xattr-tdb-1/run.sh"), binpath("vfstest"), "$PREFIX", configuration])
210 plantestsuite("samba.vfstest.acl", "nt4_dc:local", [os.path.join(samba3srcdir, "script/tests/vfstest-acl/run.sh"), binpath("vfstest"), "$PREFIX", configuration])
211 plantestsuite("samba.vfstest.catia", "nt4_dc:local", [os.path.join(samba3srcdir, "script/tests/vfstest-catia/run.sh"), binpath("vfstest"), "$PREFIX", configuration])
212
213 plantestsuite("samba3.blackbox.smbclient_basic.NT1", "nt4_dc_schannel", [os.path.join(samba3srcdir, "script/tests/test_smbclient_basic.sh"), '$SERVER', '$SERVER_IP', '$DC_USERNAME', '$DC_PASSWORD', smbclient3, configuration, "-mNT1"])
214 plantestsuite("samba3.blackbox.smbclient_basic.SMB2_02", "nt4_dc_schannel", [os.path.join(samba3srcdir, "script/tests/test_smbclient_basic.sh"), '$SERVER', '$SERVER_IP', '$DC_USERNAME', '$DC_PASSWORD', smbclient3, configuration, "-mSMB2_02"])
215 plantestsuite("samba3.blackbox.smbclient_basic.SMB2_10", "nt4_dc_schannel", [os.path.join(samba3srcdir, "script/tests/test_smbclient_basic.sh"), '$SERVER', '$SERVER_IP', '$DC_USERNAME', '$DC_PASSWORD', smbclient3, configuration, "-mSMB2_10"])
216 plantestsuite("samba3.blackbox.smbclient_basic.SMB3_02", "nt4_dc_schannel", [os.path.join(samba3srcdir, "script/tests/test_smbclient_basic.sh"), '$SERVER', '$SERVER_IP', '$DC_USERNAME', '$DC_PASSWORD', smbclient3, configuration, "-mSMB3_02"])
217 plantestsuite("samba3.blackbox.smbclient_basic.SMB3_11", "nt4_dc_schannel", [os.path.join(samba3srcdir, "script/tests/test_smbclient_basic.sh"), '$SERVER', '$SERVER_IP', '$DC_USERNAME', '$DC_PASSWORD', smbclient3, configuration, "-mSMB3_11"])
218
219 plantestsuite("samba3.blackbox.smbclient_basic", "ad_member", [os.path.join(samba3srcdir, "script/tests/test_smbclient_basic.sh"), '$SERVER', '$SERVER_IP', '$DC_USERNAME', '$DC_PASSWORD', smbclient3, configuration])
220 for options in ["", "--option=clientntlmv2auth=no", "--option=clientusespnego=no", "--option=clientusespnego=no --option=clientntlmv2auth=no", "--option=clientntlmv2auth=no --option=clientlanmanauth=yes --max-protocol=LANMAN2", "--option=clientntlmv2auth=no --option=clientlanmanauth=yes --option=clientmaxprotocol=NT1"]:
221     env = "nt4_dc"
222     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])
223
224 for env in ["nt4_dc", "nt4_member", "ad_member", "ad_dc", "ad_dc_ntvfs", "s4member", "fl2000dc"]:
225     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])
226     plantestsuite("samba3.blackbox.smbclient_ntlm.plain (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_ntlm.sh"), '$SERVER', '$DC_USERNAME', '$DC_PASSWORD', "never", smbclient3, configuration])
227
228 for options in ["--option=clientntlmv2auth=no", "--option=clientusespnego=no --option=clientntlmv2auth=no", "--option=clientusespnego=no --option=clientntlmv2auth=no -mNT1", ""]:
229     for env in ["nt4_member", "ad_member"]:
230         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])
231         plantestsuite("samba3.blackbox.smbclient_auth.plain (%s) %s member creds" % (env, options), env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IP', '$SERVER/$USERNAME', '$PASSWORD', smbclient3, configuration, options])
232
233 env = "ad_dc"
234 plantestsuite("samba3.blackbox.smbspool", env, [os.path.join(samba3srcdir, "script/tests/test_smbspool.sh"), '$SERVER', '$SERVER_IP', '$DC_USERNAME', '$DC_PASSWORD', env])
235
236 for env in ["ad_member:local", "nt4_dc:local"]:
237     plantestsuite("samba3.blackbox.smbpasswd", env, [os.path.join(samba3srcdir, "script/tests/test_smbpasswd.sh"), '$SERVER', '$SERVER_IP', '$DC_USERNAME', '$DC_PASSWORD'])
238
239 env = "nt4_dc"
240 plantestsuite("samba3.blackbox.smbclient_auth.plain (%s) ipv6" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IPV6', '$SERVER/$USERNAME', '$PASSWORD', smbclient3, configuration])
241
242 for env in ["nt4_member", "ad_member"]:
243     plantestsuite("samba3.blackbox.net_cred_change.(%s:local)" % env, "%s:local" % env, [os.path.join(samba3srcdir, "script/tests/test_net_cred_change.sh"), configuration])
244
245 env = "ad_member"
246 t = "--krb5auth=$DOMAIN/$DC_USERNAME%$DC_PASSWORD"
247 plantestsuite("samba3.wbinfo_simple.(%s:local).%s" % (env, t), "%s:local" % env, [os.path.join(srcdir(), "nsswitch/tests/test_wbinfo_simple.sh"), t])
248 plantestsuite("samba3.wbinfo_name_lookup", env,
249               [os.path.join(srcdir(),
250                             "nsswitch/tests/test_wbinfo_name_lookup.sh"),
251                '$DOMAIN', '$REALM', '$DC_USERNAME'])
252
253 env = "ad_member:local"
254 plantestsuite("samba3.wbinfo_user_info", env,
255               [os.path.join(srcdir(),
256                             "nsswitch/tests/test_wbinfo_user_info.sh"),
257                '$DOMAIN', '$REALM', '$DOMAIN', 'alice', 'alice', 'jane', 'jane.doe', env])
258
259 env = "fl2008r2dc:local"
260 plantestsuite("samba3.wbinfo_user_info", env,
261               [os.path.join(srcdir(),
262                             "nsswitch/tests/test_wbinfo_user_info.sh"),
263                '$TRUST_DOMAIN', '$TRUST_REALM', '$DOMAIN', 'alice', 'alice', 'jane', 'jane.doe', env])
264
265 env = "ad_member"
266 t = "WBCLIENT-MULTI-PING"
267 plantestsuite("samba3.smbtorture_s3.%s" % t, env, [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//foo/bar', '""', '""', smbtorture3, ""])
268 plantestsuite("samba3.substitutions", env, [os.path.join(samba3srcdir, "script/tests/test_substitutions.sh"), "$SERVER", "alice", "Secret007", "$PREFIX"])
269
270 plantestsuite("samba3.ntlm_auth.krb5 with old ccache(ktest:local)", "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])
271
272 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])
273
274
275 for env in ["maptoguest", "simpleserver"]:
276     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"])
277
278 env = "maptoguest"
279 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"])
280 plantestsuite("samba3.blackbox.smbclient_ntlm.plain (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_ntlm.sh"), '$SERVER', '$USERNAME', '$PASSWORD', "baduser", smbclient3, configuration])
281
282 # plain
283 for env in ["nt4_dc"]:
284     plantestsuite("samba3.blackbox.smbclient_s3.NT1.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, "NT1"])
285     plantestsuite("samba3.blackbox.smbclient_s3.SMB3.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, "SMB3"])
286
287 for env in ["nt4_member", "ad_member"]:
288     plantestsuite("samba3.blackbox.smbclient_s3.NT1.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, "NT1"])
289     plantestsuite("samba3.blackbox.smbclient_s3.SMB3.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, "SMB3"])
290
291 for env in ["nt4_dc"]:
292     plantestsuite("samba3.blackbox.smbclient_s3.NT1.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, "NT1", "--signing=required"])
293     plantestsuite("samba3.blackbox.smbclient_s3.SMB3.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, "SMB3", "--signing=required"])
294
295 for env in ["nt4_member", "ad_member"]:
296     plantestsuite("samba3.blackbox.smbclient_s3.NT1.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, "NT1", "--signing=required"])
297     plantestsuite("samba3.blackbox.smbclient_s3.SMB3.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, "SMB3", "--signing=required"])
298
299 for env in ["nt4_dc"]:
300     # encrypted
301     plantestsuite("samba3.blackbox.smbclient_s3.NT1.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, "NT1", "-e"])
302     plantestsuite("samba3.blackbox.smbclient_s3.SMB3.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, "SMB3", "-e"])
303
304 for env in ["fileserver"]:
305     plantestsuite("samba3.blackbox.preserve_case (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_preserve_case.sh"), '$SERVER', '$DOMAIN', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3])
306     plantestsuite("samba3.blackbox.dfree_command (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_dfree_command.sh"), '$SERVER', '$DOMAIN', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3])
307     plantestsuite("samba3.blackbox.dfree_quota (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_dfree_quota.sh"), '$SERVER', '$DOMAIN', '$USERNAME', '$PASSWORD', '$LOCAL_PATH', smbclient3, smbcquotas, smbcacls])
308     plantestsuite("samba3.blackbox.smbcquotas (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbcquota.sh"), '$SERVER', '$DOMAIN', '$USERNAME', '$PASSWORD', '$LOCAL_PATH', smbcquotas])
309     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])
310     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])
311     plantestsuite("samba3.blackbox.shadow_copy2 NT1 (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_shadow_copy.sh"), '$SERVER', '$SERVER_IP', '$DOMAIN', '$USERNAME', '$PASSWORD', '$LOCAL_PATH/shadow', smbclient3, '-m', 'NT1'])
312     plantestsuite("samba3.blackbox.shadow_copy2 SMB3 (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_shadow_copy.sh"), '$SERVER', '$SERVER_IP', '$DOMAIN', '$USERNAME', '$PASSWORD', '$LOCAL_PATH/shadow', smbclient3, '-m', 'SMB3'])
313     plantestsuite("samba3.blackbox.smbclient.forceuser_validusers (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_forceuser_validusers.sh"), '$SERVER', '$DOMAIN', '$USERNAME', '$PASSWORD', '$LOCAL_PATH', smbclient3])
314     plantestsuite("samba3.blackbox.smbget (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbget.sh"), '$SERVER', '$SERVER_IP', '$DOMAIN', 'smbget_user', '$PASSWORD', '$LOCAL_PATH/smbget', smbget])
315     plantestsuite("samba3.blackbox.netshareenum (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_shareenum.sh"), '$SERVER', '$USERNAME', '$PASSWORD', rpcclient])
316     plantestsuite("samba3.blackbox.acl_xattr.NT1", env, [os.path.join(samba3srcdir, "script/tests/test_acl_xattr.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3, smbcacls, '-mNT1'])
317     plantestsuite("samba3.blackbox.acl_xattr.SMB3", env, [os.path.join(samba3srcdir, "script/tests/test_acl_xattr.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3, smbcacls, '-mSMB3'])
318     plantestsuite("samba3.blackbox.smb2.not_casesensitive (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smb2_not_casesensitive.sh"), '//$SERVER/tmp', '$SERVER_IP', '$USERNAME', '$PASSWORD', '$LOCAL_PATH', smbclient3])
319     plantestsuite("samba3.blackbox.inherit_owner.default.NT1", env, [os.path.join(samba3srcdir, "script/tests/test_inherit_owner.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3, smbcacls, net, 'tmp', '0', '0', '-m', 'NT1'])
320     plantestsuite("samba3.blackbox.inherit_owner.default.SMB3", env, [os.path.join(samba3srcdir, "script/tests/test_inherit_owner.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3, smbcacls, net, 'tmp', '0', '0', '-m', 'SMB3'])
321     plantestsuite("samba3.blackbox.inherit_owner.full.NT1", env, [os.path.join(samba3srcdir, "script/tests/test_inherit_owner.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3, smbcacls, net, 'inherit_owner', '1', '1', '-m', 'NT1'])
322     plantestsuite("samba3.blackbox.inherit_owner.full.SMB3", env, [os.path.join(samba3srcdir, "script/tests/test_inherit_owner.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3, smbcacls, net, 'inherit_owner', '1', '1', '-m', 'SMB3'])
323     plantestsuite("samba3.blackbox.inherit_owner.unix.NT1", env, [os.path.join(samba3srcdir, "script/tests/test_inherit_owner.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3, smbcacls, net, 'inherit_owner_u', '0', '1', '-m', 'NT1'])
324     plantestsuite("samba3.blackbox.inherit_owner.unix.SMB3", env, [os.path.join(samba3srcdir, "script/tests/test_inherit_owner.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3, smbcacls, net, 'inherit_owner_u', '0', '1', '-m', 'SMB3'])
325     plantestsuite("samba3.blackbox.large_acl.NT1", env, [os.path.join(samba3srcdir, "script/tests/test_large_acl.sh"), '$SERVER', '$USERNAME', '$PASSWORD', smbclient3, smbcacls, '-m', 'NT1'])
326     plantestsuite("samba3.blackbox.large_acl.SMB3", env, [os.path.join(samba3srcdir, "script/tests/test_large_acl.sh"), '$SERVER', '$USERNAME', '$PASSWORD', smbclient3, smbcacls, '-m', 'SMB3'])
327     plantestsuite("samba3.blackbox.give_owner", env, [os.path.join(samba3srcdir, "script/tests/test_give_owner.sh"), '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3, smbcacls, net, 'tmp'])
328
329     #
330     # tar command tests
331     #
332
333     # Test smbclient/tarmode
334     plantestsuite("samba3.blackbox.smbclient_tarmode.NT1", env,
335                   [os.path.join(samba3srcdir, "script/tests/test_smbclient_tarmode.sh"),
336                    '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD',
337                    '$LOCAL_PATH/tarmode', '$PREFIX', smbclient3, configuration, "-mNT1"])
338     plantestsuite("samba3.blackbox.smbclient_tarmode.SMB3", env,
339                   [os.path.join(samba3srcdir, "script/tests/test_smbclient_tarmode.sh"),
340                    '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD',
341                    '$LOCAL_PATH/tarmode', '$PREFIX', smbclient3, configuration, "-mSMB3"])
342
343     # Test suite for new smbclient/tar with libarchive (GSoC 13)
344     plantestsuite("samba3.blackbox.smbclient_tar.NT1", env,
345                   [os.path.join(samba3srcdir, "script/tests/test_smbclient_tarmode.pl"),
346                    '-n', '$SERVER', '-i', '$SERVER_IP', '-s', 'tmp',
347                    '-u', '$USERNAME', '-p', '$PASSWORD', '-l', '$LOCAL_PATH/tarmode',
348                    '-d', '$PREFIX', '-b', smbclient3,
349                    '--subunit', '--', configuration, '-mNT1'])
350     plantestsuite("samba3.blackbox.smbclient_tar.SMB3", env,
351                   [os.path.join(samba3srcdir, "script/tests/test_smbclient_tarmode.pl"),
352                    '-n', '$SERVER', '-i', '$SERVER_IP', '-s', 'tmp',
353                    '-u', '$USERNAME', '-p', '$PASSWORD', '-l', '$LOCAL_PATH/tarmode',
354                    '-d', '$PREFIX', '-b', smbclient3,
355                    '--subunit', '--', configuration, '-mSMB3'])
356
357 plantestsuite("samba3.blackbox.net_usershare", "fileserver:local", [os.path.join(samba3srcdir, "script/tests/test_net_usershare.sh"), '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', smbclient3])
358
359 # TODO encrypted against member, with member creds, and with DC creds
360 plantestsuite("samba3.blackbox.net.misc", "nt4_dc:local",
361               [os.path.join(samba3srcdir, "script/tests/test_net_misc.sh"),
362                scriptdir, "$SMB_CONF_PATH", net, configuration])
363 plantestsuite("samba3.blackbox.net.local.registry", "nt4_dc:local",
364               [os.path.join(samba3srcdir, "script/tests/test_net_registry.sh"),
365                scriptdir, "$SMB_CONF_PATH", net, configuration])
366 plantestsuite("samba3.blackbox.net.registry.check", "nt4_dc:local",
367               [os.path.join(samba3srcdir, "script/tests/test_net_registry_check.sh"),
368                scriptdir, "$SMB_CONF_PATH", net, configuration, dbwrap_tool])
369 plantestsuite("samba3.blackbox.net.rpc.registry", "nt4_dc",
370               [os.path.join(samba3srcdir, "script/tests/test_net_registry.sh"),
371                scriptdir, "$SMB_CONF_PATH", net, configuration, 'rpc'])
372
373 plantestsuite("samba3.blackbox.net.local.registry.roundtrip", "nt4_dc:local",
374               [os.path.join(samba3srcdir, "script/tests/test_net_registry_roundtrip.sh"),
375                scriptdir, "$SMB_CONF_PATH", net, configuration])
376 plantestsuite("samba3.blackbox.net.rpc.registry.roundtrip", "nt4_dc",
377               [os.path.join(samba3srcdir, "script/tests/test_net_registry_roundtrip.sh"),
378                scriptdir, "$SMB_CONF_PATH", net, configuration, 'rpc'])
379
380 plantestsuite("samba3.blackbox.net.local.conf", "nt4_dc:local",
381               [os.path.join(samba3srcdir, "script/tests/test_net_conf.sh"),
382                scriptdir, "$SMB_CONF_PATH", net, configuration])
383 plantestsuite("samba3.blackbox.net.rpc.conf", "nt4_dc",
384               [os.path.join(samba3srcdir, "script/tests/test_net_conf.sh"),
385                scriptdir, "$SMB_CONF_PATH", net, configuration, 'rpc'])
386
387
388 plantestsuite("samba3.blackbox.testparm", "nt4_dc:local",
389               [os.path.join(samba3srcdir, "script/tests/test_testparm_s3.sh"),
390                "$LOCAL_PATH"])
391
392 plantestsuite(
393     "samba3.pthreadpool", "none",
394     [os.path.join(samba3srcdir, "script/tests/test_pthreadpool.sh")])
395
396 if with_pthreadpool and have_ldwrap:
397     plantestsuite("samba3.pthreadpool_cmocka", "none",
398                   [os.path.join(bindir(), "pthreadpooltest_cmocka")])
399
400 if with_pthreadpool:
401     plantestsuite("samba3.libwbclient_threads",
402                   "nt4_member",
403                   [os.path.join(samba3srcdir,
404                                 "script/tests/test_libwbclient_threads.sh"),
405                    "$DOMAIN", "$DC_USERNAME"])
406
407 plantestsuite("samba3.async_req", "nt4_dc",
408               [os.path.join(samba3srcdir, "script/tests/test_async_req.sh")])
409
410 # smbtorture4 tests
411
412 base = ["base.attr", "base.charset", "base.chkpath", "base.createx_access", "base.defer_open", "base.delaywrite", "base.delete",
413         "base.deny1", "base.deny2", "base.deny3", "base.denydos", "base.dir1", "base.dir2",
414         "base.disconnect", "base.fdpass", "base.lock",
415         "base.mangle", "base.negnowait", "base.ntdeny1",
416         "base.ntdeny2", "base.open", "base.openattr", "base.properties", "base.rename", "base.rw1",
417         "base.secleak", "base.tcon", "base.tcondev", "base.trans2", "base.unlink", "base.vuid",
418         "base.xcopy", "base.samba3error"]
419
420 raw = ["raw.acls", "raw.chkpath", "raw.close", "raw.composite", "raw.context", "raw.eas",
421        "raw.ioctl", "raw.lock", "raw.mkdir", "raw.mux", "raw.notify", "raw.open", "raw.oplock",
422        "raw.qfileinfo", "raw.qfsinfo", "raw.read", "raw.rename", "raw.search", "raw.seek",
423        "raw.sfileinfo.base", "raw.sfileinfo.bug", "raw.streams", "raw.unlink", "raw.write",
424        "raw.samba3hide", "raw.samba3badpath", "raw.sfileinfo.rename", "raw.session",
425        "raw.samba3caseinsensitive", "raw.samba3posixtimedlock",
426        "raw.samba3rootdirfid", "raw.sfileinfo.end-of-file",
427        "raw.bench-oplock", "raw.bench-lock", "raw.bench-open", "raw.bench-tcon",
428        "raw.samba3checkfsp", "raw.samba3closeerr", "raw.samba3oplocklogoff", "raw.samba3badnameblob"]
429
430 smb2 = smbtorture4_testsuites("smb2.")
431
432 rpc = ["rpc.authcontext", "rpc.samba3.bind", "rpc.samba3.srvsvc", "rpc.samba3.sharesec",
433        "rpc.samba3.spoolss", "rpc.samba3.wkssvc", "rpc.samba3.winreg",
434        "rpc.samba3.getaliasmembership-0",
435        "rpc.samba3.netlogon", "rpc.samba3.sessionkey", "rpc.samba3.getusername",
436        "rpc.samba3.smb1-pipe-name", "rpc.samba3.smb2-pipe-name",
437        "rpc.samba3.smb-reauth1", "rpc.samba3.smb-reauth2",
438        "rpc.svcctl", "rpc.ntsvcs", "rpc.winreg", "rpc.eventlog",
439        "rpc.spoolss.printserver", "rpc.spoolss.win", "rpc.spoolss.notify", "rpc.spoolss.printer",
440        "rpc.spoolss.driver",
441        "rpc.lsa", "rpc.lsa-getuser", "rpc.lsa.lookupsids", "rpc.lsa.lookupnames",
442        "rpc.lsa.privileges", "rpc.lsa.secrets",
443        "rpc.samr", "rpc.samr.users", "rpc.samr.users.privileges", "rpc.samr.passwords",
444        "rpc.samr.passwords.pwdlastset", "rpc.samr.passwords.lockout", "rpc.samr.passwords.badpwdcount", "rpc.samr.large-dc", "rpc.samr.machine.auth",
445        "rpc.samr.priv", "rpc.samr.passwords.validate",
446        "rpc.netlogon.admin",
447        "rpc.schannel", "rpc.schannel2", "rpc.bench-schannel1", "rpc.schannel_anon_setpw", "rpc.join", "rpc.bind"]
448
449 local = ["local.nss"]
450
451 idmap = ["idmap.rfc2307", "idmap.alloc", "idmap.rid", "idmap.ad"]
452
453 rap = ["rap.basic", "rap.rpc", "rap.printing", "rap.sam"]
454
455 unix = ["unix.info2", "unix.whoami"]
456
457 nbt = ["nbt.dgram"]
458
459 libsmbclient = ["libsmbclient.version", "libsmbclient.initialize",
460                 "libsmbclient.configuration", "libsmbclient.setConfiguration",
461                 "libsmbclient.options", "libsmbclient.opendir",
462                 "libsmbclient.list_shares", "libsmbclient.readdirplus"]
463
464 vfs = [
465     "vfs.fruit",
466     "vfs.acl_xattr",
467     "vfs.fruit_netatalk",
468     "vfs.fruit_file_id",
469     "vfs.fruit_timemachine",
470     "vfs.fruit_conversion",
471 ]
472
473 tests = base + raw + smb2 + rpc + unix + local + rap + nbt + libsmbclient + idmap + vfs
474
475 for t in tests:
476     if t == "base.delaywrite" or t == "base.deny1" or t == "base.deny2":
477         plansmbtorture4testsuite(t, "fileserver", '//$SERVER/tmp -U$USERNAME%$PASSWORD --maximum-runtime=900')
478     elif t == "base.createx_access":
479         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD -k yes --maximum-runtime=900')
480     elif t == "rap.sam":
481         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --option=doscharset=ISO-8859-1')
482         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --option=doscharset=ISO-8859-1')
483     elif t == "winbind.pac":
484         plansmbtorture4testsuite(t, "ad_member:local", '//$SERVER/tmp --realm=$REALM --machine-pass --option=torture:addc=$DC_SERVER', description="machine account")
485     elif t == "unix.whoami":
486         plansmbtorture4testsuite(t, "nt4_member:local", '//$SERVER/tmp --machine-pass', description="machine account")
487         plansmbtorture4testsuite(t, "ad_member:local", '//$SERVER/tmp --machine-pass --option=torture:addc=$DC_SERVER', description="machine account")
488         for env in ["nt4_dc", "nt4_member"]:
489             plansmbtorture4testsuite(t, env, '//$SERVER/tmp -U$DC_USERNAME%$DC_PASSWORD')
490             plansmbtorture4testsuite(t, env, '//$SERVER/tmpguest -U%', description='anonymous connection')
491         for env in ["ad_dc", "ad_member"]:
492             plansmbtorture4testsuite(t, env, '//$SERVER/tmp -U$DC_USERNAME@$REALM%$DC_PASSWORD --option=torture:addc=$DC_SERVER')
493             plansmbtorture4testsuite(t, env, '//$SERVER/tmp -k yes -U$DC_USERNAME@$REALM%$DC_PASSWORD --option=torture:addc=$DC_SERVER', description='kerberos connection')
494             plansmbtorture4testsuite(t, env, '//$SERVER/tmpguest -U% --option=torture:addc=$DC_SERVER', description='anonymous connection')
495             plansmbtorture4testsuite(t, env, '//$SERVER/tmp -k no -U$DC_USERNAME@$REALM%$DC_PASSWORD', description='ntlm user@realm')
496     elif t == "raw.samba3posixtimedlock":
497         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmpguest -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/nt4_dc/share')
498         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER_IP/tmpguest -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/ad_dc/share')
499     elif t == "raw.chkpath":
500         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD')
501         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD')
502     elif t == "raw.samba3hide" or t == "raw.samba3checkfsp" or t == "raw.samba3closeerr":
503         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
504         plansmbtorture4testsuite(t, "simpleserver", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
505         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
506     elif t == "raw.session" or t == "smb2.session":
507         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD', 'plain')
508         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmpenc -U$USERNAME%$PASSWORD', 'enc')
509         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -k no -U$USERNAME%$PASSWORD', 'ntlm')
510         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -k yes -U$USERNAME%$PASSWORD', 'krb5')
511     elif t == "rpc.lsa":
512         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD', 'over ncacn_np ')
513         plansmbtorture4testsuite(t, "nt4_dc", 'ncacn_ip_tcp:$SERVER_IP -U$USERNAME%$PASSWORD', 'over ncacn_ip_tcp ')
514         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD', 'over ncacn_np ')
515         plansmbtorture4testsuite(t, "ad_dc", 'ncacn_ip_tcp:$SERVER_IP -U$USERNAME%$PASSWORD', 'over ncacn_ip_tcp ')
516     elif t == "rpc.samr.passwords.validate":
517         plansmbtorture4testsuite(t, "nt4_dc", 'ncacn_ip_tcp:$SERVER_IP[seal] -U$USERNAME%$PASSWORD', 'over ncacn_ip_tcp ')
518         plansmbtorture4testsuite(t, "ad_dc", 'ncacn_ip_tcp:$SERVER_IP[seal] -U$USERNAME%$PASSWORD', 'over ncacn_ip_tcp ')
519     elif t == "smb2.durable-open" or t == "smb2.durable-v2-open" or t == "smb2.replay" or t == "smb2.durable-v2-delay":
520         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/durable -U$USERNAME%$PASSWORD')
521         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER_IP/durable -U$USERNAME%$PASSWORD')
522     elif t == "base.rw1":
523         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
524         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/valid-users-tmp -U$USERNAME%$PASSWORD')
525         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/write-list-tmp -U$USERNAME%$PASSWORD')
526         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
527     elif t == "idmap.rfc2307":
528         plantestsuite(t, "ad_member_rfc2307",
529                       [os.path.join(samba3srcdir,
530                                     "../nsswitch/tests/test_idmap_rfc2307.sh"),
531                        '$DOMAIN',
532                        'Administrator', '2000000',
533                        'Guest', '2000001',
534                        '"Domain Users"', '2000002',
535                        'DnsAdmins', '2000003',
536                        '2000005', '35',
537                        'ou=idmap,dc=samba,dc=example,dc=com',
538                        '$DC_SERVER', '$DC_USERNAME', '$DC_PASSWORD'])
539     elif t == "idmap.alloc":
540         plantestsuite(t, "ad_member_rfc2307", [os.path.join(samba3srcdir, "../nsswitch/tests/test_idmap_nss.sh"), '$DOMAIN'])
541     elif t == "idmap.rid":
542         plantestsuite(t, "ad_member_idmap_rid", [os.path.join(samba3srcdir, "../nsswitch/tests/test_idmap_rid.sh"), '$DOMAIN', '2000000'])
543     elif t == "idmap.ad":
544         plantestsuite(t, "ad_member_idmap_ad", [os.path.join(samba3srcdir, "../nsswitch/tests/test_idmap_ad.sh"), '$DOMAIN', '$DC_SERVER', '$DC_PASSWORD'])
545     elif t == "raw.acls":
546         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
547         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/nfs4acl_simple_40 -U$USERNAME%$PASSWORD', description='nfs4acl_xattr-simple-40')
548         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/nfs4acl_special_40 -U$USERNAME%$PASSWORD', description='nfs4acl_xattr-special-40')
549         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/nfs4acl_simple_41 -U$USERNAME%$PASSWORD', description='nfs4acl_xattr-simple-41')
550         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/nfs4acl_xdr_40 -U$USERNAME%$PASSWORD', description='nfs4acl_xattr-xdr-40')
551         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/nfs4acl_xdr_41 -U$USERNAME%$PASSWORD', description='nfs4acl_xattr-xdr-41')
552         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD')
553     elif t == "smb2.ioctl":
554         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/fs_specific -U$USERNAME%$PASSWORD', 'fs_specific')
555         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
556         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
557     elif t == "smb2.lock":
558         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/aio -U$USERNAME%$PASSWORD', 'aio')
559         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
560     elif t == "raw.lock" or t == "base.lock":
561         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
562     elif t == "raw.read":
563         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
564         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/aio -U$USERNAME%$PASSWORD', 'aio')
565         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
566     elif t == "raw.search":
567         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
568 # test the dirsort module.
569         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmpsort -U$USERNAME%$PASSWORD')
570         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
571     elif t == "vfs.fruit":
572         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/vfs_fruit -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/nt4_dc/share --option=torture:share2=vfs_wo_fruit', 'metadata_netatalk')
573         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/vfs_fruit_metadata_stream -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/nt4_dc/share --option=torture:share2=vfs_wo_fruit', 'metadata_stream')
574         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/vfs_fruit_stream_depot -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/nt4_dc/share --option=torture:share2=vfs_wo_fruit_stream_depot', 'streams_depot')
575     elif t == "vfs.fruit_netatalk":
576         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/vfs_fruit_xattr -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/nt4_dc/share')
577     elif t == "vfs.fruit_timemachine":
578         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/vfs_fruit_timemachine -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/nt4_dc/share')
579     elif t == "vfs.fruit_file_id":
580         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/vfs_fruit -U$USERNAME%$PASSWORD')
581     elif t == "vfs.fruit_conversion":
582         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --option=torture:share2=vfs_fruit_wipe_intentionally_left_blank_rfork --option=torture:delete_empty_adfiles=false', 'wipe_intentionally_left_blank_rfork')
583         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --option=torture:share2=vfs_fruit_delete_empty_adfiles --option=torture:delete_empty_adfiles=true', 'delete_empty_adfiles')
584     elif t == "rpc.schannel_anon_setpw":
585         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$%', description="anonymous password set")
586         plansmbtorture4testsuite(t, "nt4_dc_schannel", '//$SERVER_IP/tmp -U$%', description="anonymous password set (schannel enforced server-side)")
587         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$%', description="anonymous password set")
588     elif t == "local.nss":
589         for env in ["nt4_dc:local", "ad_member:local", "nt4_member:local", "ad_dc:local"]:
590             plansmbtorture4testsuite(t, env, '//$SERVER/tmp -U$USERNAME%$PASSWORD')
591     elif t == "smb2.change_notify_disabled":
592         plansmbtorture4testsuite(t, "simpleserver", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
593     elif t == "smb2.notify" or t == "raw.notify" or t == "smb2.oplock" or t == "raw.oplock":
594         # These tests are a little slower so don't duplicate them with ad_dc
595         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --signing=required')
596     elif t == "smb2.dosmode":
597         plansmbtorture4testsuite(t, "simpleserver", '//$SERVER/dosmode -U$USERNAME%$PASSWORD')
598     elif t == "smb2.kernel-oplocks":
599         if have_linux_kernel_oplocks:
600             plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER/kernel_oplocks -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/nt4_dc/share')
601     elif t == "smb2.notify-inotify":
602         if have_inotify:
603             plansmbtorture4testsuite(t, "fileserver", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
604     elif t == "vfs.acl_xattr":
605         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
606     elif t == "smb2.compound_find":
607         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER/compound_find -U$USERNAME%$PASSWORD')
608         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
609         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
610     elif t == "rpc.samr.users.privileges":
611         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --option=torture:nt4_dc=true')
612         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
613     elif t == "smb2.compound":
614         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
615         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/aio -U$USERNAME%$PASSWORD', 'aio')
616         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
617     elif t == "rpc.samba3.netlogon" or t == "rpc.samba3.sessionkey":
618         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --option=torture:wksname=samba3rpctest')
619         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD --option=torture:wksname=samba3rpctest')
620     elif t.startswith("libsmbclient"):
621         url = "smb://$USERNAME:$PASSWORD@$SERVER/tmp"
622         if t == "libsmbclient.list_shares":
623             url = "smb://$USERNAME:$PASSWORD@$SERVER"
624
625         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%%$PASSWORD '
626                                     '--option=torture:smburl=' + url +
627                                     ' --option=torture:replace_smbconf=%s' % os.path.join(srcdir(), "testdata/samba3/smb_new.conf"))
628         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%%$PASSWORD '
629                                     '--option=torture:smburl=' + url +
630                                     ' --option=torture:replace_smbconf=%s' % os.path.join(srcdir(), "testdata/samba3/smb_new.conf"))
631     elif t == "smb2.streams":
632         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
633         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
634         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/streams_xattr -U$USERNAME%$PASSWORD', 'streams_xattr')
635     elif t == "smb2.aio_delay":
636         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/aio_delay_inject -U$USERNAME%$PASSWORD')
637     elif t == "smb2.delete-on-close-perms":
638         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
639         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/delete_readonly -U$USERNAME%$PASSWORD --option=torture:delete_readonly=true')
640         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
641     else:
642         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
643         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
644
645
646 test = 'rpc.lsa.lookupsids'
647 auth_options = ["", "ntlm", "spnego", "spnego,ntlm", "spnego,smb1", "spnego,smb2"]
648 signseal_options = ["", ",connect", ",packet", ",sign", ",seal"]
649 endianness_options = ["", ",bigendian"]
650 for s in signseal_options:
651     for e in endianness_options:
652         for a in auth_options:
653             binding_string = "ncacn_np:$SERVER[%s%s%s]" % (a, s, e)
654             options = binding_string + " -U$USERNAME%$PASSWORD"
655             plansmbtorture4testsuite(test, "nt4_dc", options, 'over ncacn_np with [%s%s%s] ' % (a, s, e))
656             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"),
657                                                                                                                  "none", options, configuration])
658
659     # We should try more combinations in future, but this is all
660     # the pre-calculated credentials cache supports at the moment
661     #
662     # As the ktest env requires SMB3_00 we need to use "smb2" until
663     # dcerpc client code in smbtorture support autonegotiation
664     # of any smb dialect.
665     e = ""
666     a = "smb2"
667     binding_string = "ncacn_np:$SERVER[%s%s%s]" % (a, s, e)
668     options = binding_string + " -k yes --krb5-ccache=$PREFIX/ktest/krb5_ccache-2"
669     plansmbtorture4testsuite(test, "ktest", options, 'krb5 with old ccache ncacn_np with [%s%s%s] ' % (a, s, e))
670
671     options = binding_string + " -k yes --krb5-ccache=$PREFIX/ktest/krb5_ccache-3"
672     plansmbtorture4testsuite(test, "ktest", options, 'krb5 ncacn_np with [%s%s%s] ' % (a, s, e))
673
674     auth_options2 = ["krb5", "spnego,krb5"]
675     for a in auth_options2:
676         binding_string = "ncacn_np:$SERVER[%s%s%s]" % (a, s, e)
677
678         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"),
679                                                                                                             "$PREFIX/ktest/krb5_ccache-3", binding_string, "-k", configuration])
680
681 plantestsuite("samba3.blackbox.rpcclient_samlogon", "ad_member:local", [os.path.join(samba3srcdir, "script/tests/test_rpcclient_samlogon.sh"),
682                                                                         "$DC_USERNAME", "$DC_PASSWORD", "ncacn_np:$DC_SERVER", configuration])
683 plantestsuite("samba3.blackbox.sharesec", "simpleserver:local",
684               [os.path.join(samba3srcdir, "script/tests/test_sharesec.sh"),
685                configuration, os.path.join(bindir(), "sharesec"), "tmp"])
686
687 plantestsuite("samba3.blackbox.net_tdb", "simpleserver:local",
688               [os.path.join(samba3srcdir, "script/tests/test_net_tdb.sh"),
689                smbclient3, '$SERVER', 'tmp', '$USERNAME', '$PASSWORD',
690                configuration, '$LOCAL_PATH', '$LOCK_DIR'])
691
692 plantestsuite("samba3.blackbox.smbd_error", "simpleserver:local",
693               [os.path.join(samba3srcdir, "script/tests/test_smbd_error.sh")])
694
695 plantestsuite("samba3.blackbox.durable_v2_delay", "simpleserver:local",
696               [os.path.join(samba3srcdir, "script/tests/test_durable_handle_reconnect.sh")])
697
698 plantestsuite("samba3.blackbox.net_cache_samlogon", "ad_member:local",
699               [os.path.join(samba3srcdir, "script/tests/test_net_cache_samlogon.sh"),
700                '$SERVER', 'tmp', '$DC_USERNAME', '$DC_PASSWORD'])
701
702 plantestsuite("samba3.blackbox.net_dom_join_fail_dc", "nt4_dc",
703               [os.path.join(samba3srcdir, "script/tests/test_net_dom_join_fail_dc.sh"),
704                "$USERNAME", "$PASSWORD", "$SERVER", "$PREFIX/net_dom_join_fail_dc",
705                configuration])
706 plantestsuite("samba3.blackbox.net_rpc_join", "nt4_dc",
707               [os.path.join(samba3srcdir, "script/tests/test_net_rpc_join.sh"),
708                "$USERNAME", "$PASSWORD", "$SERVER", "$PREFIX/net_rpc_join",
709                configuration])
710 plantestsuite("samba3.blackbox.net_rpc_oldjoin", "nt4_dc:local",
711               [os.path.join(samba3srcdir, "script/tests/test_net_rpc_oldjoin.sh"),
712                "$SERVER", "$PREFIX/net_rpc_oldjoin",
713                "$SMB_CONF_PATH"])
714
715 plantestsuite("samba3.blackbox.rpcclient_srvsvc", "simpleserver",
716               [os.path.join(samba3srcdir, "script/tests/test_rpcclientsrvsvc.sh"),
717                "$USERNAME", "$PASSWORD", "$SERVER",
718                os.path.join(bindir(), "rpcclient"), "tmp"])
719
720 plantestsuite("samba3.blackbox.rpcclient.pw-nt-hash", "simpleserver",
721               [os.path.join(samba3srcdir, "script/tests/test_rpcclient_pw_nt_hash.sh"),
722                "$USERNAME", "$PASSWORD", "$SERVER",
723                os.path.join(bindir(), "rpcclient")])
724
725 plantestsuite("samba3.blackbox.smbclient.encryption_off", "simpleserver",
726               [os.path.join(samba3srcdir, "script/tests/test_smbclient_encryption_off.sh"),
727                "$USERNAME", "$PASSWORD", "$SERVER",
728                smbclient3])
729
730 plantestsuite("samba3.blackbox.rpcclient_netsessenum", "ad_member",
731               [os.path.join(samba3srcdir,
732                             "script/tests/test_rpcclient_netsessenum.sh"),
733                "$DOMAIN", "$DC_USERNAME", "$DC_PASSWORD", "$SERVER",
734                os.path.join(bindir(), "rpcclient"), smbtorture3, "tmp"])
735
736 # The ktest environment uses:
737 # server min protocol = SMB3_00
738 # client max protocol = SMB3
739 options_list = ["", "-e"]
740 for options in options_list:
741     plantestsuite("samba3.blackbox.smbclient_krb5 old ccache %s" % options, "ktest:local",
742                   [os.path.join(samba3srcdir, "script/tests/test_smbclient_krb5.sh"),
743                    "$PREFIX/ktest/krb5_ccache-2",
744                    smbclient3, "$SERVER", options, configuration])
745
746     plantestsuite("samba3.blackbox.smbclient_krb5 new ccache %s" % options, "ktest:local",
747                   [os.path.join(samba3srcdir, "script/tests/test_smbclient_krb5.sh"),
748                    "$PREFIX/ktest/krb5_ccache-3",
749                    smbclient3, "$SERVER", options, configuration])
750
751     plantestsuite("samba3.blackbox.smbclient_large_file %s krb5" % options, "ktest:local",
752                   [os.path.join(samba3srcdir, "script/tests/test_smbclient_large_file.sh"),
753                    "$PREFIX/ktest/krb5_ccache-3",
754                    smbclient3, "$SERVER", "$PREFIX", options, "-k " + configuration])
755
756 options_list = ["-mNT1", "-mNT1 -e", "-mSMB3", "-mSMB3 -e"]
757 for options in options_list:
758     plantestsuite("samba3.blackbox.smbclient_large_file %s NTLM" % options, "nt4_dc:local",
759                   [os.path.join(samba3srcdir, "script/tests/test_smbclient_large_file.sh"),
760                    "none",
761                    smbclient3, "$SERVER", "$PREFIX", options, "-U$USERNAME%$PASSWORD " + configuration])
762
763 for alias in ["foo", "bar"]:
764     plantestsuite("samba3.blackbox.smbclient_netbios_aliases [%s]" % alias, "ad_member:local",
765                   [os.path.join(samba3srcdir, "script/tests/test_smbclient_netbios_aliases.sh"),
766                    smbclient3, alias, "$DC_USERNAME", "$DC_PASSWORD", "$PREFIX", options, configuration])
767
768 for e in endianness_options:
769     for a in auth_options:
770         for s in signseal_options:
771             binding_string = "ncacn_ip_tcp:$SERVER_IP[%s%s%s]" % (a, s, e)
772             options = binding_string + " -U$USERNAME%$PASSWORD"
773             plansmbtorture4testsuite(test, "nt4_dc", options, 'over ncacn_ip_tcp with [%s%s%s] ' % (a, s, e))
774
775 plansmbtorture4testsuite('rpc.epmapper', 'nt4_dc:local', 'ncalrpc: -U$USERNAME%$PASSWORD', 'over ncalrpc')
776 plansmbtorture4testsuite('rpc.fsrvp', 'nt4_dc:local', 'ncacn_np:$SERVER_IP[/pipe/FssagentRpc] -U$USERNAME%$PASSWORD', 'over ncacn_np')