ctdbd_conn: Add deregister_from_ctdbd()
[Samba.git] / source3 / selftest / tests.py
blob973384f8c53b8b65423a18525a441e6613da1e68
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.
5 # The output of this script is parsed by selftest.pl, which then decides
6 # which of the tests to actually run. It will, for example, skip all tests
7 # listed in selftest/skip or only run a subset during "make quicktest".
9 # The idea is that this script outputs all of the tests of Samba 3, not
10 # just those that are known to pass, and list those that should be skipped
11 # or are known to fail in selftest/skip or selftest/samba3-knownfail. This makes it
12 # very easy to see what functionality is still missing in Samba 3 and makes
13 # it possible to run the testsuite against other servers, such as Samba 4 or
14 # Windows that have a different set of features.
16 # The syntax for a testsuite is "-- TEST --" on a single line, followed
17 # by the name of the test, the environment it needs and the command to run, all
18 # three separated by newlines. All other lines in the output are considered
19 # comments.
21 import os
22 import sys
23 import re
24 import platform
25 sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), "../../selftest")))
26 import selftesthelpers
27 from selftesthelpers import bindir, srcdir, scriptdir, binpath
28 from selftesthelpers import plantestsuite, samba3srcdir
29 from selftesthelpers import planpythontestsuite
30 from selftesthelpers import smbtorture3, configuration, smbclient3, smbtorture4
31 from selftesthelpers import net, wbinfo, dbwrap_tool, rpcclient, python
32 from selftesthelpers import smbget, smbcacls, smbcquotas, ntlm_auth3
33 from selftesthelpers import valgrindify, smbtorture4_testsuites
34 from selftesthelpers import smbtorture4_options
35 from selftesthelpers import smbcontrol
36 from selftesthelpers import smbstatus
37 from selftesthelpers import timelimit
38 smbtorture4_options.extend([
39 '--option=torture:sharedelay=100000',
40 '--option=torture:writetimeupdatedelay=500000',
44 def plansmbtorture4testsuite(name, env, options, description='', environ=None):
45 if description == '':
46 modname = "samba3.%s" % (name, )
47 else:
48 modname = "samba3.%s %s" % (name, description)
50 selftesthelpers.plansmbtorture4testsuite(
51 name, env, options, target='samba3', modname=modname, environ=environ)
53 def compare_versions(version1, version2):
54 for i in range(max(len(version1),len(version2))):
55 v1 = version1[i] if i < len(version1) else 0
56 v2 = version2[i] if i < len(version2) else 0
57 if v1 > v2:
58 return 1
59 elif v1 <v2:
60 return -1
61 return 0
63 # find config.h
64 try:
65 config_h = os.environ["CONFIG_H"]
66 except KeyError:
67 samba4bindir = bindir()
68 config_h = os.path.join(samba4bindir, "default/include/config.h")
70 bbdir = os.path.join(srcdir(), "testprogs/blackbox")
72 # check available features
73 config_hash = dict()
74 f = open(config_h, 'r')
75 try:
76 lines = f.readlines()
77 config_hash = dict((x[0], ' '.join(x[1:]))
78 for x in map(lambda line: line.strip().split(' ')[1:],
79 filter(lambda line: (line[0:7] == '#define') and (len(line.split(' ')) > 2), lines)))
80 finally:
81 f.close()
83 linux_kernel_version = None
84 if platform.system() == 'Linux':
85 m = re.search(r'(\d+).(\d+).(\d+)', platform.release())
86 if m:
87 linux_kernel_version = [int(m.group(1)), int(m.group(2)), int(m.group(3))]
89 have_linux_kernel_oplocks = False
90 if "HAVE_KERNEL_OPLOCKS_LINUX" in config_hash:
91 if compare_versions(linux_kernel_version, [5,3,1]) >= 0:
92 have_linux_kernel_oplocks = True
94 have_inotify = ("HAVE_INOTIFY" in config_hash)
95 have_ldwrap = ("HAVE_LDWRAP" in config_hash)
96 with_pthreadpool = ("WITH_PTHREADPOOL" in config_hash)
98 have_smb3_unix_extensions = ("HAVE_SMB3_UNIX_EXTENSIONS" in config_hash)
100 have_cluster_support = "CLUSTER_SUPPORT" in config_hash
102 def is_module_enabled(module):
103 if module in config_hash["STRING_SHARED_MODULES"]:
104 return True
105 if module in config_hash["STRING_STATIC_MODULES"]:
106 return True
107 return False
109 plantestsuite("samba3.blackbox.success", "nt4_dc:local", [os.path.join(samba3srcdir, "script/tests/test_success.sh")])
110 plantestsuite("samba3.blackbox.failure", "nt4_dc:local", [os.path.join(samba3srcdir, "script/tests/test_failure.sh")])
112 plantestsuite("samba3.local_s3", "nt4_dc:local", [os.path.join(samba3srcdir, "script/tests/test_local_s3.sh")])
114 plantestsuite("samba3.blackbox.registry.upgrade", "nt4_dc:local", [os.path.join(samba3srcdir, "script/tests/test_registry_upgrade.sh"), net, dbwrap_tool])
116 fileserver_tests = [
117 "FDPASS", "LOCK1", "LOCK2", "LOCK3", "LOCK4", "LOCK5", "LOCK6", "LOCK7",
118 "LOCK9A", "LOCK9B",
119 "LOCK10",
120 "LOCK11",
121 "LOCK12",
122 "LOCK13",
123 "UNLINK", "BROWSE", "ATTR", "TRANS2", "TORTURE",
124 "OPLOCK1", "OPLOCK2", "OPLOCK4", "STREAMERROR",
125 "DIR", "DIR1", "DIR-CREATETIME", "TCON", "TCONDEV", "RW1", "RW2", "RW3", "LARGE_READX", "RW-SIGNING",
126 "OPEN", "XCOPY", "RENAME", "DELETE", "DELETE-LN", "PROPERTIES", "W2K",
127 "TCON2", "IOCTL", "CHKPATH", "FDSESS", "CHAIN1", "CHAIN2", "OWNER-RIGHTS",
128 "CHAIN3", "PIDHIGH", "CLI_SPLICE",
129 "UID-REGRESSION-TEST", "SHORTNAME-TEST",
130 "CASE-INSENSITIVE-CREATE", "SMB2-BASIC", "NTTRANS-FSCTL", "SMB2-NEGPROT",
131 "SMB2-SESSION-REAUTH", "SMB2-SESSION-RECONNECT", "SMB2-FTRUNCATE",
132 "SMB2-ANONYMOUS", "SMB2-DIR-FSYNC",
133 "SMB2-PATH-SLASH",
134 "SMB2-QUOTA1",
135 "CLEANUP1",
136 "CLEANUP2",
137 "CLEANUP4",
138 "DELETE-STREAM",
139 "BAD-NBT-SESSION",
140 "SMB1-WILD-MANGLE-UNLINK",
141 "SMB1-WILD-MANGLE-RENAME"]
143 for t in fileserver_tests:
144 fileserver_env = "fileserver_smb1"
145 if "SMB2" in t:
146 fileserver_env = "fileserver"
147 plantestsuite("samba3.smbtorture_s3.plain.%s" % t, fileserver_env, [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/tmp', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
148 plantestsuite("samba3.smbtorture_s3.crypt_client.%s" % t, "nt4_dc_smb1", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/tmp', '$USERNAME', '$PASSWORD', smbtorture3, "-e", "-l $LOCAL_PATH"])
149 if t == "TORTURE":
150 # this is a negative test to verify that the server rejects
151 # access without encryption
152 plantestsuite("samba3.smbtorture_s3.crypt_server.%s" % t, "nt4_dc_smb1", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/tmpenc', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
153 if t == "CLI_SPLICE":
154 # We must test this against the SMB1 fallback.
155 plantestsuite("samba3.smbtorture_s3.plain.%s" % t, "fileserver_smb1", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/tmp', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH", "-mNT1"])
156 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"])
158 t = "TLDAP"
159 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"])
161 if have_linux_kernel_oplocks:
162 t = "OPLOCK5"
163 plantestsuite("samba3.smbtorture_s3.plain.%s" % t,
164 "fileserver_smb1",
165 [os.path.join(samba3srcdir,
166 "script/tests/test_smbtorture_s3.sh"),
168 '//$SERVER/tmp',
169 '$USERNAME',
170 '$PASSWORD',
171 smbtorture3,
173 "-l $LOCAL_PATH",
174 "-mNT1"])
176 # RENAME-ACCESS needs to run against a special share - acl_xattr_ign_sysacl_windows
178 plantestsuite("samba3.smbtorture_s3.plain.%s" % "RENAME-ACCESS", "nt4_dc_smb1", [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"])
179 plantestsuite("samba3.smbtorture_s3.crypt_client.%s" % "RENAME-ACCESS", "nt4_dc_smb1", [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"])
180 # non-crypt only
182 tests = ["OPLOCK-CANCEL"]
183 for t in tests:
184 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"])
186 env = "nt4_dc_smb1"
187 tests = ["MANGLE-ILLEGAL"]
188 for t in tests:
189 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"])
191 tests = ["RW1", "RW2", "RW3", "SMB2-BASIC"]
192 for t in tests:
193 if t == "SMB2-BASIC":
194 env = "simpleserver"
195 else:
196 env = "fileserver_smb1"
198 plantestsuite("samba3.smbtorture_s3.vfs_aio_pthread(%s).%s" % (env, t), env, [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/vfs_aio_pthread', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
199 plantestsuite("samba3.smbtorture_s3.vfs_aio_fork(%s).%s" % (env, t), env, [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/vfs_aio_fork', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
201 plantestsuite("samba3.smbtorture_s3.hidenewfiles",
202 "simpleserver",
203 [os.path.join(samba3srcdir,
204 "script/tests/test_smbtorture_s3.sh"),
205 'hide-new-files-timeout',
206 '//$SERVER_IP/hidenewfiles',
207 '$USERNAME',
208 '$PASSWORD',
209 smbtorture3,
211 "-l $LOCAL_PATH"])
212 plantestsuite("samba3.smbtorture_s3.hidenewfiles_showdirs",
213 "simpleserver",
214 [os.path.join(samba3srcdir,
215 "script/tests/test_smbtorture_s3.sh"),
216 'hide-new-files-timeout-showdirs',
217 '//$SERVER_IP/hidenewfiles',
218 '$USERNAME',
219 '$PASSWORD',
220 smbtorture3,
222 "-l $LOCAL_PATH"])
224 plantestsuite("samba3.smbtorture_s3.smb1.SMB1-TRUNCATED-SESSSETUP",
225 "fileserver_smb1",
226 [os.path.join(samba3srcdir,
227 "script/tests/test_smbtorture_s3.sh"),
228 'SMB1-TRUNCATED-SESSSETUP',
229 '//$SERVER_IP/tmp',
230 '$USERNAME',
231 '$PASSWORD',
232 smbtorture3,
233 "-mNT1"])
235 plantestsuite("samba3.smbtorture_s3.smb1.SMB1-NEGOTIATE-EXIT",
236 "fileserver_smb1",
237 [os.path.join(samba3srcdir,
238 "script/tests/test_smbtorture_s3.sh"),
239 'SMB1-NEGOTIATE-EXIT',
240 '//$SERVER_IP/tmp',
241 '$USERNAME',
242 '$PASSWORD',
243 smbtorture3,
244 "-mNT1"])
246 plantestsuite("samba3.smbtorture_s3.smb1.SMB1-NEGOTIATE-TCON",
247 "fileserver_smb1",
248 [os.path.join(samba3srcdir,
249 "script/tests/test_smbtorture_s3.sh"),
250 'SMB1-NEGOTIATE-TCON',
251 '//$SERVER_IP/tmp',
252 '$USERNAME',
253 '$PASSWORD',
254 smbtorture3,
255 "-mNT1"])
258 # MSDFS attribute tests.
260 plantestsuite("samba3.smbtorture_s3.smb2.MSDFS-ATTRIBUTE",
261 "fileserver",
262 [os.path.join(samba3srcdir,
263 "script/tests/test_smbtorture_s3.sh"),
264 'MSDFS-ATTRIBUTE',
265 '//$SERVER_IP/msdfs-share',
266 '$USERNAME',
267 '$PASSWORD',
268 smbtorture3,
269 "-mSMB2",
270 "-f msdfs-src1"])
272 plantestsuite("samba3.smbtorture_s3.smb1.MSDFS-ATTRIBUTE",
273 "fileserver_smb1",
274 [os.path.join(samba3srcdir,
275 "script/tests/test_smbtorture_s3.sh"),
276 'MSDFS-ATTRIBUTE',
277 '//$SERVER_IP/msdfs-share',
278 '$USERNAME',
279 '$PASSWORD',
280 smbtorture3,
281 "-mNT1",
282 "-f msdfs-src1"])
285 # SMB2-DFS-PATHS needs to run against a special share msdfs-pathname-share
286 # This is an empty DFS share with no links, used merely to test
287 # incoming DFS pathnames and how they map to local paths.
289 plantestsuite("samba3.smbtorture_s3.smb2.SMB2-DFS-PATHS",
290 "fileserver",
291 [os.path.join(samba3srcdir,
292 "script/tests/test_smbtorture_s3.sh"),
293 'SMB2-DFS-PATHS',
294 '//$SERVER_IP/msdfs-pathname-share',
295 '$USERNAME',
296 '$PASSWORD',
297 smbtorture3,
298 "-mSMB2"])
300 # BUG: https://bugzilla.samba.org/show_bug.cgi?id=15277
301 # MacOSX clients send a leading '\\' character for DFS paths.
303 plantestsuite("samba3.smbtorture_s3.smb2.SMB2-DFS-FILENAME-LEADING-BACKSLASH",
304 "fileserver",
305 [os.path.join(samba3srcdir,
306 "script/tests/test_smbtorture_s3.sh"),
307 'SMB2-DFS-FILENAME-LEADING-BACKSLASH',
308 '//$SERVER_IP/msdfs-pathname-share',
309 '$USERNAME',
310 '$PASSWORD',
311 smbtorture3,
312 "-mSMB2"])
314 # BUG: https://bugzilla.samba.org/show_bug.cgi?id=15422
315 # Prevent bad pipenames.
317 plantestsuite("samba3.smbtorture_s3.smb2.SMB2-INVALID-PIPENAME",
318 "fileserver",
319 [os.path.join(samba3srcdir,
320 "script/tests/test_smbtorture_s3.sh"),
321 'SMB2-INVALID-PIPENAME',
322 '//$SERVER_IP/tmp',
323 '$USERNAME',
324 '$PASSWORD',
325 smbtorture3,
326 "-mSMB2"])
329 # SMB2-NON-DFS-SHARE needs to run against a special share non-msdfs-pathname-share
330 # This is an empty non-DFS share with no links, used merely to test
331 # incoming DFS pathnames and how they map to local paths. We are testing
332 # what happens if we set the FLAGS2_DFS_PATHNAMES and send DFS paths
333 # on a non-DFS share.
335 plantestsuite("samba3.smbtorture_s3.smb2.SMB2-NON-DFS-SHARE",
336 "fileserver",
337 [os.path.join(samba3srcdir,
338 "script/tests/test_smbtorture_s3.sh"),
339 'SMB2-NON-DFS-SHARE',
340 '//$SERVER_IP/non-msdfs-pathname-share',
341 '$USERNAME',
342 '$PASSWORD',
343 smbtorture3,
344 "-mSMB2"])
347 # SMB2-DFS-SHARE-NON-DFS-PATH needs to run against a special share msdfs-pathname-share
348 # This is an empty DFS share with no links, used merely to test
349 # incoming non-DFS pathnames and how they map to local paths.
351 plantestsuite("samba3.smbtorture_s3.smb2.SMB2-DFS-SHARE-NON-DFS-PATH",
352 "fileserver",
353 [os.path.join(samba3srcdir,
354 "script/tests/test_smbtorture_s3.sh"),
355 'SMB2-DFS-SHARE-NON-DFS-PATH',
356 '//$SERVER_IP/msdfs-pathname-share',
357 '$USERNAME',
358 '$PASSWORD',
359 smbtorture3,
360 "-mSMB2"])
363 # SMB1-DFS-PATHS needs to run against a special share msdfs-pathname-share
364 # This is an empty DFS share with no links, used merely to test
365 # incoming DFS pathnames and how they map to local paths.
367 plantestsuite("samba3.smbtorture_s3.smb1.SMB1-DFS-PATHS",
368 "fileserver_smb1",
369 [os.path.join(samba3srcdir,
370 "script/tests/test_smbtorture_s3.sh"),
371 'SMB1-DFS-PATHS',
372 '//$SERVER_IP/msdfs-pathname-share',
373 '$USERNAME',
374 '$PASSWORD',
375 smbtorture3,
376 "-mNT1"])
379 # SMB1-DFS-SEARCH-PATHS needs to run against a special share msdfs-pathname-share
380 # This is an empty DFS share with no links, used merely to test
381 # incoming DFS pathnames and how they map to local paths.
383 plantestsuite("samba3.smbtorture_s3.smb1.SMB1-DFS-SEARCH-PATHS",
384 "fileserver_smb1",
385 [os.path.join(samba3srcdir,
386 "script/tests/test_smbtorture_s3.sh"),
387 'SMB1-DFS-SEARCH-PATHS',
388 '//$SERVER_IP/msdfs-pathname-share',
389 '$USERNAME',
390 '$PASSWORD',
391 smbtorture3,
392 "-mNT1"])
395 # SMB1-DFS-OPERATIONS needs to run against a special share msdfs-pathname-share
396 # This is an empty DFS share with no links, used merely to test
397 # incoming DFS pathnames and how they map to local paths.
399 plantestsuite("samba3.smbtorture_s3.smb1.SMB1-DFS-OPERATIONS",
400 "fileserver_smb1",
401 [os.path.join(samba3srcdir,
402 "script/tests/test_smbtorture_s3.sh"),
403 'SMB1-DFS-OPERATIONS',
404 '//$SERVER_IP/msdfs-pathname-share',
405 '$USERNAME',
406 '$PASSWORD',
407 smbtorture3,
408 "-mNT1"])
410 # SMB1-DFS-BADPATH needs to run against a special share msdfs-pathname-share
411 # BUG: https://bugzilla.samba.org/show_bug.cgi?id=15419
413 plantestsuite("samba3.smbtorture_s3.smb1.SMB1-DFS-BADPATH",
414 "fileserver_smb1",
415 [os.path.join(samba3srcdir,
416 "script/tests/test_smbtorture_s3.sh"),
417 'SMB1-DFS-BADPATH',
418 '//$SERVER_IP/msdfs-pathname-share',
419 '$USERNAME',
420 '$PASSWORD',
421 smbtorture3,
422 "-mNT1"])
425 # SMB2-STREAM-ACL needs to run against a special share - vfs_wo_fruit
427 plantestsuite("samba3.smbtorture_s3.plain.%s" % "SMB2-STREAM-ACL",
428 "fileserver",
429 [os.path.join(samba3srcdir,
430 "script/tests/test_smbtorture_s3.sh"),
431 'SMB2-STREAM-ACL',
432 '//$SERVER_IP/vfs_wo_fruit',
433 '$USERNAME',
434 '$PASSWORD',
435 smbtorture3,
437 "-l $LOCAL_PATH"])
440 # SMB2-LIST-DIR-ASYNC needs to run against a special share vfs_aio_pthread_async_dosmode_default1
442 plantestsuite("samba3.smbtorture_s3.plain.%s" % "SMB2-LIST-DIR-ASYNC",
443 "simpleserver",
444 [os.path.join(samba3srcdir,
445 "script/tests/test_smbtorture_s3.sh"),
446 'SMB2-LIST-DIR-ASYNC',
447 '//$SERVER_IP/vfs_aio_pthread_async_dosmode_default1',
448 '$USERNAME',
449 '$PASSWORD',
450 smbtorture3,
452 "-l $LOCAL_PATH"])
454 # SMB2-DEL-ON-CLOSE-NONEMPTY needs to run against a special fileserver share veto_files_delete
456 plantestsuite("samba3.smbtorture_s3.plain.%s" % "SMB2-DEL-ON-CLOSE-NONEMPTY",
457 "fileserver",
458 [os.path.join(samba3srcdir,
459 "script/tests/test_smbtorture_s3.sh"),
460 'SMB2-DEL-ON-CLOSE-NONEMPTY',
461 '//$SERVER_IP/veto_files_delete',
462 '$USERNAME',
463 '$PASSWORD',
464 smbtorture3,
466 "-l $LOCAL_PATH"])
469 # SMB2-DEL-ON-CLOSE-NONWRITE-DELETE-YES needs to run against a special fileserver share delete_yes_unwrite
471 plantestsuite("samba3.smbtorture_s3.plain.%s" % "SMB2-DEL-ON-CLOSE-NONWRITE-DELETE-YES",
472 "fileserver",
473 [os.path.join(samba3srcdir,
474 "script/tests/test_smbtorture_s3.sh"),
475 'SMB2-DEL-ON-CLOSE-NONWRITE-DELETE-YES',
476 '//$SERVER_IP/delete_yes_unwrite',
477 '$USERNAME',
478 '$PASSWORD',
479 smbtorture3,
481 "-l $LOCAL_PATH"])
484 # SMB2-DEL-ON-CLOSE-NONWRITE-DELETE-NO needs to run against a special fileserver share delete_no_unwrite
486 plantestsuite("samba3.smbtorture_s3.plain.%s" % "SMB2-DEL-ON-CLOSE-NONWRITE-DELETE-NO",
487 "fileserver",
488 [os.path.join(samba3srcdir,
489 "script/tests/test_smbtorture_s3.sh"),
490 'SMB2-DEL-ON-CLOSE-NONWRITE-DELETE-NO',
491 '//$SERVER_IP/delete_no_unwrite',
492 '$USERNAME',
493 '$PASSWORD',
494 smbtorture3,
496 "-l $LOCAL_PATH"])
499 # Test doing an async read + disconnect on a pipe doesn't crash the server.
500 # BUG: https://bugzilla.samba.org/show_bug.cgi?id=15423
502 plantestsuite("samba3.smbtorture_s3.plain.%s" % "SMB2-PIPE-READ-ASYNC-DISCONNECT",
503 "fileserver",
504 [os.path.join(samba3srcdir,
505 "script/tests/test_smbtorture_nocrash_s3.sh"),
506 'SMB2-PIPE-READ-ASYNC-DISCONNECT',
507 '//$SERVER_IP/tmp',
508 '$USERNAME',
509 '$PASSWORD',
510 smbtorture3,
512 "-l $LOCAL_PATH"])
514 shares = [
515 "vfs_aio_pthread_async_dosmode_default1",
516 "vfs_aio_pthread_async_dosmode_default2"
518 for s in shares:
519 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"])
520 t = "smb2.compound_find"
521 plansmbtorture4testsuite(t, "simpleserver", "//%s/%s %s" % ('$SERVER_IP', s, ' -U$USERNAME%$PASSWORD'), description=s)
523 posix_tests = ["POSIX", "POSIX-APPEND", "POSIX-SYMLINK-ACL", "POSIX-SYMLINK-EA", "POSIX-OFD-LOCK",
524 "POSIX-STREAM-DELETE", "WINDOWS-BAD-SYMLINK", "POSIX-MKDIR",
525 "POSIX-BLOCKING-LOCK",
526 "POSIX-ACL-OPLOCK",
527 "POSIX-ACL-SHAREROOT",
528 "POSIX-LS-WILDCARD",
529 "POSIX-LS-SINGLE",
530 "POSIX-READLINK",
531 "POSIX-STAT",
532 "POSIX-SYMLINK-PARENT",
533 "POSIX-SYMLINK-CHMOD",
534 "POSIX-DIR-DEFAULT-ACL",
535 "POSIX-SYMLINK-RENAME",
536 "POSIX-SYMLINK-GETPATHINFO",
537 "POSIX-SYMLINK-SETPATHINFO",
540 for t in posix_tests:
541 plantestsuite("samba3.smbtorture_s3.plain.%s" % t, "nt4_dc_smb1", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/posix_share', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH"])
542 plantestsuite("samba3.smbtorture_s3.crypt.%s" % t, "nt4_dc_smb1", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/posix_share', '$USERNAME', '$PASSWORD', smbtorture3, "-e", "-l $LOCAL_PATH"])
544 local_tests = [
545 "LOCAL-SUBSTITUTE",
546 "LOCAL-GENCACHE",
547 "LOCAL-BASE64",
548 "LOCAL-RBTREE",
549 "LOCAL-MEMCACHE",
550 "LOCAL-STREAM-NAME",
551 "LOCAL-STR-MATCH-MSWILD",
552 "LOCAL-STR-MATCH-REGEX-SUB1",
553 "LOCAL-string_to_sid",
554 "LOCAL-sid_to_string",
555 "LOCAL-binary_to_sid",
556 "LOCAL-DBTRANS",
557 "LOCAL-TEVENT-POLL",
558 "LOCAL-CONVERT-STRING",
559 "LOCAL-CONV-AUTH-INFO",
560 "LOCAL-IDMAP-TDB-COMMON",
561 "LOCAL-MESSAGING-READ1",
562 "LOCAL-MESSAGING-READ2",
563 "LOCAL-MESSAGING-READ3",
564 "LOCAL-MESSAGING-READ4",
565 "LOCAL-MESSAGING-FDPASS1",
566 "LOCAL-MESSAGING-FDPASS2",
567 "LOCAL-MESSAGING-FDPASS2a",
568 "LOCAL-MESSAGING-FDPASS2b",
569 "LOCAL-MESSAGING-SEND-ALL",
570 "LOCAL-PTHREADPOOL-TEVENT",
571 "LOCAL-CANONICALIZE-PATH",
572 "LOCAL-DBWRAP-WATCH1",
573 "LOCAL-DBWRAP-WATCH2",
574 "LOCAL-DBWRAP-WATCH3",
575 "LOCAL-DBWRAP-WATCH4",
576 "LOCAL-DBWRAP-DO-LOCKED1",
577 "LOCAL-G-LOCK1",
578 "LOCAL-G-LOCK2",
579 "LOCAL-G-LOCK3",
580 "LOCAL-G-LOCK4",
581 "LOCAL-G-LOCK4A",
582 "LOCAL-G-LOCK5",
583 "LOCAL-G-LOCK6",
584 "LOCAL-G-LOCK7",
585 "LOCAL-G-LOCK8",
586 "LOCAL-NAMEMAP-CACHE1",
587 "LOCAL-IDMAP-CACHE1",
588 "LOCAL-TDB-VALIDATE",
589 "LOCAL-hex_encode_buf",
590 "LOCAL-remove_duplicate_addrs2"]
592 for t in local_tests:
593 plantestsuite("samba3.smbtorture_s3.%s" % t, "none", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//foo/bar', '""', '""', smbtorture3, ""])
595 plantestsuite("samba.vfstest.stream_depot", "nt4_dc:local", [os.path.join(samba3srcdir, "script/tests/stream-depot/run.sh"), binpath("vfstest"), "$PREFIX", configuration])
596 plantestsuite("samba.vfstest.xattr-tdb-1", "nt4_dc:local", [os.path.join(samba3srcdir, "script/tests/xattr-tdb-1/run.sh"), binpath("vfstest"), "$PREFIX", configuration])
597 plantestsuite("samba.vfstest.acl", "nt4_dc:local", [os.path.join(samba3srcdir, "script/tests/vfstest-acl/run.sh"), binpath("vfstest"), "$PREFIX", configuration])
598 plantestsuite("samba.vfstest.catia", "nt4_dc:local", [os.path.join(samba3srcdir, "script/tests/vfstest-catia/run.sh"), binpath("vfstest"), "$PREFIX", configuration])
599 plantestsuite(
600 "samba.vfstest.full_audit_segfault",
601 "nt4_dc:local",
602 [os.path.join(samba3srcdir,
603 "script/tests/full_audit_segfault/run.sh"),
604 binpath("vfstest"),
605 "$PREFIX",
606 configuration])
608 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"])
609 plantestsuite("samba3.blackbox.smbclient_basic.NT1", "nt4_dc_smb1", [os.path.join(samba3srcdir, "script/tests/test_smbclient_basic.sh"), '$SERVER', '$SERVER_IP', '$DC_USERNAME', '$DC_PASSWORD', smbclient3, configuration, "-mNT1"])
610 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"])
611 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"])
612 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"])
613 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"])
615 plantestsuite("samba3.blackbox.smbclient_usernamemap", "ad_member_idmap_nss:local", [os.path.join(samba3srcdir, "script/tests/test_usernamemap.sh"), '$SERVER', smbclient3])
617 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])
618 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"]:
619 if "NT1" in options or "LANMAN2" in options:
620 env = "nt4_dc_smb1_done"
621 else:
622 env = "nt4_dc"
623 plantestsuite("samba3.blackbox.smbclient_auth.plain.%s" % (options), env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IP', '$DC_USERNAME', '$DC_PASSWORD', smbclient3, configuration, options])
625 for env in ["nt4_dc", "nt4_member", "ad_member", "ad_dc", "s4member", "fl2000dc"]:
626 plantestsuite("samba3.blackbox.smbclient_machine_auth.plain", "%s:local" % env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_machine_auth.sh"), '$SERVER', smbclient3, configuration])
627 smb1_env = env
628 if smb1_env == "ad_dc" or smb1_env == "nt4_dc":
629 smb1_env = smb1_env + "_smb1_done"
630 plantestsuite("samba3.blackbox.smbclient_ntlm.plain NT1", smb1_env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_ntlm.sh"), '$SERVER', '$DC_USERNAME', '$DC_PASSWORD', "never", smbclient3, "NT1", configuration])
631 plantestsuite("samba3.blackbox.smbclient_ntlm.plain SMB3", env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_ntlm.sh"), '$SERVER', '$DC_USERNAME', '$DC_PASSWORD', "never", smbclient3, "SMB3", configuration])
634 plantestsuite("samba3.blackbox.smbclient_log_basename", "ad_dc", [os.path.join(samba3srcdir, "script/tests/test_smbclient_log_basename.sh"), '$SERVER', smbclient3, '$PREFIX', configuration])
636 for options in ["--option=clientntlmv2auth=no", "--option=clientusespnego=no --option=clientntlmv2auth=no", "--option=clientusespnego=no --option=clientntlmv2auth=no -mNT1", ""]:
637 # don't attempt to run SMB1 tests in nt4_member or ad_member
638 # as these test envs don't support SMB1, use nt4_dc instead
639 environs = ["nt4_member", "ad_member"]
640 if "NT1" in options or "LANMAN2" in options:
641 environs = ["nt4_dc_smb1_done"]
642 for env in environs:
643 plantestsuite("samba3.blackbox.smbclient_auth.plain.%s" % (options), env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IP', '$DC_USERNAME', '$DC_PASSWORD', smbclient3, configuration, options])
644 plantestsuite("samba3.blackbox.smbclient_auth.plain.%s.member_creds" % (options), env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IP', '$SERVER/$USERNAME', '$PASSWORD', smbclient3, configuration, options])
646 for env in ["nt4_member", "ad_member"]:
647 plantestsuite("samba3.blackbox.smbclient_auth.empty_domain.domain_creds", env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IP', '/$DC_USERNAME', '$DC_PASSWORD', smbclient3, configuration, options])
648 plantestsuite("samba3.blackbox.smbclient_auth.empty_domain.member_creds", env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IP', '/$USERNAME', '$PASSWORD', smbclient3, configuration, options])
649 plantestsuite("samba3.blackbox.smbclient_auth.dot_domain.domain_creds", env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IP', './$DC_USERNAME', '$DC_PASSWORD', smbclient3, configuration, options])
650 plantestsuite("samba3.blackbox.smbclient_auth.dot_domain.member_creds", env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IP', './$USERNAME', '$PASSWORD', smbclient3, configuration, options])
651 plantestsuite("samba3.blackbox.smbclient_auth.upn.domain_creds", env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IP', '$DC_USERNAME@$REALM', '$DC_PASSWORD', smbclient3, configuration, options])
652 plantestsuite("samba3.blackbox.smbclient_auth.upn.member_creds", env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IP', '$USERNAME@$SERVER', '$PASSWORD', smbclient3, configuration, options])
654 env = "ad_dc_smb1"
655 plantestsuite("samba3.blackbox.smbspool", env, [os.path.join(samba3srcdir, "script/tests/test_smbspool.sh"), '$SERVER', '$SERVER_IP', '$DC_USERNAME', '$DC_PASSWORD', env])
657 plantestsuite("samba3.blackbox.printing_var_exp", "nt4_dc", [os.path.join(samba3srcdir, "script/tests/test_printing_var_exp.sh"), '$SERVER', '$SERVER_IP', '$DOMAIN', '$DC_USERNAME', '$DC_PASSWORD'])
659 for env in ["ad_member:local", "nt4_dc:local"]:
660 plantestsuite("samba3.blackbox.smbpasswd", env, [os.path.join(samba3srcdir, "script/tests/test_smbpasswd.sh"), '$SERVER', '$SERVER_IP', '$DC_USERNAME', '$DC_PASSWORD'])
662 env = "nt4_dc"
663 plantestsuite("samba3.blackbox.smbclient_auth.plain.ipv6", env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IPV6', '$SERVER/$USERNAME', '$PASSWORD', smbclient3, configuration])
665 for env in ["nt4_member", "ad_member"]:
666 plantestsuite("samba3.blackbox.net_cred_change", "%s:local" % env, [os.path.join(samba3srcdir, "script/tests/test_net_cred_change.sh"), configuration])
668 plantestsuite("samba3.blackbox.net_cred_change_at", "ad_member_s3_join:local", [os.path.join(samba3srcdir, "script/tests/test_net_cred_change_at.sh"), configuration, '$DC_SERVER'])
670 env = "ad_member"
671 t = "--krb5auth=$DOMAIN/$DC_USERNAME%$DC_PASSWORD"
672 plantestsuite("samba3.wbinfo_simple.%s" % t, "%s:local" % env, [os.path.join(srcdir(), "nsswitch/tests/test_wbinfo_simple.sh"), t])
673 plantestsuite("samba3.wbinfo_name_lookup", env,
674 [os.path.join(srcdir(),
675 "nsswitch/tests/test_wbinfo_name_lookup.sh"),
676 '$DOMAIN', '$REALM', '$DC_USERNAME'])
678 env = "ad_member"
679 plantestsuite("samba3.wbinfo_user_info_cached", env,
680 [os.path.join(srcdir(),
681 "nsswitch/tests/test_wbinfo_user_info_cached.sh"),
682 '$DOMAIN', '$REALM', 'joe', 'Secret007', '"Samba Users"', env])
683 plantestsuite("samba3.wbinfo_user_info_cached.trustdom", env,
684 [os.path.join(srcdir(),
685 "nsswitch/tests/test_wbinfo_user_info_cached.sh"),
686 '$TRUST_F_BOTH_DOMAIN', '$TRUST_F_BOTH_REALM', 'joe', 'Secret007', '"Samba Users"', env])
688 env = "ad_member:local"
689 plantestsuite("samba3.wbinfo_user_info", env,
690 [os.path.join(srcdir(),
691 "nsswitch/tests/test_wbinfo_user_info.sh"),
692 '$DOMAIN', '$REALM', '$DOMAIN', 'alice', 'alice', 'jane', 'jane.doe', env])
694 plantestsuite("samba3.winbind_call_depth_trace", env,
695 [os.path.join(srcdir(),
696 "source3/script/tests/test_winbind_call_depth_trace.sh"),
697 smbcontrol, configuration, '$PREFIX', env])
699 env = "fl2008r2dc:local"
700 plantestsuite("samba3.wbinfo_user_info", env,
701 [os.path.join(srcdir(),
702 "nsswitch/tests/test_wbinfo_user_info.sh"),
703 '$TRUST_DOMAIN', '$TRUST_REALM', '$DOMAIN', 'alice', 'alice', 'jane', 'jane.doe', env])
705 env = "nt4_member:local"
706 plantestsuite("samba3.wbinfo_sids_to_xids", env,
707 [os.path.join(srcdir(),
708 "nsswitch/tests/test_wbinfo_sids_to_xids.sh")])
709 plantestsuite(
710 "samba.wbinfo_lookuprids_cache",
711 env,
712 [os.path.join(samba3srcdir,
713 "script/tests/test_wbinfo_lookuprids_cache.sh")])
715 env = "ad_member"
716 t = "WBCLIENT-MULTI-PING"
717 plantestsuite("samba3.smbtorture_s3.%s" % t, env, [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//foo/bar', '""', '""', smbtorture3, ""])
718 plantestsuite("samba3.substitutions", env, [os.path.join(samba3srcdir, "script/tests/test_substitutions.sh"), "$SERVER", "alice", "Secret007", "$PREFIX"])
720 for env in ["maptoguest", "simpleserver"]:
721 plantestsuite("samba3.blackbox.smbclient_auth.plain.local_creds", env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', smbclient3, configuration + " --option=clientntlmv2auth=no --option=clientlanmanauth=yes"])
723 env = "maptoguest"
724 plantestsuite("samba3.blackbox.smbclient_auth.plain.bad_username", 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"])
725 plantestsuite("samba3.blackbox.smbclient_ntlm.plain.NT1", env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_ntlm.sh"), '$SERVER', '$USERNAME', '$PASSWORD', "baduser", smbclient3, "NT1", configuration])
726 plantestsuite("samba3.blackbox.smbclient_ntlm.plain.SMB3", env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_ntlm.sh"), '$SERVER', '$USERNAME', '$PASSWORD', "baduser", smbclient3, "SMB3", configuration])
728 # plain
729 env = "nt4_dc_smb1_done"
730 plantestsuite("samba3.blackbox.smbclient_s3.NT1.plain", 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"])
731 env = "nt4_dc"
732 plantestsuite("samba3.blackbox.smbclient_s3.SMB3.plain", 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"])
734 for env in ["nt4_member", "ad_member"]:
735 plantestsuite("samba3.blackbox.smbclient_s3.NT1.plain.member_creds", 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"])
736 plantestsuite("samba3.blackbox.smbclient_s3.SMB3.plain.member_creds", 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"])
738 env = "nt4_dc_smb1_done"
739 plantestsuite("samba3.blackbox.smbclient_s3.NT1.sign", 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", "--client-protection=sign"])
740 env = "nt4_dc"
741 plantestsuite("samba3.blackbox.smbclient_s3.SMB3.sign", 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", "--client-protection=sign"])
743 for env in ["nt4_member", "ad_member"]:
744 plantestsuite("samba3.blackbox.smbclient_s3.NT1.sign.member_creds", 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", "--client-protection=sign"])
745 plantestsuite("samba3.blackbox.smbclient_s3.SMB3.sign.member_creds", 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", "--client-protection=sign"])
747 env = "nt4_dc_smb1_done"
748 # encrypted
749 plantestsuite("samba3.blackbox.smbclient_s3.NT1.crypt", 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", "--client-protection=encrypt"])
750 env = "nt4_dc"
751 plantestsuite("samba3.blackbox.smbclient_s3.SMB3.crypt", 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", "--client-protection=encrypt"])
753 for env in ["fileserver"]:
754 plantestsuite("samba3.blackbox.preserve_case.NT1", env + "_smb1_done", [os.path.join(samba3srcdir, "script/tests/test_preserve_case.sh"), '$SERVER', '$DOMAIN', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3, "NT1"])
755 plantestsuite("samba3.blackbox.preserve_case.SMB2+", env, [os.path.join(samba3srcdir, "script/tests/test_preserve_case.sh"), '$SERVER', '$DOMAIN', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3, '"SMB2 SMB3"'])
756 plantestsuite("samba3.blackbox.dfree_command.NT1", env + "_smb1_done", [os.path.join(samba3srcdir, "script/tests/test_dfree_command.sh"), '$SERVER', '$DOMAIN', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3, "NT1"])
757 plantestsuite("samba3.blackbox.dfree_command.SMB3", env, [os.path.join(samba3srcdir, "script/tests/test_dfree_command.sh"), '$SERVER', '$DOMAIN', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3, "SMB3"])
758 plantestsuite("samba3.blackbox.dfree_quota.NT1", env + "_smb1_done", [os.path.join(samba3srcdir, "script/tests/test_dfree_quota.sh"), '$SERVER', '$DOMAIN', '$USERNAME', '$PASSWORD', '$LOCAL_PATH', smbclient3, smbcquotas, smbcacls, "NT1"])
759 plantestsuite("samba3.blackbox.dfree_quota.SMB3", env, [os.path.join(samba3srcdir, "script/tests/test_dfree_quota.sh"), '$SERVER', '$DOMAIN', '$USERNAME', '$PASSWORD', '$LOCAL_PATH', smbclient3, smbcquotas, smbcacls, "SMB3"])
760 plantestsuite("samba3.blackbox.smbcquotas", env, [os.path.join(samba3srcdir, "script/tests/test_smbcquota.sh"), '$SERVER', '$DOMAIN', '$USERNAME', '$PASSWORD', '$LOCAL_PATH', smbcquotas])
761 plantestsuite("samba3.blackbox.valid_users", env, [os.path.join(samba3srcdir, "script/tests/test_valid_users.sh"), '$SERVER', '$SERVER_IP', '$DOMAIN', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3])
762 plantestsuite("samba3.blackbox.force_create_mode", env, [os.path.join(samba3srcdir, "script/tests/test_force_create_mode.sh"), '$SERVER', '$DOMAIN', '$USERNAME', '$PASSWORD', '$PREFIX', env, smbclient3])
763 plantestsuite("samba3.blackbox.dropbox", env, [os.path.join(samba3srcdir, "script/tests/test_dropbox.sh"), '$SERVER', '$DOMAIN', 'gooduser', '$PASSWORD', '$PREFIX', env, smbclient3])
764 plantestsuite("samba3.blackbox.offline", env, [os.path.join(samba3srcdir, "script/tests/test_offline.sh"), '$SERVER', '$SERVER_IP', '$DOMAIN', '$USERNAME', '$PASSWORD', '$LOCAL_PATH/offline', smbclient3])
765 plantestsuite("samba3.blackbox.shadow_copy2.NT1", env + "_smb1_done", [os.path.join(samba3srcdir, "script/tests/test_shadow_copy.sh"), '$SERVER', '$SERVER_IP', '$DOMAIN', '$USERNAME', '$PASSWORD', '$LOCAL_PATH/shadow', smbclient3, '-m', 'NT1'])
766 plantestsuite("samba3.blackbox.shadow_copy2.SMB3", env, [os.path.join(samba3srcdir, "script/tests/test_shadow_copy.sh"), '$SERVER', '$SERVER_IP', '$DOMAIN', '$USERNAME', '$PASSWORD', '$LOCAL_PATH/shadow', smbclient3, '-m', 'SMB3'])
767 plantestsuite("samba3.blackbox.shadow_copy_torture", env, [os.path.join(samba3srcdir, "script/tests/test_shadow_copy_torture.sh"), '$SERVER', '$SERVER_IP', '$DOMAIN', '$USERNAME', '$PASSWORD', '$LOCAL_PATH/shadow', smbtorture4, smbclient3])
768 plantestsuite("samba3.blackbox.smbclient.forceuser_validusers", env, [os.path.join(samba3srcdir, "script/tests/test_forceuser_validusers.sh"), '$SERVER', '$DOMAIN', '$USERNAME', '$PASSWORD', '$LOCAL_PATH', smbclient3])
769 plantestsuite("samba3.blackbox.netshareenum", env, [os.path.join(samba3srcdir, "script/tests/test_shareenum.sh"), '$SERVER', '$USERNAME', '$PASSWORD', rpcclient])
770 plantestsuite("samba3.blackbox.acl_xattr.NT1", env + "_smb1_done", [os.path.join(samba3srcdir, "script/tests/test_acl_xattr.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3, smbcacls, '-mNT1'])
771 plantestsuite("samba3.blackbox.acl_xattr.SMB3", env, [os.path.join(samba3srcdir, "script/tests/test_acl_xattr.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3, smbcacls, '-mSMB3'])
772 plantestsuite("samba3.blackbox.smb2.not_casesensitive", env, [os.path.join(samba3srcdir, "script/tests/test_smb2_not_casesensitive.sh"), '//$SERVER/tmp', '$SERVER_IP', '$USERNAME', '$PASSWORD', '$LOCAL_PATH', smbclient3])
773 plantestsuite("samba3.blackbox.inherit_owner.default.NT1", env + "_smb1_done", [os.path.join(samba3srcdir, "script/tests/test_inherit_owner.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3, smbcacls, net, 'tmp', '0', '0', '-m', 'NT1'])
774 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'])
775 plantestsuite("samba3.blackbox.inherit_owner.full.NT1", env + "_smb1_done", [os.path.join(samba3srcdir, "script/tests/test_inherit_owner.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3, smbcacls, net, 'inherit_owner', '1', '1', '-m', 'NT1'])
776 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'])
777 plantestsuite("samba3.blackbox.inherit_owner.unix.NT1", env + "_smb1_done", [os.path.join(samba3srcdir, "script/tests/test_inherit_owner.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3, smbcacls, net, 'inherit_owner_u', '0', '1', '-m', 'NT1'])
778 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'])
779 plantestsuite("samba3.blackbox.large_acl.NT1", env + "_smb1_done", [os.path.join(samba3srcdir, "script/tests/test_large_acl.sh"), '$SERVER', '$USERNAME', '$PASSWORD', smbclient3, smbcacls, '-m', 'NT1'])
780 plantestsuite("samba3.blackbox.large_acl.SMB3", env, [os.path.join(samba3srcdir, "script/tests/test_large_acl.sh"), '$SERVER', '$USERNAME', '$PASSWORD', smbclient3, smbcacls, '-m', 'SMB3'])
781 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'])
782 plantestsuite("samba3.blackbox.delete_stream", env, [os.path.join(samba3srcdir, "script/tests/test_delete_stream.sh"), '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3, smbcacls, net, 'acl_streams_xattr'])
783 plantestsuite("samba3.blackbox.homes", env, [os.path.join(samba3srcdir, "script/tests/test_homes.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$LOCAL_PATH', '$PREFIX', smbclient3, configuration])
784 plantestsuite("samba3.blackbox.force_group_change", env,
785 [os.path.join(samba3srcdir, "script/tests/test_force_group_change.sh"),
786 '$SERVER', '$USERNAME', '$PASSWORD', '$LOCAL_PATH', smbclient3, smbcontrol])
787 plantestsuite("samba3.blackbox.zero-data", env,
788 [os.path.join(samba3srcdir, "script/tests/test_zero_data.sh"),
789 '$SERVER_IP', '$USERNAME', '$PASSWORD', '$LOCAL_PATH'])
790 plantestsuite("samba3.blackbox.timestamps", env,
791 [os.path.join(samba3srcdir, "script/tests/test_timestamps.sh"),
792 '$SERVER_IP', '$USERNAME', '$PASSWORD', '$LOCAL_PATH', smbclient3])
793 plantestsuite("samba3.blackbox.volumeserialnumber", env,
794 [os.path.join(samba3srcdir, "script/tests/test_volume_serial_number.sh"),
795 '$SERVER_IP', '$USERNAME', '$PASSWORD', 'volumeserialnumber', smbclient3])
796 plantestsuite("samba3.blackbox.smb1_system_security", env + "_smb1_done",
797 [os.path.join(samba3srcdir, "script/tests/test_smb1_system_security.sh"),
798 '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', smbtorture3, net, 'tmp'])
799 plantestsuite("samba3.blackbox.sacl_get_set", env,
800 [os.path.join(samba3srcdir, "script/tests/test_sacl_set_get.sh"),
801 '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', smbtorture3, net, 'tmp'])
802 plantestsuite("samba3.blackbox.NT1.shadow_copy_torture", env + "_smb1_done",
803 [os.path.join(samba3srcdir, "script/tests/test_smb1_shadow_copy_torture.sh"),
804 '$SERVER', '$SERVER_IP', '$DOMAIN', '$USERNAME', '$PASSWORD', '$LOCAL_PATH/shadow', smbtorture4])
805 plantestsuite("samba3.blackbox.smbclient_iconv.SMB2", env,
806 [os.path.join(samba3srcdir, "script/tests/test_smbclient_iconv.sh"),
807 '$SERVER', '$SERVER_IP', 'bad_iconv', '$USERNAME', '$PASSWORD', smbclient3])
808 plantestsuite("samba3.blackbox.smbclient_iconv.NT1", env + "_smb1_done",
809 [os.path.join(samba3srcdir, "script/tests/test_smbclient_iconv.sh"),
810 '$SERVER', '$SERVER_IP', 'bad_iconv', '$USERNAME', '$PASSWORD', smbclient3, '-mNT1'])
811 plantestsuite("samba3.blackbox.smbclient_iconv.CORE", env + "_smb1_done",
812 [os.path.join(samba3srcdir, "script/tests/test_smbclient_iconv.sh"),
813 '$SERVER', '$SERVER_IP', 'bad_iconv', '$USERNAME', '$PASSWORD', smbclient3, '-mCORE'])
814 plantestsuite("samba3.blackbox.test_veto_rmdir", env,
815 [os.path.join(samba3srcdir, "script/tests/test_veto_rmdir.sh"),
816 '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', '$LOCAL_PATH/veto', smbclient3])
817 plantestsuite("samba3.blackbox.test_dangle_rmdir", env,
818 [os.path.join(samba3srcdir, "script/tests/test_delete_veto_files_only_rmdir.sh"),
819 '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', '$LOCAL_PATH/veto', smbclient3])
820 plantestsuite("samba3.blackbox.test_list_servers.NT1",
821 env + "_smb1_done",
822 [os.path.join(samba3srcdir, "script/tests/test_smbclient_list_servers.sh"),
823 '$SERVER',
824 '$SERVER_IP',
825 '$USERNAME',
826 '$PASSWORD',
827 smbclient3,
828 "-mSMB3"])
829 plantestsuite("samba3.blackbox.test_list_servers.SMB2",
830 env,
831 [os.path.join(samba3srcdir, "script/tests/test_smbclient_list_servers.sh"),
832 '$SERVER',
833 '$SERVER_IP',
834 '$USERNAME',
835 '$PASSWORD',
836 smbclient3,
837 "-mSMB3"])
839 plantestsuite("samba3.blackbox.test_symlink_traversal.SMB2", env,
840 [os.path.join(samba3srcdir, "script/tests/test_symlink_traversal_smb2.sh"),
841 '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', '$LOCAL_PATH/local_symlinks',
842 '$PREFIX', smbclient3])
844 plantestsuite("samba3.blackbox.test_symlink_traversal.SMB1", env + "_smb1_done",
845 [os.path.join(samba3srcdir, "script/tests/test_symlink_traversal_smb1.sh"),
846 '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', '$LOCAL_PATH/local_symlinks',
847 '$PREFIX', smbclient3])
849 plantestsuite("samba3.blackbox.test_symlink_traversal.SMB1.posix", env + "_smb1_done",
850 [os.path.join(samba3srcdir, "script/tests/test_symlink_traversal_smb1_posix.sh"),
851 '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', '$LOCAL_PATH/local_symlinks',
852 '$PREFIX', smbclient3])
854 plantestsuite("samba3.blackbox.test_symlink_rename.SMB1.posix", env + "_smb1_done",
855 [os.path.join(samba3srcdir, "script/tests/test_symlink_rename_smb1_posix.sh"),
856 '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', '$LOCAL_PATH/local_symlinks',
857 '$PREFIX', smbclient3])
859 plantestsuite("samba3.blackbox.test_veto_files", env,
860 [os.path.join(samba3srcdir, "script/tests/test_veto_files.sh"),
861 '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', '$LOCAL_PATH/veto', smbclient3])
863 plantestsuite("samba3.blackbox.stream_dir_rename", env,
864 [os.path.join(samba3srcdir, "script/tests/test_stream_dir_rename.sh"),
865 '$SERVER', '$USERNAME', '$PASSWORD', '$PREFIX', smbclient3])
867 plantestsuite("samba3.blackbox.test_symlink_dosmode", env,
868 [os.path.join(samba3srcdir, "script/tests/test_symlink_dosmode.sh"),
869 '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', '$LOCAL_PATH/local_symlinks',
870 '$PREFIX', smbclient3])
872 # tar command tests
875 # Test smbclient/tarmode
876 plantestsuite("samba3.blackbox.smbclient_tarmode.NT1", env + "_smb1_done",
877 [os.path.join(samba3srcdir, "script/tests/test_smbclient_tarmode.sh"),
878 '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD',
879 '$LOCAL_PATH/tarmode/smbclient_tar', '$PREFIX', smbclient3, configuration, "-mNT1"])
880 plantestsuite("samba3.blackbox.smbclient_tarmode.SMB3", env,
881 [os.path.join(samba3srcdir, "script/tests/test_smbclient_tarmode.sh"),
882 '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD',
883 '$LOCAL_PATH/tarmode/smbclient_tar', '$PREFIX', smbclient3, configuration, "-mSMB3"])
885 # Test suite for new smbclient/tar with libarchive (GSoC 13)
886 plantestsuite("samba3.blackbox.smbclient_tar.NT1", env + "_smb1_done",
887 [os.path.join(samba3srcdir, "script/tests/test_smbclient_tarmode.pl"),
888 '-n', '$SERVER', '-i', '$SERVER_IP', '-s', 'tarmode2',
889 '-u', '$USERNAME', '-p', '$PASSWORD', '-l', '$LOCAL_PATH/tarmode2',
890 '-d', 'smbclient_tar.NT1', '-b', smbclient3,
891 '--subunit', '--', configuration, '-mNT1'])
892 plantestsuite("samba3.blackbox.smbclient_tar.SMB3", env,
893 [os.path.join(samba3srcdir, "script/tests/test_smbclient_tarmode.pl"),
894 '-n', '$SERVER', '-i', '$SERVER_IP', '-s', 'tarmode2',
895 '-u', '$USERNAME', '-p', '$PASSWORD', '-l', '$LOCAL_PATH/tarmode2',
896 '-d', 'smbclient_tar.SMB3', '-b', smbclient3,
897 '--subunit', '--', configuration, '-mSMB3'])
898 plantestsuite("samba3.blackbox.fifo", env,
899 [os.path.join(samba3srcdir, "script/tests/test_fifo.sh"),
900 '$SERVER', '$DOMAIN', 'gooduser', '$PASSWORD', '$PREFIX', env, smbclient3])
901 plantestsuite("samba3.blackbox.test_full_audit_success_badname", env,
902 [os.path.join(samba3srcdir, "script/tests/test_bad_auditnames.sh"),
903 '$SERVER', 'full_audit_success_bad_name', '$USERNAME', '$PASSWORD', smbclient3])
904 plantestsuite("samba3.blackbox.test_full_audit_fail_badname", env,
905 [os.path.join(samba3srcdir, "script/tests/test_bad_auditnames.sh"),
906 '$SERVER', 'full_audit_fail_bad_name', '$USERNAME', '$PASSWORD', smbclient3])
907 plantestsuite("samba3.blackbox.fruit.resource_stream", env,
908 [os.path.join(samba3srcdir, "script/tests/test_fruit_resource_stream.sh"),
909 '$SERVER', 'fruit_resource_stream', '$USERNAME', '$PASSWORD',
910 '$LOCAL_PATH/fruit_resource_stream', smbclient3])
912 plantestsuite("samba3.blackbox.smbclient_old_dir", "fileserver_smb1",
913 [os.path.join(samba3srcdir,
914 "script/tests/test_old_dirlisting.sh"),
915 timelimit, smbclient3])
917 for env in ["fileserver:local"]:
918 plantestsuite("samba3.blackbox.net_usershare", env, [os.path.join(samba3srcdir, "script/tests/test_net_usershare.sh"), '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', smbclient3])
920 plantestsuite("samba3.blackbox.smbstatus", env, [os.path.join(samba3srcdir, "script/tests/test_smbstatus.sh"), '$SERVER', '$SERVER_IP', '$DOMAIN', '$USERNAME', '$PASSWORD', '$USERID', '$LOCAL_PATH', '$PREFIX', smbclient3, smbstatus, configuration, "SMB3"])
921 plantestsuite("samba3.blackbox.net_registry_import", env, [os.path.join(samba3srcdir, "script/tests/test_net_registry_import.sh"), '$SERVER', '$LOCAL_PATH', '$USERNAME', '$PASSWORD'])
923 env = 'ad_member'
924 plantestsuite("samba3.blackbox.smbget",
925 env,
927 os.path.join(samba3srcdir, "script/tests/test_smbget.sh"),
928 '$SERVER',
929 '$SERVER_IP',
930 '$DOMAIN',
931 '$REALM',
932 'smbget_user',
933 '$PASSWORD',
934 '$DOMAIN_USER',
935 '$DOMAIN_USER_PASSWORD',
936 '$LOCAL_PATH/smbget',
937 smbget
940 plantestsuite("samba3.blackbox.server_addresses",
941 "simpleserver",
942 [os.path.join(samba3srcdir,
943 "script/tests/test_server_addresses.sh")])
945 # TODO encrypted against member, with member creds, and with DC creds
946 plantestsuite("samba3.blackbox.net.misc NT1", "ad_dc_smb1_done:local",
947 [os.path.join(samba3srcdir, "script/tests/test_net_misc.sh"),
948 scriptdir, "$SMB_CONF_PATH", net, configuration, "NT1"])
949 plantestsuite("samba3.blackbox.net.misc SMB3", "ad_dc:local",
950 [os.path.join(samba3srcdir, "script/tests/test_net_misc.sh"),
951 scriptdir, "$SMB_CONF_PATH", net, configuration, "SMB3"])
952 plantestsuite("samba3.blackbox.net.local.registry", "nt4_dc:local",
953 [os.path.join(samba3srcdir, "script/tests/test_net_registry.sh"),
954 scriptdir, "$SMB_CONF_PATH", net, configuration])
955 plantestsuite("samba3.blackbox.net.registry.check", "nt4_dc:local",
956 [os.path.join(samba3srcdir, "script/tests/test_net_registry_check.sh"),
957 scriptdir, "$SMB_CONF_PATH", net, configuration, dbwrap_tool])
958 plantestsuite("samba3.blackbox.net.rpc.registry", "nt4_dc",
959 [os.path.join(samba3srcdir, "script/tests/test_net_registry.sh"),
960 scriptdir, "$SMB_CONF_PATH", net, configuration, 'rpc'])
962 plantestsuite("samba3.blackbox.net.local.registry.roundtrip", "nt4_dc:local",
963 [os.path.join(samba3srcdir, "script/tests/test_net_registry_roundtrip.sh"),
964 scriptdir, "$SMB_CONF_PATH", net, configuration])
965 plantestsuite("samba3.blackbox.net.rpc.registry.roundtrip", "nt4_dc",
966 [os.path.join(samba3srcdir, "script/tests/test_net_registry_roundtrip.sh"),
967 scriptdir, "$SMB_CONF_PATH", net, configuration, 'rpc'])
969 plantestsuite("samba3.blackbox.net.local.conf", "nt4_dc:local",
970 [os.path.join(samba3srcdir, "script/tests/test_net_conf.sh"),
971 scriptdir, "$SMB_CONF_PATH", net, configuration])
972 plantestsuite("samba3.blackbox.net.rpc.conf", "nt4_dc",
973 [os.path.join(samba3srcdir, "script/tests/test_net_conf.sh"),
974 scriptdir, "$SMB_CONF_PATH", net, configuration, 'rpc'])
977 plantestsuite("samba3.blackbox.testparm", "nt4_dc:local",
978 [os.path.join(samba3srcdir, "script/tests/test_testparm_s3.sh"),
979 "$LOCAL_PATH"])
981 plantestsuite(
982 "samba3.pthreadpool", "none",
983 [os.path.join(samba3srcdir, "script/tests/test_pthreadpool.sh")])
985 if with_pthreadpool and have_ldwrap:
986 plantestsuite("samba3.pthreadpool_cmocka", "none",
987 [os.path.join(bindir(), "pthreadpooltest_cmocka")])
989 if with_pthreadpool:
990 plantestsuite("samba3.libwbclient_threads",
991 "nt4_member",
992 [os.path.join(samba3srcdir,
993 "script/tests/test_libwbclient_threads.sh"),
994 "$DOMAIN", "$DC_USERNAME"])
995 plantestsuite("b15464_testcase", "none",
996 [os.path.join(bbdir, "b15464-testcase.sh"),
997 binpath("b15464-testcase"),
998 binpath("plugins/libnss_winbind.so.2")])
1000 plantestsuite("samba3.test_nfs4_acl", "none",
1001 [os.path.join(bindir(), "test_nfs4_acls"),
1002 "$SMB_CONF_PATH"])
1004 plantestsuite("samba3.test_vfs_full_audit", "none",
1005 [os.path.join(bindir(), "test_vfs_full_audit"),
1006 "$SMB_CONF_PATH"])
1008 plantestsuite("samba3.test_vfs_posixacl", "none",
1009 [os.path.join(bindir(), "test_vfs_posixacl"),
1010 "$SMB_CONF_PATH"])
1012 if is_module_enabled("vfs_gpfs"):
1013 plantestsuite("samba3.test_vfs_gpfs", "none",
1014 [os.path.join(bindir(), "test_vfs_gpfs")])
1016 plantestsuite(
1017 "samba3.resolvconf", "none",
1018 [os.path.join(samba3srcdir, "script/tests/test_resolvconf.sh")])
1020 plantestsuite("samba3.tevent_glib_glue", "none",
1021 [os.path.join(samba3srcdir, "script/tests/test_tevent_glib_glue.sh")])
1023 plantestsuite("samba3.async_req", "nt4_dc",
1024 [os.path.join(samba3srcdir, "script/tests/test_async_req.sh")])
1026 # smbtorture4 tests
1028 base = ["base.attr", "base.charset", "base.chkpath", "base.createx_access", "base.defer_open", "base.delaywrite", "base.delete",
1029 "base.deny1", "base.deny2", "base.deny3", "base.denydos", "base.dir1", "base.dir2",
1030 "base.disconnect", "base.fdpass", "base.lock",
1031 "base.mangle", "base.negnowait", "base.ntdeny1",
1032 "base.ntdeny2", "base.open", "base.openattr", "base.properties", "base.rename", "base.rw1",
1033 "base.secleak", "base.tcon", "base.tcondev", "base.trans2", "base.unlink", "base.vuid",
1034 "base.xcopy", "base.samba3error"]
1036 raw = ["raw.acls", "raw.chkpath", "raw.close", "raw.composite", "raw.context", "raw.eas",
1037 "raw.ioctl", "raw.lock", "raw.mkdir", "raw.mux", "raw.notify", "raw.open", "raw.oplock",
1038 "raw.qfileinfo", "raw.qfsinfo", "raw.read", "raw.rename", "raw.search", "raw.seek",
1039 "raw.sfileinfo.base", "raw.sfileinfo.bug", "raw.streams", "raw.unlink", "raw.write",
1040 "raw.samba3hide", "raw.samba3badpath", "raw.sfileinfo.rename", "raw.session",
1041 "raw.samba3caseinsensitive", "raw.samba3posixtimedlock",
1042 "raw.samba3rootdirfid", "raw.samba3rootdirfid2", "raw.sfileinfo.end-of-file",
1043 "raw.bench-oplock", "raw.bench-lock", "raw.bench-open", "raw.bench-tcon",
1044 "raw.samba3checkfsp", "raw.samba3closeerr", "raw.samba3oplocklogoff", "raw.samba3badnameblob"]
1046 smb2 = smbtorture4_testsuites("smb2.")
1048 rpc = ["rpc.authcontext",
1049 "rpc.samba3.bind",
1050 "rpc.samba3.srvsvc",
1051 "rpc.samba3.sharesec",
1052 "rpc.samba3.spoolss",
1053 "rpc.samba3.wkssvc",
1054 "rpc.samba3.winreg",
1055 "rpc.samba3.getaliasmembership-0",
1056 "rpc.samba3.netlogon",
1057 "rpc.samba3.sessionkey",
1058 "rpc.samba3.getusername",
1059 "rpc.samba3.smb1-pipe-name",
1060 "rpc.samba3.smb2-pipe-name",
1061 "rpc.samba3.smb-reauth1",
1062 "rpc.samba3.smb-reauth2",
1063 "rpc.samba3.lsa_over_netlogon",
1064 "rpc.samba3.pipes_supported_interfaces",
1065 "rpc.svcctl",
1066 "rpc.ntsvcs",
1067 "rpc.winreg",
1068 "rpc.eventlog",
1069 "rpc.spoolss.printserver",
1070 "rpc.spoolss.win",
1071 "rpc.spoolss.notify",
1072 "rpc.spoolss.printer",
1073 "rpc.spoolss.driver",
1074 "rpc.lsa",
1075 "rpc.lsa-getuser",
1076 "rpc.lsa.lookupsids",
1077 "rpc.lsa.lookupnames",
1078 "rpc.lsa.privileges",
1079 "rpc.lsa.secrets",
1080 "rpc.mdssvc",
1081 "rpc.samr",
1082 "rpc.samr.users",
1083 "rpc.samr.users.privileges",
1084 "rpc.samr.passwords.default",
1085 "rpc.samr.passwords.pwdlastset",
1086 "rpc.samr.passwords.lockout",
1087 "rpc.samr.passwords.badpwdcount",
1088 "rpc.samr.large-dc",
1089 "rpc.samr.machine.auth",
1090 "rpc.samr.priv",
1091 "rpc.samr.passwords.validate",
1092 "rpc.samr.handletype",
1093 "rpc.netlogon.admin",
1094 "rpc.netlogon.zerologon",
1095 "rpc.schannel",
1096 "rpc.schannel2",
1097 "rpc.bench-schannel1",
1098 "rpc.schannel_anon_setpw",
1099 "rpc.join",
1100 "rpc.bind",
1101 "rpc.initshutdown",
1102 "rpc.wkssvc",
1103 "rpc.srvsvc"]
1105 local = ["local.nss"]
1107 idmap = ["idmap.rfc2307", "idmap.alloc", "idmap.rid", "idmap.ad"]
1109 rap = ["rap.basic", "rap.rpc", "rap.printing", "rap.sam"]
1111 unix = ["unix.info2", "unix.whoami"]
1113 nbt = ["nbt.dgram"]
1115 vfs = [
1116 "vfs.fruit",
1117 "vfs.acl_xattr",
1118 "vfs.fruit_netatalk",
1119 "vfs.fruit_file_id",
1120 "vfs.fruit_timemachine",
1121 "vfs.fruit_conversion",
1122 "vfs.unfruit",
1125 tests = base + raw + smb2 + rpc + unix + local + rap + nbt + idmap + vfs
1127 for t in tests:
1128 if t == "base.delaywrite" or t == "base.deny1" or t == "base.deny2":
1129 plansmbtorture4testsuite(t, "fileserver_smb1", '//$SERVER/tmp -U$USERNAME%$PASSWORD --maximum-runtime=900')
1130 elif t == "base.createx_access":
1131 plansmbtorture4testsuite(t, "ad_dc_smb1", '//$SERVER/tmp -U$USERNAME%$PASSWORD -k yes --maximum-runtime=900')
1132 elif t == "rap.sam":
1133 plansmbtorture4testsuite(t, "nt4_dc_smb1", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --option=doscharset=ISO-8859-1')
1134 plansmbtorture4testsuite(t, "ad_dc_smb1", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --option=doscharset=ISO-8859-1')
1135 elif t == "winbind.pac":
1136 plansmbtorture4testsuite(t, "ad_member:local", '//$SERVER/tmp --realm=$REALM --machine-pass --option=torture:addc=$DC_SERVER', description="machine account")
1137 elif t == "unix.whoami":
1138 plansmbtorture4testsuite(t, "nt4_member:local", '//$SERVER/tmp --machine-pass', description="machine account")
1139 plansmbtorture4testsuite(t, "ad_dc_smb1:local", '//$SERVER/tmp --machine-pass', description="machine account")
1140 plansmbtorture4testsuite(t, "ad_member:local", '//$SERVER/tmp --machine-pass --option=torture:addc=$DC_SERVER', description="machine account")
1141 plansmbtorture4testsuite(t, "ad_dc_smb1:local", '//$SERVER/tmp --machine-pass --option=torture:addc=$DC_SERVER', description="machine account")
1142 for env in ["nt4_dc_smb1", "nt4_member"]:
1143 plansmbtorture4testsuite(t, env, '//$SERVER/tmp -U$DC_USERNAME%$DC_PASSWORD')
1144 plansmbtorture4testsuite(t, env, '//$SERVER/tmpguest -U%', description='anonymous connection')
1145 for env in ["ad_dc_smb1", "ad_member"]:
1146 plansmbtorture4testsuite(t, env, '//$SERVER/tmp -U$DC_USERNAME@$REALM%$DC_PASSWORD --option=torture:addc=$DC_SERVER')
1147 plansmbtorture4testsuite(t, env, '//$SERVER/tmp -k yes -U$DC_USERNAME@$REALM%$DC_PASSWORD --option=torture:addc=$DC_SERVER', description='kerberos connection')
1148 plansmbtorture4testsuite(t, env, '//$SERVER/tmpguest -U% --option=torture:addc=$DC_SERVER', description='anonymous connection')
1149 plansmbtorture4testsuite(t, env, '//$SERVER/tmp -k no -U$DC_USERNAME@$REALM%$DC_PASSWORD', description='ntlm user@realm')
1150 elif t == "raw.samba3posixtimedlock":
1151 plansmbtorture4testsuite(t, "nt4_dc_smb1", '//$SERVER_IP/tmpguest -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/nt4_dc_smb1/share')
1152 plansmbtorture4testsuite(t, "nt4_dc_smb1", '//$SERVER_IP/brl_delay_inject1 -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/nt4_dc_smb1/share',
1153 description="brl_delay_inject1")
1154 plansmbtorture4testsuite(t, "nt4_dc_smb1", '//$SERVER_IP/brl_delay_inject2 -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/nt4_dc_smb1/share',
1155 description="brl_delay_inject2")
1156 plansmbtorture4testsuite(t, "ad_dc_smb1", '//$SERVER_IP/tmpguest -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/ad_dc_smb1/share')
1157 elif t == "smb2.samba3misc":
1158 plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmpguest -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/nt4_dc/share')
1159 plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/brl_delay_inject1 -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/nt4_dc/share',
1160 description="brl_delay_inject1")
1161 plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/brl_delay_inject2 -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/nt4_dc/share',
1162 description="brl_delay_inject2")
1163 plansmbtorture4testsuite(t, "ad_dc", '//$SERVER_IP/tmpguest -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/ad_dc/share')
1164 elif t == "raw.chkpath":
1165 plansmbtorture4testsuite(t, "nt4_dc_smb1", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD')
1166 plansmbtorture4testsuite(t, "ad_dc_smb1", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD')
1167 elif t == "raw.samba3hide" or t == "raw.samba3checkfsp" or t == "raw.samba3closeerr":
1168 plansmbtorture4testsuite(t, "nt4_dc_smb1", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
1169 plansmbtorture4testsuite(t, "fileserver_smb1", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
1170 plansmbtorture4testsuite(t, "ad_dc_smb1", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
1171 elif t == "raw.session":
1172 plansmbtorture4testsuite(t, "nt4_dc_smb1", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD', 'plain')
1173 plansmbtorture4testsuite(t, "nt4_dc_smb1", '//$SERVER_IP/tmpenc -U$USERNAME%$PASSWORD', 'enc')
1174 plansmbtorture4testsuite(t, "ad_dc_smb1", '//$SERVER/tmp -k no -U$USERNAME%$PASSWORD', 'ntlm')
1175 plansmbtorture4testsuite(t, "ad_dc_smb1", '//$SERVER/tmp -k yes -U$USERNAME%$PASSWORD', 'krb5')
1176 elif t == "smb2.session":
1177 alice_creds = "--option='torture:user2name=alice' --option='torture:user2password=Secret007'"
1178 plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD', 'plain')
1179 plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmpenc -U$USERNAME%$PASSWORD', 'enc')
1180 plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -k no -U$USERNAME%$PASSWORD ' + alice_creds, 'ntlm')
1181 plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -k yes -U$USERNAME%$PASSWORD ' + alice_creds, 'krb5')
1182 # Certain tests fail when run against ad_member with MIT kerberos because the private krb5.conf overrides the provisioned lib/krb5.conf,
1183 # ad_member_idmap_rid sets "create krb5.conf = no"
1184 plansmbtorture4testsuite(t, "ad_member_idmap_rid", '//$SERVER/tmp -k yes -U$DC_USERNAME@$REALM%$DC_PASSWORD', 'krb5')
1185 elif t == "smb2.session-require-signing":
1186 plansmbtorture4testsuite(t, "ad_member_idmap_rid", '//$SERVER_IP/tmp -U$DC_USERNAME@$REALM%$DC_PASSWORD')
1187 elif t == "rpc.lsa":
1188 plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD', 'over ncacn_np ')
1189 plansmbtorture4testsuite(t, "nt4_dc", 'ncacn_ip_tcp:$SERVER_IP -U$USERNAME%$PASSWORD', 'over ncacn_ip_tcp ')
1190 elif t.startswith("rpc.lsa."):
1191 # This avoids the rpc.lsa.* tests running under ncacn_ip_tcp:
1192 # (there is rpc.lsa.secrets fails due to OpenPolicy2 for example)
1193 plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
1194 elif t == "rpc.mdssvc":
1195 plansmbtorture4testsuite(t, "fileserver", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
1196 elif t == "smb2.durable-open" or t == "smb2.durable-v2-open" or t == "smb2.replay" or t == "smb2.durable-v2-delay":
1197 plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/durable -U$USERNAME%$PASSWORD')
1198 plansmbtorture4testsuite(t, "ad_dc", '//$SERVER_IP/durable -U$USERNAME%$PASSWORD')
1199 elif t == "base.rw1":
1200 plansmbtorture4testsuite(t, "nt4_dc_smb1", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
1201 plansmbtorture4testsuite(t, "nt4_dc_smb1", '//$SERVER_IP/valid-users-tmp -U$USERNAME%$PASSWORD')
1202 plansmbtorture4testsuite(t, "nt4_dc_smb1", '//$SERVER_IP/write-list-tmp -U$USERNAME%$PASSWORD')
1203 plansmbtorture4testsuite(t, "ad_dc_smb1", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
1204 elif t == "idmap.rfc2307":
1205 plantestsuite(t, "ad_member_rfc2307",
1206 [os.path.join(samba3srcdir,
1207 "../nsswitch/tests/test_idmap_rfc2307.sh"),
1208 '$DOMAIN',
1209 'Administrator', '2000000',
1210 'Guest', '2000001',
1211 '"Domain Users"', '2000002',
1212 'DnsAdmins', '2000003',
1213 '2000005', '35',
1214 'ou=idmap,dc=samba,dc=example,dc=com',
1215 '$DC_SERVER', '$DC_USERNAME', '$DC_PASSWORD'])
1216 elif t == "idmap.alloc":
1217 plantestsuite(t, "ad_member_rfc2307", [os.path.join(samba3srcdir, "../nsswitch/tests/test_idmap_nss.sh"), '$DOMAIN'])
1218 elif t == "idmap.rid":
1219 plantestsuite(t, "ad_member_idmap_rid", [os.path.join(samba3srcdir, "../nsswitch/tests/test_idmap_rid.sh"), '$DOMAIN', '2000000'])
1220 plantestsuite(t,
1221 "admem_idmap_autorid",
1222 [os.path.join(samba3srcdir,
1223 "../nsswitch/tests/test_idmap_rid.sh"),
1224 '$DOMAIN',
1225 '2000000'])
1226 elif t == "idmap.ad":
1227 plantestsuite(t, "ad_member_idmap_ad", [os.path.join(samba3srcdir, "../nsswitch/tests/test_idmap_ad.sh"), '$DOMAIN', '$DC_SERVER', '$DC_PASSWORD', '$TRUST_DOMAIN', '$TRUST_SERVER', '$TRUST_PASSWORD'])
1228 elif t == "raw.acls":
1229 plansmbtorture4testsuite(t, "nt4_dc_smb1", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
1230 plansmbtorture4testsuite(t, "nt4_dc_smb1", '//$SERVER_IP/nfs4acl_simple_40 -U$USERNAME%$PASSWORD', description='nfs4acl_xattr-simple-40')
1231 plansmbtorture4testsuite(t, "nt4_dc_smb1", '//$SERVER_IP/nfs4acl_special_40 -U$USERNAME%$PASSWORD', description='nfs4acl_xattr-special-40')
1232 plansmbtorture4testsuite(t, "nt4_dc_smb1", '//$SERVER_IP/nfs4acl_simple_41 -U$USERNAME%$PASSWORD', description='nfs4acl_xattr-simple-41')
1233 plansmbtorture4testsuite(t, "nt4_dc_smb1", '//$SERVER_IP/nfs4acl_xdr_40 -U$USERNAME%$PASSWORD', description='nfs4acl_xattr-xdr-40')
1234 plansmbtorture4testsuite(t, "nt4_dc_smb1", '//$SERVER_IP/nfs4acl_xdr_41 -U$USERNAME%$PASSWORD', description='nfs4acl_xattr-xdr-41')
1235 plansmbtorture4testsuite(t, "nt4_dc_smb1", '//$SERVER_IP/nfs4acl_nfs_40 -U$USERNAME%$PASSWORD', description='nfs4acl_xattr-nfs-40')
1236 plansmbtorture4testsuite(t, "nt4_dc_smb1", '//$SERVER_IP/nfs4acl_nfs_41 -U$USERNAME%$PASSWORD', description='nfs4acl_xattr-nfs-41')
1237 plansmbtorture4testsuite(t, "ad_dc_smb1", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD')
1238 elif t == "smb2.ioctl":
1239 plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/fs_specific -U$USERNAME%$PASSWORD', 'fs_specific')
1240 plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
1241 plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
1242 elif t == "smb2.ioctl-on-stream":
1243 plansmbtorture4testsuite(t, "fileserver", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
1244 elif t == "smb2.lock":
1245 plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/aio -U$USERNAME%$PASSWORD', 'aio')
1246 plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
1247 elif t == "raw.lock" or t == "base.lock":
1248 plansmbtorture4testsuite(t, "nt4_dc_smb1", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
1249 elif t == "raw.read":
1250 plansmbtorture4testsuite(t, "nt4_dc_smb1", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
1251 plansmbtorture4testsuite(t, "nt4_dc_smb1", '//$SERVER_IP/aio -U$USERNAME%$PASSWORD', 'aio')
1252 plansmbtorture4testsuite(t, "ad_dc_smb1", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
1253 elif t == "raw.search":
1254 plansmbtorture4testsuite(t, "nt4_dc_smb1", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
1255 # test the dirsort module.
1256 plansmbtorture4testsuite(t, "nt4_dc_smb1", '//$SERVER_IP/tmpsort -U$USERNAME%$PASSWORD')
1257 plansmbtorture4testsuite(t, "ad_dc_smb1", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
1258 elif t == "vfs.fruit":
1259 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')
1260 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')
1261 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')
1262 plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/vfs_fruit_delete_empty_adfiles -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/nt4_dc/share --option=torture:share2=vfs_wo_fruit', 'fruit_delete_empty_adfiles')
1263 elif t == "vfs.fruit_netatalk":
1264 plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/vfs_fruit_xattr -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/nt4_dc/share')
1265 elif t == "vfs.fruit_timemachine":
1266 plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/vfs_fruit_timemachine -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/nt4_dc/share')
1267 elif t == "vfs.fruit_file_id":
1268 plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/vfs_fruit_zero_fileid -U$USERNAME%$PASSWORD')
1269 elif t == "vfs.fruit_conversion":
1270 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')
1271 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')
1272 elif t == "vfs.unfruit":
1273 creds = '-U$USERNAME%$PASSWORD'
1274 share2 = '--option=torture:share2=tmp'
1275 netopt = '--option=torture:net=%s' % net
1276 shareopt = '--option=torture:sharename'
1278 plansmbtorture4testsuite(t, "nt4_dc:local", '//$SERVER_IP/vfs_fruit %s %s %s %s=%s' % (creds, share2, netopt, shareopt, 'vfs_fruit'), 'metadata_netatalk')
1279 plansmbtorture4testsuite(t, "nt4_dc:local", '//$SERVER_IP/vfs_fruit_metadata_stream %s %s %s %s=%s' % (creds, share2, netopt, shareopt, 'vfs_fruit_metadata_stream'), 'metadata_stream')
1280 plansmbtorture4testsuite(t, "nt4_dc:local", '//$SERVER_IP/vfs_fruit_stream_depot %s %s %s %s=%s' % (creds, share2, netopt, shareopt, 'vfs_fruit_stream_depot'), 'streams_depot')
1281 elif t == "rpc.schannel_anon_setpw":
1282 plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$%', description="anonymous password set")
1283 plansmbtorture4testsuite(t, "nt4_dc_schannel", '//$SERVER_IP/tmp -U$%', description="anonymous password set (schannel enforced server-side)")
1284 plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$%', description="anonymous password set")
1285 elif t == "local.nss":
1286 for env in ["nt4_dc:local", "ad_member:local", "nt4_member:local", "ad_dc:local"]:
1287 plansmbtorture4testsuite(t,
1288 env,
1289 '//$SERVER/tmp -U$USERNAME%$PASSWORD',
1290 environ = {
1291 'ENVNAME': env,
1293 elif t == "smb2.change_notify_disabled":
1294 plansmbtorture4testsuite(t, "simpleserver", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
1295 elif t == "smb2.notify" or t == "raw.notify" or t == "smb2.oplock" or t == "raw.oplock":
1296 tmp_env = "nt4_dc"
1297 if t == "raw.notify" or t == "raw.oplock":
1298 tmp_env = "nt4_dc_smb1"
1299 # These tests are a little slower so don't duplicate them with ad_dc
1300 plansmbtorture4testsuite(t, tmp_env, '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --client-protection=sign')
1301 elif t == "smb2.dosmode":
1302 plansmbtorture4testsuite(t, "simpleserver", '//$SERVER/dosmode -U$USERNAME%$PASSWORD')
1303 elif t == "smb2.kernel-oplocks":
1304 if have_linux_kernel_oplocks:
1305 plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER/kernel_oplocks -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/nt4_dc/share')
1306 elif t == "smb2.notify-inotify":
1307 if have_inotify:
1308 plansmbtorture4testsuite(t, "fileserver", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
1309 elif t == "vfs.acl_xattr":
1310 plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
1311 elif t == "smb2.compound_find":
1312 plansmbtorture4testsuite(t, "fileserver", '//$SERVER/compound_find -U$USERNAME%$PASSWORD')
1313 plansmbtorture4testsuite(t, "fileserver", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
1314 elif t == "smb2.compound":
1315 plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
1316 plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/aio -U$USERNAME%$PASSWORD', 'aio')
1317 plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
1318 elif t == "smb2.compound_async":
1319 plansmbtorture4testsuite(t, "fileserver", '//$SERVER_IP/aio_delay_inject -U$USERNAME%$PASSWORD')
1320 elif t == "smb2.ea":
1321 plansmbtorture4testsuite(t, "fileserver", '//$SERVER/ea_acl_xattr --option=torture:acl_xattr_name=hackme -U$USERNAME%$PASSWORD')
1322 elif t == "rpc.samba3.netlogon" or t == "rpc.samba3.sessionkey":
1323 plansmbtorture4testsuite(t, "nt4_dc_smb1", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --option=torture:wksname=samba3rpctest')
1324 plansmbtorture4testsuite(t, "ad_dc_smb1", '//$SERVER/tmp -U$USERNAME%$PASSWORD --option=torture:wksname=samba3rpctest')
1325 elif t == "smb2.streams":
1326 plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
1327 plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
1328 plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/streams_xattr -U$USERNAME%$PASSWORD', 'streams_xattr')
1329 elif t == "smb2.aio_delay":
1330 plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/aio_delay_inject -U$USERNAME%$PASSWORD')
1331 elif t == "smb2.delete-on-close-perms":
1332 plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
1333 plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/delete_readonly -U$USERNAME%$PASSWORD --option=torture:delete_readonly=true')
1334 plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
1335 elif t == "smb2.fileid":
1336 plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/vfs_fruit_xattr -U$USERNAME%$PASSWORD')
1337 elif t == "smb2.acls_non_canonical":
1338 plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/acls_non_canonical -U$USERNAME%$PASSWORD')
1339 elif t == "smb2.async_dosmode":
1340 plansmbtorture4testsuite("smb2.async_dosmode",
1341 "simpleserver",
1342 "//$SERVER_IP/async_dosmode_shadow_copy2 -U$USERNAME%$PASSWORD")
1343 elif t == "smb2.rename":
1344 plansmbtorture4testsuite(t, "fileserver", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
1345 elif t == "smb2.twrp":
1346 # This is being driven by samba3.blackbox.shadow_copy_torture
1347 pass
1348 elif t == "smb2.create_no_streams":
1349 plansmbtorture4testsuite(t, "fileserver", '//$SERVER_IP/nfs4acl_simple_40 -U$USERNAME%$PASSWORD')
1350 elif t == "rpc.wkssvc":
1351 plansmbtorture4testsuite(t, "ad_member", '//$SERVER/tmp -U$DC_USERNAME%$DC_PASSWORD')
1352 elif t == "rpc.srvsvc":
1353 plansmbtorture4testsuite(t, "ad_member", '//$SERVER/tmp -U$DC_USERNAME%$DC_PASSWORD')
1354 plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$DC_USERNAME%$DC_PASSWORD')
1355 elif t == "rpc.samba3.lsa_over_netlogon":
1356 plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
1357 elif t == "rpc.samba3.pipes_supported_interfaces":
1358 plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
1359 plansmbtorture4testsuite(t, "ad_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
1360 elif t == "rpc.spoolss.notify":
1361 plansmbtorture4testsuite(t, "ad_member", '//$SERVER_IP/tmp -U$DC_USERNAME%$DC_PASSWORD')
1362 elif (t in base and t != "base.charset") \
1363 or (t in rap and t != "rap.printing") \
1364 or (t in unix) \
1365 or (t in ["rpc.authcontext",
1366 "rpc.join",
1367 "rpc.samba3.bind",
1368 "rpc.samba3.getusername",
1369 "rpc.samba3.sharesec",
1370 "rpc.samba3.smb1-pipe-name",
1371 "rpc.samba3.smb-reauth1",
1372 "rpc.samba3.smb-reauth2",
1373 "rpc.samba3.spoolss",
1374 "rpc.samba3.wkssvc",]) \
1375 or (t in ["raw.close",
1376 "raw.composite",
1377 "raw.eas",
1378 "raw.mkdir",
1379 "raw.open",
1380 "raw.rename",
1381 "raw.samba3badnameblob",
1382 "raw.samba3badpath",
1383 "raw.samba3caseinsensitive",
1384 "raw.samba3oplocklogoff",
1385 "raw.samba3posixtimedlock",
1386 "raw.samba3rootdirfid",
1387 "raw.samba3rootdirfid2",
1388 "raw.seek",
1389 "raw.sfileinfo.bug",
1390 "raw.sfileinfo.end-of-file",
1391 "raw.sfileinfo.rename",
1392 "raw.streams",
1393 "raw.unlink",
1394 "raw.write",]) :
1395 plansmbtorture4testsuite(t, "nt4_dc_smb1", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
1396 plansmbtorture4testsuite(t, "ad_dc_smb1", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
1397 elif t in ["base.mangle", "base.tcon", "raw.mkdir"]:
1398 plansmbtorture4testsuite(t, "nt4_dc_smb1_done", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
1399 plansmbtorture4testsuite(t, "ad_dc_smb1_done", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
1400 elif t == "rpc.samr.passwords.validate":
1401 plansmbtorture4testsuite(t, "nt4_dc", 'ncacn_ip_tcp:$SERVER_IP[seal] -U$USERNAME%$PASSWORD', 'over ncacn_ip_tcp ')
1402 elif t == "rpc.samr.users.privileges":
1403 plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --option=torture:nt4_dc=true')
1404 elif t == "rpc.samr" or t.startswith("rpc.samr."):
1405 plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
1406 else:
1407 plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
1408 plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
1410 plantestsuite(
1411 "idmap_ad.ticket_expiry",
1412 "ad_member_idmap_ad:local",
1413 [os.path.join(samba3srcdir, "../nsswitch/tests/test_ticket_expiry.sh"),
1414 '$DOMAIN'])
1416 plansmbtorture4testsuite(
1417 "notifyd",
1418 "fileserver:local",
1419 '//foo/bar -U%')
1421 plansmbtorture4testsuite(
1422 "smb2.streams",
1423 "simpleserver",
1424 '//$SERVER/external_streams_depot -U$USERNAME%$PASSWORD')
1426 test = 'rpc.lsa.lookupsids'
1427 auth_options = ["", "ntlm", "spnego", "spnego,ntlm", "spnego,smb1", "spnego,smb2"]
1428 signseal_options = ["", ",connect", ",packet", ",sign", ",seal"]
1429 endianness_options = ["", ",bigendian"]
1430 for s in signseal_options:
1431 for e in endianness_options:
1432 for a in auth_options:
1433 binding_string = "ncacn_np:$SERVER[%s%s%s]" % (a, s, e)
1434 options = binding_string + " -U$USERNAME%$PASSWORD"
1435 if "smb1" in a:
1436 plansmbtorture4testsuite(test, "nt4_dc_smb1_done", options, 'over ncacn_np with [%s%s%s] ' % (a, s, e))
1437 else:
1438 plansmbtorture4testsuite(test, "nt4_dc", options, 'over ncacn_np with [%s%s%s] ' % (a, s, e))
1439 plantestsuite(
1440 f'samba3.blackbox.rpcclient over ncacn_np with [{a}{s}{e}] ',
1441 "nt4_dc:local",
1442 [os.path.join(samba3srcdir, "script/tests/test_rpcclient.sh"),
1443 "none",
1444 options + " -c getusername",
1445 configuration])
1446 plantestsuite(
1447 f'samba3.blackbox.rpcclient over ncalrpc with [{a}{s}{e}] ',
1448 "nt4_dc:local",
1449 [os.path.join(samba3srcdir, "script/tests/test_rpcclient.sh"),
1450 "none",
1451 f'ncalrpc:[{a}{s}{e}] -c epmmap',
1452 configuration])
1453 if s != ",connect":
1454 plantestsuite(
1455 f'samba3.blackbox.rpcclient over ncacn_ip_tcp with [{a}{s}{e}] ',
1456 "nt4_dc:local",
1457 [os.path.join(samba3srcdir, "script/tests/test_rpcclient.sh"),
1458 "none",
1459 f'ncacn_ip_tcp:"$SERVER_IP"[{a}{s}{e}] -c epmmap -U"$USERNAME"%"$PASSWORD"',
1460 configuration])
1462 # We should try more combinations in future, but this is all
1463 # the pre-calculated credentials cache supports at the moment
1465 # As the ktest env requires SMB3_00 we need to use "smb2" until
1466 # dcerpc client code in smbtorture support autonegotiation
1467 # of any smb dialect.
1468 e = ""
1469 a = "smb2"
1470 binding_string = "ncacn_np:$SERVER[%s%s%s]" % (a, s, e)
1471 options = binding_string + " --use-krb5-ccache=$PREFIX/ktest/krb5_ccache-2"
1472 plansmbtorture4testsuite(test, "ktest", options, 'krb5 with old ccache ncacn_np with [%s%s%s] ' % (a, s, e))
1474 options = binding_string + " --use-krb5-ccache=$PREFIX/ktest/krb5_ccache-3"
1475 plansmbtorture4testsuite(test, "ktest", options, 'krb5 ncacn_np with [%s%s%s] ' % (a, s, e))
1477 auth_options2 = ["krb5", "spnego,krb5"]
1478 for a in auth_options2:
1479 binding_string = "ncacn_np:$SERVER[%s%s%s]" % (a, s, e)
1481 plantestsuite(
1482 f'samba3.blackbox.rpcclient krb5 ncacn_np with [{a}{s}{e}] ',
1483 "ktest:local",
1484 [os.path.join(samba3srcdir, "script/tests/test_rpcclient.sh"),
1485 "$PREFIX/ktest/krb5_ccache-3",
1486 binding_string,
1487 "--use-krb5-ccache=$PREFIX/ktest/krb5_ccache-3 -c getusername",
1488 configuration])
1490 plantestsuite("samba3.blackbox.rpcclient_samlogon", "ad_member:local", [os.path.join(samba3srcdir, "script/tests/test_rpcclient_samlogon.sh"),
1491 "$DC_USERNAME", "$DC_PASSWORD", "ncacn_np:$DC_SERVER", configuration])
1492 plantestsuite("samba3.blackbox.sharesec", "simpleserver:local",
1493 [os.path.join(samba3srcdir, "script/tests/test_sharesec.sh"),
1494 configuration, os.path.join(bindir(), "sharesec"),
1495 os.path.join(bindir(), "net"), "tmp"])
1497 plantestsuite("samba3.blackbox.close-denied-share", "simpleserver:local",
1498 [os.path.join(samba3srcdir,
1499 "script/tests/test_close_denied_share.sh"),
1500 configuration,
1501 os.path.join(bindir(), "sharesec"),
1502 os.path.join(bindir(), "smbclient"),
1503 os.path.join(bindir(), "smbcontrol"),
1504 '$SERVER_IP',
1505 "tmp"])
1507 plantestsuite("samba3.blackbox.force-close-share", "simpleserver:local",
1508 [os.path.join(samba3srcdir,
1509 "script/tests/test_force_close_share.sh"),
1510 configuration,
1511 os.path.join(bindir(), "smbclient"),
1512 os.path.join(bindir(), "smbcontrol"),
1513 '$SERVER_IP',
1514 "aio_delay_inject",
1515 '$PREFIX/force-close-share'])
1517 plantestsuite("samba3.blackbox.open-eintr", "simpleserver:local",
1518 [os.path.join(samba3srcdir,
1519 "script/tests/test_open_eintr.sh"),
1520 configuration,
1521 os.path.join(bindir(), "smbclient"),
1522 os.path.join(bindir(), "smbcontrol"),
1523 '$SERVER_IP',
1524 "error_inject"])
1526 plantestsuite("samba3.blackbox.chdir-cache", "simpleserver:local",
1527 [os.path.join(samba3srcdir,
1528 "script/tests/test_chdir_cache.sh"),
1529 configuration,
1530 os.path.join(bindir(), "smbclient"),
1531 os.path.join(bindir(), "smbcontrol"),
1532 '$SERVER_IP',
1533 "error_inject",
1534 '$PREFIX',
1535 'simpleserver'])
1537 plantestsuite("samba3.blackbox.rofs_error", "simpleserver",
1538 [os.path.join(samba3srcdir, "script/tests/test_rofs.sh"),
1539 configuration,
1540 os.path.join(bindir(), "smbclient"),
1541 '$SERVER_IP',
1542 "error_inject"])
1544 plantestsuite("samba3.blackbox.zero_readsize",
1545 "simpleserver:local",
1546 [os.path.join(samba3srcdir,
1547 "script/tests/test_zero_readsize.sh"),
1548 configuration,
1549 os.path.join(bindir(), "smbclient"),
1550 os.path.join(bindir(), "smbcontrol"),
1551 '$SERVER_IP',
1552 "tmp",
1553 "$PREFIX",
1554 "-mSMB2"])
1556 plantestsuite("samba3.blackbox.netfileenum", "simpleserver:local",
1557 [os.path.join(samba3srcdir,
1558 "script/tests/test_netfileenum.sh"),
1559 os.path.join(bindir(), "smbclient"),
1560 os.path.join(bindir(), "rpcclient"),
1561 os.path.join(bindir(), "net"),
1562 '$SERVER_IP',
1563 'tmp'])
1565 plantestsuite("samba3.blackbox.netshareenum_username", "fileserver",
1566 [os.path.join(samba3srcdir,
1567 "script/tests/test_user_in_sharelist.sh"),
1568 os.path.join(bindir(), "rpcclient"),
1569 '$SERVER_IP'])
1571 plantestsuite("samba3.blackbox.net_tdb", "simpleserver:local",
1572 [os.path.join(samba3srcdir, "script/tests/test_net_tdb.sh"),
1573 smbclient3, '$SERVER', 'tmp', '$USERNAME', '$PASSWORD',
1574 configuration, '$LOCAL_PATH', '$LOCK_DIR'])
1576 plantestsuite("samba3.blackbox.aio-outstanding", "simpleserver:local",
1577 [os.path.join(samba3srcdir,
1578 "script/tests/test_aio_outstanding.sh"),
1579 configuration,
1580 os.path.join(bindir(), "smbclient"),
1581 '$SERVER_IP',
1582 "aio_delay_inject"])
1584 plantestsuite("samba3.blackbox.deadtime", "simpleserver:local",
1585 [os.path.join(samba3srcdir, "script/tests/test_deadtime.sh"),
1586 '$SERVER_IP'])
1588 plantestsuite("samba3.blackbox.smbd_error", "simpleserver:local",
1589 [os.path.join(samba3srcdir, "script/tests/test_smbd_error.sh")])
1591 plantestsuite("samba3.blackbox.smbd_no_krb5", "ad_member:local",
1592 [os.path.join(samba3srcdir, "script/tests/test_smbd_no_krb5.sh"),
1593 smbclient3, '$SERVER', "$DC_USERNAME", "$DC_PASSWORD", "$PREFIX"])
1595 plantestsuite("samba3.blackbox.winbind_ignore_domain", "ad_member_idmap_ad:local",
1596 [os.path.join(samba3srcdir, "script/tests/test_winbind_ignore_domains.sh")])
1598 plantestsuite("samba3.blackbox.durable_v2_delay", "simpleserver:local",
1599 [os.path.join(samba3srcdir, "script/tests/test_durable_handle_reconnect.sh")])
1601 plantestsuite("samba3.blackbox.net_cache_samlogon", "ad_member:local",
1602 [os.path.join(samba3srcdir, "script/tests/test_net_cache_samlogon.sh"),
1603 '$SERVER', 'tmp', '$DC_USERNAME', '$DC_PASSWORD'])
1605 plantestsuite("samba3.blackbox.net_rpc_share_allowedusers", "nt4_dc",
1606 [os.path.join(samba3srcdir, "script/tests/test_net_rpc_share_allowedusers.sh"),
1607 "$SERVER", "$USERNAME", "$PASSWORD", "$PREFIX/net_rpc_share_allowedusers",
1608 configuration])
1610 plantestsuite("samba3.blackbox.net_dom_join_fail_dc", "nt4_dc",
1611 [os.path.join(samba3srcdir, "script/tests/test_net_dom_join_fail_dc.sh"),
1612 "$USERNAME", "$PASSWORD", "$SERVER", "$PREFIX/net_dom_join_fail_dc",
1613 configuration])
1614 plantestsuite("samba3.blackbox.net_rpc_join", "nt4_dc",
1615 [os.path.join(samba3srcdir, "script/tests/test_net_rpc_join.sh"),
1616 "$USERNAME", "$PASSWORD", "$SERVER", "$PREFIX/net_rpc_join",
1617 configuration])
1618 plantestsuite("samba3.blackbox.net_rpc_oldjoin", "nt4_dc:local",
1619 [os.path.join(samba3srcdir, "script/tests/test_net_rpc_oldjoin.sh"),
1620 "$SERVER", "$PREFIX/net_rpc_oldjoin",
1621 "$SMB_CONF_PATH"])
1622 plantestsuite("samba3.blackbox.net_rpc_join_creds", "nt4_dc",
1623 [os.path.join(samba3srcdir, "script/tests/test_net_rpc_join_creds.sh"),
1624 "$DOMAIN", "$USERNAME", "$PASSWORD", "$SERVER", "$PREFIX/net_rpc_join_creds",
1625 configuration])
1627 plantestsuite("samba3.blackbox.rpcclient_srvsvc", "simpleserver",
1628 [os.path.join(samba3srcdir, "script/tests/test_rpcclientsrvsvc.sh"),
1629 "$USERNAME", "$PASSWORD", "$SERVER",
1630 os.path.join(bindir(), "rpcclient"), "tmp"])
1632 plantestsuite("samba3.blackbox.rpcclient_lookup", "simpleserver",
1633 [os.path.join(samba3srcdir, "script/tests/test_rpcclient_lookup.sh"),
1634 "$USERNAME", "$PASSWORD", "$SERVER",
1635 os.path.join(bindir(), "rpcclient")])
1637 plantestsuite("samba3.blackbox.rpcclient_dfs", "fileserver:local",
1638 [os.path.join(samba3srcdir, "script/tests/test_rpcclient_dfs.sh"),
1639 "$USERNAME", "$PASSWORD", "$SERVER",
1640 os.path.join(bindir(), "rpcclient")])
1642 plantestsuite("samba3.blackbox.rpcclient.pw-nt-hash", "simpleserver",
1643 [os.path.join(samba3srcdir, "script/tests/test_rpcclient_pw_nt_hash.sh"),
1644 "$USERNAME", "$PASSWORD", "$SERVER",
1645 os.path.join(bindir(), "rpcclient")])
1647 plantestsuite("samba3.blackbox.smbclient.encryption_off", "simpleserver",
1648 [os.path.join(samba3srcdir, "script/tests/test_smbclient_encryption_off.sh"),
1649 "$USERNAME", "$PASSWORD", "$SERVER",
1650 smbclient3])
1652 plantestsuite("samba3.blackbox.smbXsrv_client_dead_rec", "fileserver:local",
1653 [os.path.join(samba3srcdir,
1654 "script/tests/test_smbXsrv_client_dead_rec.sh"),
1655 configuration,
1656 '$SERVER_IP',
1657 "tmp"])
1659 if have_cluster_support:
1660 plantestsuite("samba3.blackbox.smbXsrv_client_cross_node", "clusteredmember:local",
1661 [os.path.join(samba3srcdir,
1662 "script/tests/test_smbXsrv_client_cross_node.sh"),
1663 configuration,
1664 'ctdb0', 'ctdb1',
1665 "tmp"])
1666 plantestsuite("samba3.blackbox.registry_share", "clusteredmember",
1667 [os.path.join(samba3srcdir,
1668 "script/tests/test_registry_share.sh"),
1669 "$SERVER", '$DC_USERNAME', "$DC_PASSWORD"])
1671 env = 'fileserver'
1672 plantestsuite("samba3.blackbox.virus_scanner", "%s:local" % (env),
1673 [os.path.join(samba3srcdir,
1674 "script/tests/test_virus_scanner.sh"),
1675 '$SERVER_IP',
1676 "virusfilter",
1677 '$LOCAL_PATH',
1678 smbclient3])
1680 for env in ['fileserver', 'simpleserver']:
1681 plantestsuite("samba3.blackbox.smbclient.encryption", env,
1682 [os.path.join(samba3srcdir, "script/tests/test_smbclient_encryption.sh"),
1683 "$USERNAME", "$PASSWORD", "$SERVER",
1684 smbclient3, env])
1686 plantestsuite("samba3.blackbox.smbclient.kerberos", 'ad_dc',
1687 [os.path.join(samba3srcdir,
1688 "script/tests/test_smbclient_kerberos.sh"),
1689 "alice",
1690 "$REALM",
1691 "Secret007",
1692 "$SERVER",
1693 smbclient3,
1694 env])
1695 for env in ['ad_dc_fips', 'ad_member_fips']:
1696 plantestsuite("samba3.blackbox.smbclient.kerberos", env,
1697 [os.path.join(samba3srcdir,
1698 "script/tests/test_smbclient_kerberos.sh"),
1699 "alice",
1700 "$REALM",
1701 "Secret007",
1702 "$SERVER",
1703 smbclient3,
1704 env],
1705 environ={'GNUTLS_FORCE_FIPS_MODE': '1',
1706 'OPENSSL_FORCE_FIPS_MODE': '1'})
1708 plantestsuite("samba3.blackbox.rpcclient_netsessenum", "ad_member",
1709 [os.path.join(samba3srcdir,
1710 "script/tests/test_rpcclient_netsessenum.sh"),
1711 "$DOMAIN", "$DC_USERNAME", "$DC_PASSWORD", "$SERVER",
1712 os.path.join(bindir(), "rpcclient"), smbtorture3, "tmp"])
1714 # The ktest environment uses:
1715 # server min protocol = SMB3_00
1716 # client max protocol = SMB3
1717 options_list = ["", "--client-protection=encrypt"]
1718 for options in options_list:
1719 plantestsuite("samba3.blackbox.smbclient_krb5 old ccache %s" % options, "ktest:local",
1720 [os.path.join(samba3srcdir, "script/tests/test_smbclient_krb5.sh"),
1721 "$PREFIX/ktest/krb5_ccache-2",
1722 smbclient3, "$SERVER", options, configuration])
1724 plantestsuite("samba3.blackbox.smbclient_krb5 new ccache %s" % options, "ktest:local",
1725 [os.path.join(samba3srcdir, "script/tests/test_smbclient_krb5.sh"),
1726 "$PREFIX/ktest/krb5_ccache-3",
1727 smbclient3, "$SERVER", options, configuration])
1729 plantestsuite("samba3.blackbox.smbclient_large_file %s krb5" % options, "ktest:local",
1730 [os.path.join(samba3srcdir, "script/tests/test_smbclient_large_file.sh"),
1731 "$PREFIX/ktest/krb5_ccache-3",
1732 smbclient3, "$SERVER", "$PREFIX", options, "--use-krb5-ccache=$PREFIX/ktest/krb5_ccache-3 " + configuration])
1734 options_list = ["-mNT1", "-mNT1 --client-protection=encrypt", "-mSMB3", "-mSMB3 --client-protection=encrypt"]
1735 for options in options_list:
1736 env = "nt4_dc"
1737 if "NT1" in options:
1738 env = "nt4_dc_smb1_done"
1739 plantestsuite("samba3.blackbox.smbclient_large_file %s NTLM" % options, "%s:local" % env,
1740 [os.path.join(samba3srcdir, "script/tests/test_smbclient_large_file.sh"),
1741 "none",
1742 smbclient3, "$SERVER", "$PREFIX", options, "-U$USERNAME%$PASSWORD " + configuration])
1744 for alias in ["foo", "bar"]:
1745 plantestsuite("samba3.blackbox.smbclient_netbios_aliases [%s]" % alias, "ad_member:local",
1746 [os.path.join(samba3srcdir, "script/tests/test_smbclient_netbios_aliases.sh"),
1747 smbclient3, alias, "$DC_USERNAME", "$DC_PASSWORD", "$PREFIX",
1748 configuration])
1750 for e in endianness_options:
1751 for a in auth_options:
1752 for s in signseal_options:
1753 binding_string = "ncacn_ip_tcp:$SERVER_IP[%s%s%s]" % (a, s, e)
1754 options = binding_string + " -U$USERNAME%$PASSWORD"
1755 plansmbtorture4testsuite(test, "nt4_dc", options, 'over ncacn_ip_tcp with [%s%s%s] ' % (a, s, e))
1757 plansmbtorture4testsuite('rpc.epmapper', 'nt4_dc:local', 'ncalrpc: -U$USERNAME%$PASSWORD', 'over ncalrpc')
1758 plansmbtorture4testsuite('rpc.fsrvp', 'nt4_dc:local', 'ncacn_np:$SERVER_IP -U$USERNAME%$PASSWORD', 'over ncacn_np')
1760 for env in ["ad_member_idmap_rid:local", "maptoguest:local"]:
1761 plantestsuite("samba3.blackbox.guest", env,
1762 [os.path.join(samba3srcdir, "script/tests/test_guest_auth.sh"),
1763 '$SERVER', smbclient3, smbcontrol, net, configuration])
1765 plantestsuite("samba3.blackbox.smbclient-mget",
1766 "fileserver",
1767 [os.path.join(samba3srcdir, "script/tests/test_smbclient_mget.sh"),
1768 smbclient3,
1769 "$SERVER",
1770 "tmp",
1771 "$USERNAME",
1772 "$PASSWORD",
1773 "valid_users"])
1775 if have_cluster_support:
1776 t = "readdir-timestamp"
1777 plantestsuite(
1778 "samba3.smbtorture_s3.plain.%s" % t,
1779 "clusteredmember",
1780 [os.path.join(samba3srcdir,
1781 "script/tests/test_smbtorture_s3.sh"),
1783 '//foo/bar',
1784 '$DOMAIN\\\\$DC_USERNAME',
1785 '$DC_PASSWORD',
1786 smbtorture3,
1788 "-b $PREFIX/clusteredmember/unclists/tmp.txt -N 5 -o 10"])
1790 plantestsuite(
1791 "samba3.net_machine_account",
1792 "clusteredmember",
1793 [os.path.join(samba3srcdir,
1794 "script/tests/test_net_machine_account.sh"),
1795 "bin/net",
1796 "$SERVERCONFFILE",
1797 "$SERVER_IP"])
1799 plantestsuite("samba3.blackbox.smbclient-bug15435",
1800 "fileserver",
1801 [os.path.join(samba3srcdir, "script/tests/test_bug15435_widelink_dfs.sh"),
1802 "$SERVER",
1803 "$SERVER_IP",
1804 "$USERNAME",
1805 "$PASSWORD",
1806 smbclient3,
1807 configuration])
1809 plantestsuite(
1810 "samba3.net_lookup_ldap",
1811 "ad_dc:local",
1812 [os.path.join(samba3srcdir,
1813 "script/tests/test_net_lookup.sh"),
1814 '$DC_SERVER',
1815 '$DC_USERNAME',
1816 '$DC_PASSWORD',
1817 "bin/net",
1818 "bin/samba-tool",
1819 '$DNSNAME'])
1821 plantestsuite("samba3.blackbox.force-user-unlink",
1822 "maptoguest:local",
1823 [os.path.join(samba3srcdir,
1824 "script/tests/test_force_user_unlink.sh")])
1826 def planclusteredmembertestsuite(tname, prefix):
1827 '''Define a clustered test for the clusteredmember environment'''
1829 tshare = 'tmp'
1831 autharg = '-U${DOMAIN}/${DC_USERNAME}%${DC_PASSWORD}'
1832 namearg = 'clustered.%s' % tname
1833 modnamearg = 'samba3.%s' % namearg
1834 extraargs = ''
1836 prefix = os.path.join(prefix, 'clusteredmember')
1837 unclist = os.path.join(prefix, 'unclists/%s.txt' % tshare)
1839 unclistarg = '--unclist=%s' % unclist
1840 sharearg = '//$SERVER_IP/%s' % tshare
1842 return selftesthelpers.plansmbtorture4testsuite(
1843 tname,
1844 'clusteredmember',
1845 [extraargs, unclistarg, sharearg, autharg, tname],
1846 target='samba3',
1847 modname=modnamearg)
1850 if have_cluster_support:
1851 CLUSTERED_TESTS = [ 'smb2.deny.deny2' ]
1853 for test in CLUSTERED_TESTS:
1854 planclusteredmembertestsuite(test, "$PREFIX")
1856 CLUSTERED_LOCAL_TESTS = [
1857 "ctdbd-conn1",
1858 "local-dbwrap-ctdb1"
1861 for t in CLUSTERED_LOCAL_TESTS:
1862 plantestsuite(
1863 "samba3.%s" % t,
1864 "clusteredmember:local",
1865 [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"),
1867 '//foo/bar',
1868 '""',
1869 '""',
1870 smbtorture3,
1871 "-N 1000 -o 2000"])
1873 if have_smb3_unix_extensions:
1874 planpythontestsuite("fileserver", "samba.tests.smb3unix")
1875 planpythontestsuite("fileserver", "samba.tests.reparsepoints")
1876 planpythontestsuite("fileserver_smb1", "samba.tests.smb2symlink")
1877 planpythontestsuite("fileserver_smb1", "samba.tests.smb1posix")