720485db7dbbc0e7aea4890cfbf9a92fd13134e6
[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 shares = [
132     "vfs_aio_pthread_async_dosmode_default1",
133     "vfs_aio_pthread_async_dosmode_default2",
134     "vfs_aio_pthread_async_dosmode_force_sync1",
135     "vfs_aio_pthread_async_dosmode_force_sync2"
136 ]
137 for s in shares:
138     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"])
139     t = "smb2.compound_find"
140     plansmbtorture4testsuite(t, "simpleserver", "//%s/%s %s" % ('$SERVER_IP', s, ' -U$USERNAME%$PASSWORD'), description=s)
141
142 posix_tests = ["POSIX", "POSIX-APPEND", "POSIX-SYMLINK-ACL", "POSIX-SYMLINK-EA", "POSIX-OFD-LOCK",
143                "POSIX-STREAM-DELETE", "WINDOWS-BAD-SYMLINK"]
144
145 for t in posix_tests:
146     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"])
147     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"])
148     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"])
149
150 env = "nt4_dc:local"
151 t = "CLEANUP3"
152 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"])
153
154 local_tests = [
155     "LOCAL-SUBSTITUTE",
156     "LOCAL-GENCACHE",
157     "LOCAL-BASE64",
158     "LOCAL-RBTREE",
159     "LOCAL-MEMCACHE",
160     "LOCAL-STREAM-NAME",
161     "LOCAL-string_to_sid",
162     "LOCAL-sid_to_string",
163     "LOCAL-binary_to_sid",
164     "LOCAL-DBTRANS",
165     "LOCAL-TEVENT-POLL",
166     "LOCAL-CONVERT-STRING",
167     "LOCAL-CONV-AUTH-INFO",
168     "LOCAL-IDMAP-TDB-COMMON",
169     "LOCAL-MESSAGING-READ1",
170     "LOCAL-MESSAGING-READ2",
171     "LOCAL-MESSAGING-READ3",
172     "LOCAL-MESSAGING-READ4",
173     "LOCAL-MESSAGING-FDPASS1",
174     "LOCAL-MESSAGING-FDPASS2",
175     "LOCAL-MESSAGING-FDPASS2a",
176     "LOCAL-MESSAGING-FDPASS2b",
177     "LOCAL-MESSAGING-SEND-ALL",
178     "LOCAL-PTHREADPOOL-TEVENT",
179     "LOCAL-CANONICALIZE-PATH",
180     "LOCAL-DBWRAP-WATCH1",
181     "LOCAL-DBWRAP-WATCH2",
182     "LOCAL-DBWRAP-DO-LOCKED1",
183     "LOCAL-G-LOCK1",
184     "LOCAL-G-LOCK2",
185     "LOCAL-G-LOCK3",
186     "LOCAL-G-LOCK4",
187     "LOCAL-G-LOCK5",
188     "LOCAL-G-LOCK6",
189     "LOCAL-NAMEMAP-CACHE1",
190     "LOCAL-hex_encode_buf",
191     "LOCAL-remove_duplicate_addrs2"]
192
193 for t in local_tests:
194     plantestsuite("samba3.smbtorture_s3.%s" % t, "none", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//foo/bar', '""', '""', smbtorture3, ""])
195
196 plantestsuite("samba.vfstest.stream_depot", "nt4_dc:local", [os.path.join(samba3srcdir, "script/tests/stream-depot/run.sh"), binpath("vfstest"), "$PREFIX", configuration])
197 plantestsuite("samba.vfstest.xattr-tdb-1", "nt4_dc:local", [os.path.join(samba3srcdir, "script/tests/xattr-tdb-1/run.sh"), binpath("vfstest"), "$PREFIX", configuration])
198 plantestsuite("samba.vfstest.acl", "nt4_dc:local", [os.path.join(samba3srcdir, "script/tests/vfstest-acl/run.sh"), binpath("vfstest"), "$PREFIX", configuration])
199 plantestsuite("samba.vfstest.catia", "nt4_dc:local", [os.path.join(samba3srcdir, "script/tests/vfstest-catia/run.sh"), binpath("vfstest"), "$PREFIX", configuration])
200
201 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"])
202 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"])
203 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"])
204 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"])
205 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"])
206
207 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])
208 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"]:
209     env = "nt4_dc"
210     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])
211
212 for env in ["nt4_dc", "nt4_member", "ad_member", "ad_dc", "ad_dc_ntvfs", "s4member", "fl2000dc"]:
213     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])
214     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])
215
216 for options in ["--option=clientntlmv2auth=no", "--option=clientusespnego=no --option=clientntlmv2auth=no", "--option=clientusespnego=no --option=clientntlmv2auth=no -mNT1", ""]:
217     for env in ["nt4_member", "ad_member"]:
218         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])
219         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])
220
221 env = "ad_dc"
222 plantestsuite("samba3.blackbox.smbspool", env, [os.path.join(samba3srcdir, "script/tests/test_smbspool.sh"), '$SERVER', '$SERVER_IP', '$DC_USERNAME', '$DC_PASSWORD', env])
223
224 for env in ["ad_member:local", "nt4_dc:local"]:
225     plantestsuite("samba3.blackbox.smbpasswd", env, [os.path.join(samba3srcdir, "script/tests/test_smbpasswd.sh"), '$SERVER', '$SERVER_IP', '$DC_USERNAME', '$DC_PASSWORD'])
226
227 env = "nt4_dc"
228 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])
229
230 for env in ["nt4_member", "ad_member"]:
231     plantestsuite("samba3.blackbox.net_cred_change.(%s:local)" % env, "%s:local" % env, [os.path.join(samba3srcdir, "script/tests/test_net_cred_change.sh"), configuration])
232
233 env = "ad_member"
234 t = "--krb5auth=$DOMAIN/$DC_USERNAME%$DC_PASSWORD"
235 plantestsuite("samba3.wbinfo_simple.(%s:local).%s" % (env, t), "%s:local" % env, [os.path.join(srcdir(), "nsswitch/tests/test_wbinfo_simple.sh"), t])
236 plantestsuite("samba3.wbinfo_name_lookup", env,
237               [os.path.join(srcdir(),
238                             "nsswitch/tests/test_wbinfo_name_lookup.sh"),
239                '$DOMAIN', '$REALM', '$DC_USERNAME'])
240
241 env = "ad_member:local"
242 plantestsuite("samba3.wbinfo_user_info", env,
243               [os.path.join(srcdir(),
244                             "nsswitch/tests/test_wbinfo_user_info.sh"),
245                '$DOMAIN', '$REALM', '$DOMAIN', 'alice', 'alice', 'jane', 'jane.doe', env])
246
247 env = "fl2008r2dc:local"
248 plantestsuite("samba3.wbinfo_user_info", env,
249               [os.path.join(srcdir(),
250                             "nsswitch/tests/test_wbinfo_user_info.sh"),
251                '$TRUST_DOMAIN', '$TRUST_REALM', '$DOMAIN', 'alice', 'alice', 'jane', 'jane.doe', env])
252
253 env = "ad_member"
254 t = "WBCLIENT-MULTI-PING"
255 plantestsuite("samba3.smbtorture_s3.%s" % t, env, [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//foo/bar', '""', '""', smbtorture3, ""])
256 plantestsuite("samba3.substitutions", env, [os.path.join(samba3srcdir, "script/tests/test_substitutions.sh"), "$SERVER", "alice", "Secret007", "$PREFIX"])
257
258 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])
259
260 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])
261
262
263 for env in ["maptoguest", "simpleserver"]:
264     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"])
265
266 env = "maptoguest"
267 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"])
268 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])
269
270 # plain
271 for env in ["nt4_dc"]:
272     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"])
273     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"])
274
275 for env in ["nt4_member", "ad_member"]:
276     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"])
277     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"])
278
279 for env in ["nt4_dc"]:
280     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"])
281     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"])
282
283 for env in ["nt4_member", "ad_member"]:
284     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"])
285     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"])
286
287 for env in ["nt4_dc"]:
288     # encrypted
289     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"])
290     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"])
291
292 for env in ["fileserver"]:
293     plantestsuite("samba3.blackbox.preserve_case (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_preserve_case.sh"), '$SERVER', '$DOMAIN', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3])
294     plantestsuite("samba3.blackbox.dfree_command (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_dfree_command.sh"), '$SERVER', '$DOMAIN', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3])
295     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])
296     plantestsuite("samba3.blackbox.smbcquotas (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbcquota.sh"), '$SERVER', '$DOMAIN', '$USERNAME', '$PASSWORD', '$LOCAL_PATH', smbcquotas])
297     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])
298     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])
299     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'])
300     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'])
301     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])
302     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])
303     plantestsuite("samba3.blackbox.netshareenum (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_shareenum.sh"), '$SERVER', '$USERNAME', '$PASSWORD', rpcclient])
304     plantestsuite("samba3.blackbox.acl_xattr.NT1", env, [os.path.join(samba3srcdir, "script/tests/test_acl_xattr.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3, smbcacls, '-mNT1'])
305     plantestsuite("samba3.blackbox.acl_xattr.SMB3", env, [os.path.join(samba3srcdir, "script/tests/test_acl_xattr.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3, smbcacls, '-mSMB3'])
306     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])
307     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'])
308     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'])
309     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'])
310     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'])
311     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'])
312     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'])
313     plantestsuite("samba3.blackbox.large_acl.NT1", env, [os.path.join(samba3srcdir, "script/tests/test_large_acl.sh"), '$SERVER', '$USERNAME', '$PASSWORD', smbclient3, smbcacls, '-m', 'NT1'])
314     plantestsuite("samba3.blackbox.large_acl.SMB3", env, [os.path.join(samba3srcdir, "script/tests/test_large_acl.sh"), '$SERVER', '$USERNAME', '$PASSWORD', smbclient3, smbcacls, '-m', 'SMB3'])
315     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'])
316
317     #
318     # tar command tests
319     #
320
321     # Test smbclient/tarmode
322     plantestsuite("samba3.blackbox.smbclient_tarmode.NT1", env,
323                   [os.path.join(samba3srcdir, "script/tests/test_smbclient_tarmode.sh"),
324                    '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD',
325                    '$LOCAL_PATH/tarmode', '$PREFIX', smbclient3, configuration, "-mNT1"])
326     plantestsuite("samba3.blackbox.smbclient_tarmode.SMB3", env,
327                   [os.path.join(samba3srcdir, "script/tests/test_smbclient_tarmode.sh"),
328                    '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD',
329                    '$LOCAL_PATH/tarmode', '$PREFIX', smbclient3, configuration, "-mSMB3"])
330
331     # Test suite for new smbclient/tar with libarchive (GSoC 13)
332     plantestsuite("samba3.blackbox.smbclient_tar.NT1", env,
333                   [os.path.join(samba3srcdir, "script/tests/test_smbclient_tarmode.pl"),
334                    '-n', '$SERVER', '-i', '$SERVER_IP', '-s', 'tmp',
335                    '-u', '$USERNAME', '-p', '$PASSWORD', '-l', '$LOCAL_PATH/tarmode',
336                    '-d', '$PREFIX', '-b', smbclient3,
337                    '--subunit', '--', configuration, '-mNT1'])
338     plantestsuite("samba3.blackbox.smbclient_tar.SMB3", env,
339                   [os.path.join(samba3srcdir, "script/tests/test_smbclient_tarmode.pl"),
340                    '-n', '$SERVER', '-i', '$SERVER_IP', '-s', 'tmp',
341                    '-u', '$USERNAME', '-p', '$PASSWORD', '-l', '$LOCAL_PATH/tarmode',
342                    '-d', '$PREFIX', '-b', smbclient3,
343                    '--subunit', '--', configuration, '-mSMB3'])
344
345 plantestsuite("samba3.blackbox.net_usershare", "fileserver:local", [os.path.join(samba3srcdir, "script/tests/test_net_usershare.sh"), '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', smbclient3])
346
347 # TODO encrypted against member, with member creds, and with DC creds
348 plantestsuite("samba3.blackbox.net.misc", "nt4_dc:local",
349               [os.path.join(samba3srcdir, "script/tests/test_net_misc.sh"),
350                scriptdir, "$SMB_CONF_PATH", net, configuration])
351 plantestsuite("samba3.blackbox.net.local.registry", "nt4_dc:local",
352               [os.path.join(samba3srcdir, "script/tests/test_net_registry.sh"),
353                scriptdir, "$SMB_CONF_PATH", net, configuration])
354 plantestsuite("samba3.blackbox.net.registry.check", "nt4_dc:local",
355               [os.path.join(samba3srcdir, "script/tests/test_net_registry_check.sh"),
356                scriptdir, "$SMB_CONF_PATH", net, configuration, dbwrap_tool])
357 plantestsuite("samba3.blackbox.net.rpc.registry", "nt4_dc",
358               [os.path.join(samba3srcdir, "script/tests/test_net_registry.sh"),
359                scriptdir, "$SMB_CONF_PATH", net, configuration, 'rpc'])
360
361 plantestsuite("samba3.blackbox.net.local.registry.roundtrip", "nt4_dc:local",
362               [os.path.join(samba3srcdir, "script/tests/test_net_registry_roundtrip.sh"),
363                scriptdir, "$SMB_CONF_PATH", net, configuration])
364 plantestsuite("samba3.blackbox.net.rpc.registry.roundtrip", "nt4_dc",
365               [os.path.join(samba3srcdir, "script/tests/test_net_registry_roundtrip.sh"),
366                scriptdir, "$SMB_CONF_PATH", net, configuration, 'rpc'])
367
368 plantestsuite("samba3.blackbox.net.local.conf", "nt4_dc:local",
369               [os.path.join(samba3srcdir, "script/tests/test_net_conf.sh"),
370                scriptdir, "$SMB_CONF_PATH", net, configuration])
371 plantestsuite("samba3.blackbox.net.rpc.conf", "nt4_dc",
372               [os.path.join(samba3srcdir, "script/tests/test_net_conf.sh"),
373                scriptdir, "$SMB_CONF_PATH", net, configuration, 'rpc'])
374
375
376 plantestsuite("samba3.blackbox.testparm", "nt4_dc:local",
377               [os.path.join(samba3srcdir, "script/tests/test_testparm_s3.sh"),
378                "$LOCAL_PATH"])
379
380 plantestsuite(
381     "samba3.pthreadpool", "none",
382     [os.path.join(samba3srcdir, "script/tests/test_pthreadpool.sh")])
383
384 if with_pthreadpool and have_ldwrap:
385     plantestsuite("samba3.pthreadpool_cmocka", "none",
386                   [os.path.join(bindir(), "pthreadpooltest_cmocka")])
387
388 if with_pthreadpool:
389     plantestsuite("samba3.libwbclient_threads",
390                   "nt4_member",
391                   [os.path.join(samba3srcdir,
392                                 "script/tests/test_libwbclient_threads.sh"),
393                    "$DOMAIN", "$DC_USERNAME"])
394
395 plantestsuite("samba3.async_req", "nt4_dc",
396               [os.path.join(samba3srcdir, "script/tests/test_async_req.sh")])
397
398 # smbtorture4 tests
399
400 base = ["base.attr", "base.charset", "base.chkpath", "base.createx_access", "base.defer_open", "base.delaywrite", "base.delete",
401         "base.deny1", "base.deny2", "base.deny3", "base.denydos", "base.dir1", "base.dir2",
402         "base.disconnect", "base.fdpass", "base.lock",
403         "base.mangle", "base.negnowait", "base.ntdeny1",
404         "base.ntdeny2", "base.open", "base.openattr", "base.properties", "base.rename", "base.rw1",
405         "base.secleak", "base.tcon", "base.tcondev", "base.trans2", "base.unlink", "base.vuid",
406         "base.xcopy", "base.samba3error"]
407
408 raw = ["raw.acls", "raw.chkpath", "raw.close", "raw.composite", "raw.context", "raw.eas",
409        "raw.ioctl", "raw.lock", "raw.mkdir", "raw.mux", "raw.notify", "raw.open", "raw.oplock",
410        "raw.qfileinfo", "raw.qfsinfo", "raw.read", "raw.rename", "raw.search", "raw.seek",
411        "raw.sfileinfo.base", "raw.sfileinfo.bug", "raw.streams", "raw.unlink", "raw.write",
412        "raw.samba3hide", "raw.samba3badpath", "raw.sfileinfo.rename", "raw.session",
413        "raw.samba3caseinsensitive", "raw.samba3posixtimedlock",
414        "raw.samba3rootdirfid", "raw.sfileinfo.end-of-file",
415        "raw.bench-oplock", "raw.bench-lock", "raw.bench-open", "raw.bench-tcon",
416        "raw.samba3checkfsp", "raw.samba3closeerr", "raw.samba3oplocklogoff", "raw.samba3badnameblob"]
417
418 smb2 = smbtorture4_testsuites("smb2.")
419
420 rpc = ["rpc.authcontext", "rpc.samba3.bind", "rpc.samba3.srvsvc", "rpc.samba3.sharesec",
421        "rpc.samba3.spoolss", "rpc.samba3.wkssvc", "rpc.samba3.winreg",
422        "rpc.samba3.getaliasmembership-0",
423        "rpc.samba3.netlogon", "rpc.samba3.sessionkey", "rpc.samba3.getusername",
424        "rpc.samba3.smb1-pipe-name", "rpc.samba3.smb2-pipe-name",
425        "rpc.samba3.smb-reauth1", "rpc.samba3.smb-reauth2",
426        "rpc.svcctl", "rpc.ntsvcs", "rpc.winreg", "rpc.eventlog",
427        "rpc.spoolss.printserver", "rpc.spoolss.win", "rpc.spoolss.notify", "rpc.spoolss.printer",
428        "rpc.spoolss.driver",
429        "rpc.lsa", "rpc.lsa-getuser", "rpc.lsa.lookupsids", "rpc.lsa.lookupnames",
430        "rpc.lsa.privileges", "rpc.lsa.secrets",
431        "rpc.samr", "rpc.samr.users", "rpc.samr.users.privileges", "rpc.samr.passwords",
432        "rpc.samr.passwords.pwdlastset", "rpc.samr.passwords.lockout", "rpc.samr.passwords.badpwdcount", "rpc.samr.large-dc", "rpc.samr.machine.auth",
433        "rpc.samr.priv", "rpc.samr.passwords.validate",
434        "rpc.netlogon.admin",
435        "rpc.schannel", "rpc.schannel2", "rpc.bench-schannel1", "rpc.schannel_anon_setpw", "rpc.join", "rpc.bind"]
436
437 local = ["local.nss"]
438
439 idmap = ["idmap.rfc2307", "idmap.alloc", "idmap.rid", "idmap.ad"]
440
441 rap = ["rap.basic", "rap.rpc", "rap.printing", "rap.sam"]
442
443 unix = ["unix.info2", "unix.whoami"]
444
445 nbt = ["nbt.dgram"]
446
447 libsmbclient = ["libsmbclient.version", "libsmbclient.initialize",
448                 "libsmbclient.configuration", "libsmbclient.setConfiguration",
449                 "libsmbclient.options", "libsmbclient.opendir",
450                 "libsmbclient.list_shares", "libsmbclient.readdirplus"]
451
452 vfs = [
453     "vfs.fruit",
454     "vfs.acl_xattr",
455     "vfs.fruit_netatalk",
456     "vfs.fruit_file_id",
457     "vfs.fruit_timemachine",
458     "vfs.fruit_conversion",
459 ]
460
461 tests = base + raw + smb2 + rpc + unix + local + rap + nbt + libsmbclient + idmap + vfs
462
463 for t in tests:
464     if t == "base.delaywrite" or t == "base.deny1" or t == "base.deny2":
465         plansmbtorture4testsuite(t, "fileserver", '//$SERVER/tmp -U$USERNAME%$PASSWORD --maximum-runtime=900')
466     elif t == "base.createx_access":
467         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD -k yes --maximum-runtime=900')
468     elif t == "rap.sam":
469         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --option=doscharset=ISO-8859-1')
470         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --option=doscharset=ISO-8859-1')
471     elif t == "winbind.pac":
472         plansmbtorture4testsuite(t, "ad_member:local", '//$SERVER/tmp --realm=$REALM --machine-pass --option=torture:addc=$DC_SERVER', description="machine account")
473     elif t == "unix.whoami":
474         plansmbtorture4testsuite(t, "nt4_member:local", '//$SERVER/tmp --machine-pass', description="machine account")
475         plansmbtorture4testsuite(t, "ad_member:local", '//$SERVER/tmp --machine-pass --option=torture:addc=$DC_SERVER', description="machine account")
476         for env in ["nt4_dc", "nt4_member"]:
477             plansmbtorture4testsuite(t, env, '//$SERVER/tmp -U$DC_USERNAME%$DC_PASSWORD')
478             plansmbtorture4testsuite(t, env, '//$SERVER/tmpguest -U%', description='anonymous connection')
479         for env in ["ad_dc", "ad_member"]:
480             plansmbtorture4testsuite(t, env, '//$SERVER/tmp -U$DC_USERNAME@$REALM%$DC_PASSWORD --option=torture:addc=$DC_SERVER')
481             plansmbtorture4testsuite(t, env, '//$SERVER/tmp -k yes -U$DC_USERNAME@$REALM%$DC_PASSWORD --option=torture:addc=$DC_SERVER', description='kerberos connection')
482             plansmbtorture4testsuite(t, env, '//$SERVER/tmpguest -U% --option=torture:addc=$DC_SERVER', description='anonymous connection')
483             plansmbtorture4testsuite(t, env, '//$SERVER/tmp -k no -U$DC_USERNAME@$REALM%$DC_PASSWORD', description='ntlm user@realm')
484     elif t == "raw.samba3posixtimedlock":
485         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmpguest -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/nt4_dc/share')
486         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER_IP/tmpguest -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/ad_dc/share')
487     elif t == "raw.chkpath":
488         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD')
489         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD')
490     elif t == "raw.samba3hide" or t == "raw.samba3checkfsp" or t == "raw.samba3closeerr":
491         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
492         plansmbtorture4testsuite(t, "simpleserver", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
493         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
494     elif t == "raw.session" or t == "smb2.session":
495         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD', 'plain')
496         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmpenc -U$USERNAME%$PASSWORD', 'enc')
497         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -k no -U$USERNAME%$PASSWORD', 'ntlm')
498         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -k yes -U$USERNAME%$PASSWORD', 'krb5')
499     elif t == "rpc.lsa":
500         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD', 'over ncacn_np ')
501         plansmbtorture4testsuite(t, "nt4_dc", 'ncacn_ip_tcp:$SERVER_IP -U$USERNAME%$PASSWORD', 'over ncacn_ip_tcp ')
502         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD', 'over ncacn_np ')
503         plansmbtorture4testsuite(t, "ad_dc", 'ncacn_ip_tcp:$SERVER_IP -U$USERNAME%$PASSWORD', 'over ncacn_ip_tcp ')
504     elif t == "rpc.samr.passwords.validate":
505         plansmbtorture4testsuite(t, "nt4_dc", 'ncacn_ip_tcp:$SERVER_IP[seal] -U$USERNAME%$PASSWORD', 'over ncacn_ip_tcp ')
506         plansmbtorture4testsuite(t, "ad_dc", 'ncacn_ip_tcp:$SERVER_IP[seal] -U$USERNAME%$PASSWORD', 'over ncacn_ip_tcp ')
507     elif t == "smb2.durable-open" or t == "smb2.durable-v2-open" or t == "smb2.replay" or t == "smb2.durable-v2-delay":
508         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/durable -U$USERNAME%$PASSWORD')
509         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER_IP/durable -U$USERNAME%$PASSWORD')
510     elif t == "base.rw1":
511         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
512         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/valid-users-tmp -U$USERNAME%$PASSWORD')
513         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/write-list-tmp -U$USERNAME%$PASSWORD')
514         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
515     elif t == "idmap.rfc2307":
516         plantestsuite(t, "ad_member_rfc2307",
517                       [os.path.join(samba3srcdir,
518                                     "../nsswitch/tests/test_idmap_rfc2307.sh"),
519                        '$DOMAIN',
520                        'Administrator', '2000000',
521                        'Guest', '2000001',
522                        '"Domain Users"', '2000002',
523                        'DnsAdmins', '2000003',
524                        '2000005', '35',
525                        'ou=idmap,dc=samba,dc=example,dc=com',
526                        '$DC_SERVER', '$DC_USERNAME', '$DC_PASSWORD'])
527     elif t == "idmap.alloc":
528         plantestsuite(t, "ad_member_rfc2307", [os.path.join(samba3srcdir, "../nsswitch/tests/test_idmap_nss.sh"), '$DOMAIN'])
529     elif t == "idmap.rid":
530         plantestsuite(t, "ad_member_idmap_rid", [os.path.join(samba3srcdir, "../nsswitch/tests/test_idmap_rid.sh"), '$DOMAIN', '2000000'])
531     elif t == "idmap.ad":
532         plantestsuite(t, "ad_member_idmap_ad", [os.path.join(samba3srcdir, "../nsswitch/tests/test_idmap_ad.sh"), '$DOMAIN', '$DC_SERVER', '$DC_PASSWORD'])
533     elif t == "raw.acls":
534         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
535         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/nfs4acl_simple_40 -U$USERNAME%$PASSWORD', description='nfs4acl_xattr-simple-40')
536         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/nfs4acl_special_40 -U$USERNAME%$PASSWORD', description='nfs4acl_xattr-special-40')
537         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/nfs4acl_simple_41 -U$USERNAME%$PASSWORD', description='nfs4acl_xattr-simple-41')
538         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/nfs4acl_xdr_40 -U$USERNAME%$PASSWORD', description='nfs4acl_xattr-xdr-40')
539         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/nfs4acl_xdr_41 -U$USERNAME%$PASSWORD', description='nfs4acl_xattr-xdr-41')
540         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD')
541     elif t == "smb2.ioctl":
542         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/fs_specific -U$USERNAME%$PASSWORD', 'fs_specific')
543         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
544         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
545     elif t == "smb2.lock":
546         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/aio -U$USERNAME%$PASSWORD', 'aio')
547         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
548     elif t == "raw.lock" or t == "base.lock":
549         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
550     elif t == "raw.read":
551         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
552         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/aio -U$USERNAME%$PASSWORD', 'aio')
553         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
554     elif t == "raw.search":
555         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
556 # test the dirsort module.
557         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmpsort -U$USERNAME%$PASSWORD')
558         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
559     elif t == "vfs.fruit":
560         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')
561         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')
562         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')
563     elif t == "vfs.fruit_netatalk":
564         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/vfs_fruit_xattr -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/nt4_dc/share')
565     elif t == "vfs.fruit_timemachine":
566         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/vfs_fruit_timemachine -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/nt4_dc/share')
567     elif t == "vfs.fruit_file_id":
568         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/vfs_fruit -U$USERNAME%$PASSWORD')
569     elif t == "vfs.fruit_conversion":
570         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')
571         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')
572     elif t == "rpc.schannel_anon_setpw":
573         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$%', description="anonymous password set")
574         plansmbtorture4testsuite(t, "nt4_dc_schannel", '//$SERVER_IP/tmp -U$%', description="anonymous password set (schannel enforced server-side)")
575         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$%', description="anonymous password set")
576     elif t == "local.nss":
577         for env in ["nt4_dc:local", "ad_member:local", "nt4_member:local", "ad_dc:local"]:
578             plansmbtorture4testsuite(t, env, '//$SERVER/tmp -U$USERNAME%$PASSWORD')
579     elif t == "smb2.change_notify_disabled":
580         plansmbtorture4testsuite(t, "simpleserver", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
581     elif t == "smb2.notify" or t == "raw.notify" or t == "smb2.oplock" or t == "raw.oplock":
582         # These tests are a little slower so don't duplicate them with ad_dc
583         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --signing=required')
584     elif t == "smb2.dosmode":
585         plansmbtorture4testsuite(t, "simpleserver", '//$SERVER/dosmode -U$USERNAME%$PASSWORD')
586     elif t == "smb2.kernel-oplocks":
587         if have_linux_kernel_oplocks:
588             plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER/kernel_oplocks -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/nt4_dc/share')
589     elif t == "smb2.notify-inotify":
590         if have_inotify:
591             plansmbtorture4testsuite(t, "fileserver", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
592     elif t == "vfs.acl_xattr":
593         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
594     elif t == "smb2.compound_find":
595         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER/compound_find -U$USERNAME%$PASSWORD')
596         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
597         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
598     elif t == "rpc.samr.users.privileges":
599         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --option=torture:nt4_dc=true')
600         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
601     elif t == "smb2.compound":
602         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
603         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/aio -U$USERNAME%$PASSWORD', 'aio')
604         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
605     elif t == "rpc.samba3.netlogon" or t == "rpc.samba3.sessionkey":
606         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --option=torture:wksname=samba3rpctest')
607         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD --option=torture:wksname=samba3rpctest')
608     elif t.startswith("libsmbclient"):
609         url = "smb://$USERNAME:$PASSWORD@$SERVER/tmp"
610         if t == "libsmbclient.list_shares":
611             url = "smb://$USERNAME:$PASSWORD@$SERVER"
612
613         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%%$PASSWORD '
614                                     '--option=torture:smburl=' + url +
615                                     ' --option=torture:replace_smbconf=%s' % os.path.join(srcdir(), "testdata/samba3/smb_new.conf"))
616         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%%$PASSWORD '
617                                     '--option=torture:smburl=' + url +
618                                     ' --option=torture:replace_smbconf=%s' % os.path.join(srcdir(), "testdata/samba3/smb_new.conf"))
619     elif t == "smb2.streams":
620         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
621         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
622         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/streams_xattr -U$USERNAME%$PASSWORD', 'streams_xattr')
623     elif t == "smb2.aio_delay":
624         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/aio_delay_inject -U$USERNAME%$PASSWORD')
625     elif t == "smb2.delete-on-close-perms":
626         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
627         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/delete_readonly -U$USERNAME%$PASSWORD --option=torture:delete_readonly=true')
628         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
629     else:
630         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
631         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
632
633
634 test = 'rpc.lsa.lookupsids'
635 auth_options = ["", "ntlm", "spnego", "spnego,ntlm", "spnego,smb1", "spnego,smb2"]
636 signseal_options = ["", ",connect", ",packet", ",sign", ",seal"]
637 endianness_options = ["", ",bigendian"]
638 for s in signseal_options:
639     for e in endianness_options:
640         for a in auth_options:
641             binding_string = "ncacn_np:$SERVER[%s%s%s]" % (a, s, e)
642             options = binding_string + " -U$USERNAME%$PASSWORD"
643             plansmbtorture4testsuite(test, "nt4_dc", options, 'over ncacn_np with [%s%s%s] ' % (a, s, e))
644             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"),
645                                                                                                                  "none", options, configuration])
646
647     # We should try more combinations in future, but this is all
648     # the pre-calculated credentials cache supports at the moment
649     #
650     # As the ktest env requires SMB3_00 we need to use "smb2" until
651     # dcerpc client code in smbtorture support autonegotiation
652     # of any smb dialect.
653     e = ""
654     a = "smb2"
655     binding_string = "ncacn_np:$SERVER[%s%s%s]" % (a, s, e)
656     options = binding_string + " -k yes --krb5-ccache=$PREFIX/ktest/krb5_ccache-2"
657     plansmbtorture4testsuite(test, "ktest", options, 'krb5 with old ccache ncacn_np with [%s%s%s] ' % (a, s, e))
658
659     options = binding_string + " -k yes --krb5-ccache=$PREFIX/ktest/krb5_ccache-3"
660     plansmbtorture4testsuite(test, "ktest", options, 'krb5 ncacn_np with [%s%s%s] ' % (a, s, e))
661
662     auth_options2 = ["krb5", "spnego,krb5"]
663     for a in auth_options2:
664         binding_string = "ncacn_np:$SERVER[%s%s%s]" % (a, s, e)
665
666         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"),
667                                                                                                             "$PREFIX/ktest/krb5_ccache-3", binding_string, "-k", configuration])
668
669 plantestsuite("samba3.blackbox.rpcclient_samlogon", "ad_member:local", [os.path.join(samba3srcdir, "script/tests/test_rpcclient_samlogon.sh"),
670                                                                         "$DC_USERNAME", "$DC_PASSWORD", "ncacn_np:$DC_SERVER", configuration])
671 plantestsuite("samba3.blackbox.sharesec", "simpleserver:local",
672               [os.path.join(samba3srcdir, "script/tests/test_sharesec.sh"),
673                configuration, os.path.join(bindir(), "sharesec"), "tmp"])
674
675 plantestsuite("samba3.blackbox.net_tdb", "simpleserver:local",
676               [os.path.join(samba3srcdir, "script/tests/test_net_tdb.sh"),
677                smbclient3, '$SERVER', 'tmp', '$USERNAME', '$PASSWORD',
678                configuration, '$LOCAL_PATH', '$LOCK_DIR'])
679
680 plantestsuite("samba3.blackbox.smbd_error", "simpleserver:local",
681               [os.path.join(samba3srcdir, "script/tests/test_smbd_error.sh")])
682
683 plantestsuite("samba3.blackbox.durable_v2_delay", "simpleserver:local",
684               [os.path.join(samba3srcdir, "script/tests/test_durable_handle_reconnect.sh")])
685
686 plantestsuite("samba3.blackbox.net_cache_samlogon", "ad_member:local",
687               [os.path.join(samba3srcdir, "script/tests/test_net_cache_samlogon.sh"),
688                '$SERVER', 'tmp', '$DC_USERNAME', '$DC_PASSWORD'])
689
690 plantestsuite("samba3.blackbox.net_dom_join_fail_dc", "nt4_dc",
691               [os.path.join(samba3srcdir, "script/tests/test_net_dom_join_fail_dc.sh"),
692                "$USERNAME", "$PASSWORD", "$SERVER", "$PREFIX/net_dom_join_fail_dc",
693                configuration])
694 plantestsuite("samba3.blackbox.net_rpc_join", "nt4_dc",
695               [os.path.join(samba3srcdir, "script/tests/test_net_rpc_join.sh"),
696                "$USERNAME", "$PASSWORD", "$SERVER", "$PREFIX/net_rpc_join",
697                configuration])
698 plantestsuite("samba3.blackbox.net_rpc_oldjoin", "nt4_dc:local",
699               [os.path.join(samba3srcdir, "script/tests/test_net_rpc_oldjoin.sh"),
700                "$SERVER", "$PREFIX/net_rpc_oldjoin",
701                "$SMB_CONF_PATH"])
702
703 plantestsuite("samba3.blackbox.rpcclient_srvsvc", "simpleserver",
704               [os.path.join(samba3srcdir, "script/tests/test_rpcclientsrvsvc.sh"),
705                "$USERNAME", "$PASSWORD", "$SERVER",
706                os.path.join(bindir(), "rpcclient"), "tmp"])
707
708 plantestsuite("samba3.blackbox.rpcclient.pw-nt-hash", "simpleserver",
709               [os.path.join(samba3srcdir, "script/tests/test_rpcclient_pw_nt_hash.sh"),
710                "$USERNAME", "$PASSWORD", "$SERVER",
711                os.path.join(bindir(), "rpcclient")])
712
713 plantestsuite("samba3.blackbox.smbclient.encryption_off", "simpleserver",
714               [os.path.join(samba3srcdir, "script/tests/test_smbclient_encryption_off.sh"),
715                "$USERNAME", "$PASSWORD", "$SERVER",
716                smbclient3])
717
718 plantestsuite("samba3.blackbox.rpcclient_netsessenum", "ad_member",
719               [os.path.join(samba3srcdir,
720                             "script/tests/test_rpcclient_netsessenum.sh"),
721                "$DOMAIN", "$DC_USERNAME", "$DC_PASSWORD", "$SERVER",
722                os.path.join(bindir(), "rpcclient"), smbtorture3, "tmp"])
723
724 # The ktest environment uses:
725 # server min protocol = SMB3_00
726 # client max protocol = SMB3
727 options_list = ["", "-e"]
728 for options in options_list:
729     plantestsuite("samba3.blackbox.smbclient_krb5 old ccache %s" % options, "ktest:local",
730                   [os.path.join(samba3srcdir, "script/tests/test_smbclient_krb5.sh"),
731                    "$PREFIX/ktest/krb5_ccache-2",
732                    smbclient3, "$SERVER", options, configuration])
733
734     plantestsuite("samba3.blackbox.smbclient_krb5 new ccache %s" % options, "ktest:local",
735                   [os.path.join(samba3srcdir, "script/tests/test_smbclient_krb5.sh"),
736                    "$PREFIX/ktest/krb5_ccache-3",
737                    smbclient3, "$SERVER", options, configuration])
738
739     plantestsuite("samba3.blackbox.smbclient_large_file %s krb5" % options, "ktest:local",
740                   [os.path.join(samba3srcdir, "script/tests/test_smbclient_large_file.sh"),
741                    "$PREFIX/ktest/krb5_ccache-3",
742                    smbclient3, "$SERVER", "$PREFIX", options, "-k " + configuration])
743
744 options_list = ["-mNT1", "-mNT1 -e", "-mSMB3", "-mSMB3 -e"]
745 for options in options_list:
746     plantestsuite("samba3.blackbox.smbclient_large_file %s NTLM" % options, "nt4_dc:local",
747                   [os.path.join(samba3srcdir, "script/tests/test_smbclient_large_file.sh"),
748                    "none",
749                    smbclient3, "$SERVER", "$PREFIX", options, "-U$USERNAME%$PASSWORD " + configuration])
750
751 for alias in ["foo", "bar"]:
752     plantestsuite("samba3.blackbox.smbclient_netbios_aliases [%s]" % alias, "ad_member:local",
753                   [os.path.join(samba3srcdir, "script/tests/test_smbclient_netbios_aliases.sh"),
754                    smbclient3, alias, "$DC_USERNAME", "$DC_PASSWORD", "$PREFIX", options, configuration])
755
756 for e in endianness_options:
757     for a in auth_options:
758         for s in signseal_options:
759             binding_string = "ncacn_ip_tcp:$SERVER_IP[%s%s%s]" % (a, s, e)
760             options = binding_string + " -U$USERNAME%$PASSWORD"
761             plansmbtorture4testsuite(test, "nt4_dc", options, 'over ncacn_ip_tcp with [%s%s%s] ' % (a, s, e))
762
763 plansmbtorture4testsuite('rpc.epmapper', 'nt4_dc:local', 'ncalrpc: -U$USERNAME%$PASSWORD', 'over ncalrpc')
764 plansmbtorture4testsuite('rpc.fsrvp', 'nt4_dc:local', 'ncacn_np:$SERVER_IP[/pipe/FssagentRpc] -U$USERNAME%$PASSWORD', 'over ncacn_np')