auth/credentials: don't ignore "client use kerberos" and --use-kerberos for machine...
[Samba.git] / selftest / tests.py
blobd0ce5fc6b4fb312a1cc18cbf82701345aa98e8e6
1 #!/usr/bin/python
2 # This script generates a list of testsuites that should be run as part of
3 # the Samba 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, 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/knownfail. This makes it
12 # very easy to see what functionality is still missing in Samba and makes
13 # it possible to run the testsuite against other servers, such as
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, tempfile
22 from selftesthelpers import bindir, srcdir, python
23 from selftesthelpers import planpythontestsuite, samba4srcdir
24 from selftesthelpers import plantestsuite, bbdir
25 from selftesthelpers import configuration, valgrindify
26 from selftesthelpers import skiptestsuite
28 samba4bindir = bindir()
29 try:
30 config_h = os.environ["CONFIG_H"]
31 except KeyError:
32 config_h = os.path.join(samba4bindir, "default/include/config.h")
34 # check available features
35 config_hash = dict()
36 f = open(config_h, 'r')
37 try:
38 lines = f.readlines()
39 config_hash = dict((x[0], ' '.join(x[1:]))
40 for x in map(lambda line: line.strip().split(' ')[1:],
41 list(filter(lambda line: (line[0:7] == '#define') and (len(line.split(' ')) > 2), lines))))
42 finally:
43 f.close()
45 have_man_pages_support = ("XSLTPROC_MANPAGES" in config_hash)
46 with_pam = ("WITH_PAM" in config_hash)
47 with_elasticsearch_backend = ("HAVE_SPOTLIGHT_BACKEND_ES" in config_hash)
48 pam_wrapper_so_path = config_hash.get("LIBPAM_WRAPPER_SO_PATH")
49 pam_set_items_so_path = config_hash.get("PAM_SET_ITEMS_SO_PATH")
50 have_heimdal_support = "SAMBA4_USES_HEIMDAL" in config_hash
51 using_system_gssapi = "USING_SYSTEM_GSSAPI" in config_hash
52 have_lmdb = "HAVE_LMDB" in config_hash
53 have_libldap = "HAVE_LIBLDAP" in config_hash
54 have_liblber = "HAVE_LIBLBER" in config_hash
56 planpythontestsuite("none", "samba.tests.source")
57 planpythontestsuite("none", "samba.tests.source_chars")
59 if have_man_pages_support:
60 planpythontestsuite("none", "samba.tests.docs")
62 try:
63 import testscenarios
64 except ImportError:
65 skiptestsuite("subunit", "testscenarios not available")
66 else:
67 planpythontestsuite("none", "subunit.tests.test_suite")
68 planpythontestsuite("none", "samba.tests.blackbox.ndrdump")
69 planpythontestsuite("none", "samba.tests.blackbox.check_output")
71 # LDB tests for standalone operation
72 planpythontestsuite("none", "api",
73 name="ldb.python.api",
74 extra_path=['lib/ldb/tests/python'],
75 environ={'HAVE_LMDB': str(int(have_lmdb))})
76 planpythontestsuite("none", "crash",
77 name="ldb.python.crash",
78 extra_path=['lib/ldb/tests/python'],
79 environ={'HAVE_LMDB': str(int(have_lmdb))})
80 planpythontestsuite("none", "index",
81 name="ldb.python.index",
82 extra_path=['lib/ldb/tests/python'],
83 environ={'HAVE_LMDB': str(int(have_lmdb))})
84 planpythontestsuite("none", "repack",
85 name="ldb.python.repack",
86 extra_path=['lib/ldb/tests/python'],
87 environ={'HAVE_LMDB': str(int(have_lmdb))})
89 # LDB tests for standalone operation, in the tr_TR.UTF-8 to cover
90 # dotless i locales, see
91 # https://bugzilla.samba.org/show_bug.cgi?id=15248
92 planpythontestsuite("none", "api",
93 name="ldb.python.api.tr",
94 extra_path=['lib/ldb/tests/python'],
95 environ={'LC_ALL': 'tr_TR.UTF-8',
96 'HAVE_LMDB': str(int(have_lmdb))})
97 planpythontestsuite("none", "index",
98 name="ldb.python.index.tr",
99 extra_path=['lib/ldb/tests/python'],
100 environ={'LC_ALL': 'tr_TR.UTF-8',
101 'HAVE_LMDB': str(int(have_lmdb))})
103 # LDB cmocka tests
105 ldb_test_exes = ['test_ldb_qsort',
106 'test_ldb_dn',
107 'ldb_msg_test',
108 'ldb_tdb_mod_op_test',
109 'ldb_tdb_guid_mod_op_test',
110 'ldb_tdb_kv_ops_test',
111 'ldb_tdb_test',
112 'ldb_match_test',
113 'ldb_key_value_test',
114 "test_ldb_comparison_fold",
115 # we currently don't run ldb_key_value_sub_txn_tdb_test as it
116 # tests the nested/sub transaction handling
117 # on operations which the TDB backend does not currently
118 # support
119 # 'ldb_key_value_sub_txn_tdb_test'
120 'ldb_parse_test',
121 'ldb_filter_attrs_test',
122 'ldb_filter_attrs_in_place_test',
124 # if LIB_LDAP and LIB_LBER defined, then we can test ldb_ldap backend
125 # behavior regression for bz#14413
126 if have_libldap and have_liblber:
127 ldb_test_exes += ["lldb_ldap_test"]
129 if have_lmdb:
130 ldb_test_exes += ['ldb_mdb_mod_op_test',
131 'ldb_lmdb_test',
132 # we don't want to run ldb_lmdb_size_test (which proves
133 # we can fit > 4G of data into the DB), it would fill up
134 # the disk on many of our test instances
135 'ldb_mdb_kv_ops_test',
136 'ldb_key_value_sub_txn_mdb_test',
137 'ldb_lmdb_free_list_test']
138 else:
139 ldb_test_exes += ['ldb_no_lmdb_test']
141 for ldb_test_exe in ldb_test_exes:
142 plantestsuite(f"ldb.unittests.{ldb_test_exe}", "none",
143 [os.path.join(bindir(), f"default/lib/ldb/{ldb_test_exe}")])
145 # Shell based LDB blackbox tests and the older ldbtest C tests
146 ldbdir = os.path.join(srcdir(), "lib/ldb")
147 plantestsuite("ldb.base", "none", "%s/tests/test-tdb-subunit.sh %s" % (ldbdir, samba4bindir))
149 planpythontestsuite("none", "samba.tests.credentials")
150 planpythontestsuite("none", "samba.tests.registry")
151 planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.auth")
152 planpythontestsuite("none", "samba.tests.get_opt")
153 planpythontestsuite("none", "samba.tests.cred_opt")
154 planpythontestsuite("none", "samba.tests.security")
155 planpythontestsuite("none", "samba.tests.dcerpc.misc")
156 planpythontestsuite("none", "samba.tests.dcerpc.integer")
157 planpythontestsuite("none", "samba.tests.param")
158 planpythontestsuite("none", "samba.tests.upgrade")
159 planpythontestsuite("none", "samba.tests.core")
160 planpythontestsuite("none", "samba.tests.common")
161 planpythontestsuite("none", "samba.tests.provision")
162 planpythontestsuite("none", "samba.tests.password_quality")
163 planpythontestsuite("none", "samba.tests.strings")
164 planpythontestsuite("none", "samba.tests.netcmd")
165 planpythontestsuite("none", "samba.tests.dcerpc.rpc_talloc")
166 planpythontestsuite("none", "samba.tests.dcerpc.array")
167 planpythontestsuite("none", "samba.tests.dcerpc.string_tests")
168 planpythontestsuite("none", "samba.tests.hostconfig")
169 planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.messaging")
170 planpythontestsuite("none", "samba.tests.s3param")
171 planpythontestsuite("none", "samba.tests.s3passdb")
172 planpythontestsuite("none", "samba.tests.s3registry")
173 planpythontestsuite("none", "samba.tests.s3windb")
174 planpythontestsuite("none", "samba.tests.s3idmapdb")
175 planpythontestsuite("none", "samba.tests.samba3sam")
176 planpythontestsuite("none", "samba.tests.dsdb_api")
177 planpythontestsuite("none", "samba.tests.smbconf")
178 planpythontestsuite("none", "samba.tests.logfiles")
179 planpythontestsuite("none", "samba.tests.conditional_ace_claims")
180 planpythontestsuite(
181 "none", "wafsamba.tests.test_suite",
182 extra_path=[os.path.join(samba4srcdir, "..", "buildtools"),
183 os.path.join(samba4srcdir, "..", "third_party", "waf")])
184 planpythontestsuite("fileserver", "samba.tests.smbd_fuzztest")
185 planpythontestsuite("nt4_dc_smb1", "samba.tests.dcerpc.binding")
186 planpythontestsuite('ad_dc:local', "samba.tests.dcerpc.samr_change_password")
187 planpythontestsuite('ad_dc_fips:local',
188 "samba.tests.dcerpc.samr_change_password",
189 environ={'GNUTLS_FORCE_FIPS_MODE': '1',
190 'OPENSSL_FORCE_FIPS_MODE': '1'})
192 planpythontestsuite("none", "samba.tests.safe_tarfile")
194 def cmdline(script, *args):
196 Prefix PYTHON env var and append --configurefile option to abs script path.
198 script.sh arg1 arg2
200 PYTHON=python /path/to/bbdir/script.sh arg1 arg2 \
201 --configurefile $SMB_CONF_FILE
203 return [
204 "PYTHON=%s" % python,
205 os.path.join(bbdir, script),
206 ] + list(args) + [configuration]
209 plantestsuite(
210 "samba4.blackbox.demote-saveddb", "none",
211 cmdline('demote-saveddb.sh', '$PREFIX_ABS/demote'))
213 plantestsuite(
214 "samba4.blackbox.dbcheck.alpha13", "none",
215 cmdline('dbcheck-oldrelease.sh', '$PREFIX_ABS/provision',
216 'alpha13'))
218 # same test as above but skip member link checks
219 plantestsuite(
220 "samba4.blackbox.dbcheck.alpha13.quick", "none",
221 cmdline('dbcheck-oldrelease.sh', '$PREFIX_ABS/provision',
222 'alpha13', '--quick-membership-checks'))
224 plantestsuite(
225 "samba4.blackbox.dbcheck.release-4-0-0", "none",
226 cmdline('dbcheck-oldrelease.sh', '$PREFIX_ABS/provision',
227 'release-4-0-0'))
229 # same test as above but skip member link checks
230 plantestsuite(
231 "samba4.blackbox.dbcheck.release-4-0-0.quick", "none",
232 cmdline('dbcheck-oldrelease.sh', '$PREFIX_ABS/provision',
233 'release-4-0-0', '--quick-membership-checks'))
235 plantestsuite(
236 "samba4.blackbox.dbcheck.release-4-1-0rc3", "none",
237 cmdline('dbcheck-oldrelease.sh', '$PREFIX_ABS/provision',
238 'release-4-1-0rc3'))
240 # same test as above but skip member link checks
241 plantestsuite(
242 "samba4.blackbox.dbcheck.release-4-1-0rc3.quick", "none",
243 cmdline('dbcheck-oldrelease.sh', '$PREFIX_ABS/provision',
244 'release-4-1-0rc3', '--quick-membership-checks'))
246 plantestsuite(
247 "samba4.blackbox.dbcheck.release-4-1-6-partial-object", "none",
248 cmdline('dbcheck-oldrelease.sh', '$PREFIX_ABS/provision',
249 'release-4-1-6-partial-object'))
251 # same test as above but skip member link checks
252 plantestsuite(
253 "samba4.blackbox.dbcheck.release-4-1-6-partial-object.quick", "none",
254 cmdline('dbcheck-oldrelease.sh', '$PREFIX_ABS/provision',
255 'release-4-1-6-partial-object', '--quick-membership-checks'))
257 plantestsuite(
258 "samba4.blackbox.dbcheck.release-4-5-0-pre1", "none",
259 cmdline('dbcheck-oldrelease.sh', '$PREFIX_ABS/provision',
260 'release-4-5-0-pre1'))
262 # same test as above but skip member link checks
263 plantestsuite(
264 "samba4.blackbox.dbcheck.release-4-5-0-pre1.quick", "none",
265 cmdline('dbcheck-oldrelease.sh', '$PREFIX_ABS/provision',
266 'release-4-5-0-pre1', '--quick-membership-checks'))
268 plantestsuite(
269 "samba4.blackbox.upgradeprovision.alpha13", "none",
270 cmdline('upgradeprovision-oldrelease.sh', '$PREFIX_ABS/provision',
271 'alpha13'))
273 plantestsuite(
274 "samba4.blackbox.upgradeprovision.release-4-0-0", "none",
275 cmdline('upgradeprovision-oldrelease.sh', '$PREFIX_ABS/provision',
276 'release-4-0-0'))
278 plantestsuite(
279 "samba4.blackbox.tombstones-expunge.release-4-5-0-pre1", "none",
280 cmdline('tombstones-expunge.sh', '$PREFIX_ABS/provision',
281 'release-4-5-0-pre1'))
283 plantestsuite(
284 "samba4.blackbox.dbcheck-links.release-4-5-0-pre1", "none",
285 cmdline('dbcheck-links.sh', '$PREFIX_ABS/provision',
286 'release-4-5-0-pre1'))
288 plantestsuite(
289 "samba4.blackbox.runtime-links.release-4-5-0-pre1", "none",
290 cmdline('runtime-links.sh', '$PREFIX_ABS/provision',
291 'release-4-5-0-pre1'))
293 plantestsuite(
294 "samba4.blackbox.schemaupgrade", "none",
295 cmdline('schemaupgrade.sh', '$PREFIX_ABS/provision'))
297 plantestsuite(
298 "samba4.blackbox.functionalprep", "none",
299 cmdline('functionalprep.sh', '$PREFIX_ABS/provision'))
301 plantestsuite(
302 "samba4.blackbox.test_special_group", "none",
303 cmdline('test_special_group.sh', '$PREFIX_ABS/provision'))
305 planpythontestsuite("fileserver", "samba.tests.blackbox.http_content")
306 planpythontestsuite("fileserver", "samba.tests.blackbox.http_chunk")
307 planpythontestsuite("none", "samba.tests.upgradeprovision")
308 planpythontestsuite("none", "samba.tests.xattr")
309 planpythontestsuite("none", "samba.tests.ntacls")
310 planpythontestsuite("none", "samba.tests.policy")
311 planpythontestsuite("none", "samba.tests.kcc.graph")
312 planpythontestsuite("none", "samba.tests.kcc.graph_utils")
313 planpythontestsuite("none", "samba.tests.kcc.ldif_import_export")
314 planpythontestsuite("none", "samba.tests.graph")
315 plantestsuite("wafsamba.duplicate_symbols", "none", [os.path.join(srcdir(), "buildtools/wafsamba/test_duplicate_symbol.sh")])
316 planpythontestsuite("none", "samba.tests.glue")
317 planpythontestsuite("none", "samba.tests.tdb_util")
318 planpythontestsuite("none", "samba.tests.samdb")
319 planpythontestsuite("none", "samba.tests.samdb_api")
320 planpythontestsuite("none", "samba.tests.ndr.gkdi")
321 planpythontestsuite("none", "samba.tests.ndr.gmsa")
322 planpythontestsuite("none", "samba.tests.ndr.wbint")
324 if with_pam:
325 env = "ad_member"
326 options = [
328 "description": "krb5",
329 "pam_options": "krb5_auth krb5_ccache_type=FILE:%s/krb5cc_pam_test_%%u" % (tempfile.gettempdir()),
332 "description": "default",
333 "pam_options": "",
336 for o in options:
337 description = o["description"]
338 pam_options = "'%s'" % o["pam_options"]
340 plantestsuite("samba.tests.pam_winbind(local+%s)" % description, env,
341 [os.path.join(srcdir(), "python/samba/tests/test_pam_winbind.sh"),
342 valgrindify(python), pam_wrapper_so_path,
343 "$SERVER", "$USERNAME", "$PASSWORD",
344 pam_options])
345 plantestsuite("samba.tests.pam_winbind(domain1+%s)" % description, env,
346 [os.path.join(srcdir(), "python/samba/tests/test_pam_winbind.sh"),
347 valgrindify(python), pam_wrapper_so_path,
348 "$DOMAIN", "$DC_USERNAME", "$DC_PASSWORD",
349 pam_options])
350 plantestsuite("samba.tests.pam_winbind(domain2+%s)" % description, env,
351 [os.path.join(srcdir(), "python/samba/tests/test_pam_winbind.sh"),
352 valgrindify(python), pam_wrapper_so_path,
353 "$REALM", "$DC_USERNAME", "$DC_PASSWORD",
354 pam_options])
355 plantestsuite("samba.tests.pam_winbind(domain3+%s)" % description, env,
356 [os.path.join(srcdir(), "python/samba/tests/test_pam_winbind.sh"),
357 valgrindify(python), pam_wrapper_so_path,
358 "''", "${DC_USERNAME}@${DOMAIN}", "$DC_PASSWORD",
359 pam_options])
360 plantestsuite("samba.tests.pam_winbind(domain4+%s)" % description, env,
361 [os.path.join(srcdir(), "python/samba/tests/test_pam_winbind.sh"),
362 valgrindify(python), pam_wrapper_so_path,
363 "''", "${DC_USERNAME}@${REALM}", "$DC_PASSWORD",
364 pam_options])
365 plantestsuite("samba.tests.pam_winbind(domain5+%s)" % description, env,
366 [os.path.join(srcdir(), "python/samba/tests/test_pam_winbind.sh"),
367 valgrindify(python), pam_wrapper_so_path,
368 "$REALM", "${DC_USERNAME}@${DOMAIN}", "$DC_PASSWORD",
369 pam_options])
370 plantestsuite("samba.tests.pam_winbind(domain6+%s)" % description, env,
371 [os.path.join(srcdir(), "python/samba/tests/test_pam_winbind.sh"),
372 valgrindify(python), pam_wrapper_so_path,
373 "$DOMAIN", "${DC_USERNAME}@${REALM}", "$DC_PASSWORD",
374 pam_options])
375 plantestsuite("samba.tests.pam_winbind(trust_f_both1+%s)" % description, env,
376 [os.path.join(srcdir(), "python/samba/tests/test_pam_winbind.sh"),
377 valgrindify(python), pam_wrapper_so_path,
378 "$TRUST_F_BOTH_DOMAIN",
379 "$TRUST_F_BOTH_USERNAME",
380 "$TRUST_F_BOTH_PASSWORD",
381 pam_options])
382 plantestsuite("samba.tests.pam_winbind(trust_f_both2+%s)" % description, env,
383 [os.path.join(srcdir(), "python/samba/tests/test_pam_winbind.sh"),
384 valgrindify(python), pam_wrapper_so_path,
385 "$TRUST_F_BOTH_REALM",
386 "$TRUST_F_BOTH_USERNAME",
387 "$TRUST_F_BOTH_PASSWORD",
388 pam_options])
389 plantestsuite("samba.tests.pam_winbind(trust_f_both3+%s)" % description, env,
390 [os.path.join(srcdir(), "python/samba/tests/test_pam_winbind.sh"),
391 valgrindify(python), pam_wrapper_so_path,
392 "''",
393 "${TRUST_F_BOTH_USERNAME}@${TRUST_F_BOTH_DOMAIN}",
394 "$TRUST_F_BOTH_PASSWORD",
395 pam_options])
396 plantestsuite("samba.tests.pam_winbind(trust_f_both4+%s)" % description, env,
397 [os.path.join(srcdir(), "python/samba/tests/test_pam_winbind.sh"),
398 valgrindify(python), pam_wrapper_so_path,
399 "''",
400 "${TRUST_F_BOTH_USERNAME}@${TRUST_F_BOTH_REALM}",
401 "$TRUST_F_BOTH_PASSWORD",
402 pam_options])
403 plantestsuite("samba.tests.pam_winbind(trust_f_both5+%s)" % description, env,
404 [os.path.join(srcdir(), "python/samba/tests/test_pam_winbind.sh"),
405 valgrindify(python), pam_wrapper_so_path,
406 "${TRUST_F_BOTH_REALM}",
407 "${TRUST_F_BOTH_USERNAME}@${TRUST_F_BOTH_DOMAIN}",
408 "$TRUST_F_BOTH_PASSWORD",
409 pam_options])
410 plantestsuite("samba.tests.pam_winbind(trust_f_both6+%s)" % description, env,
411 [os.path.join(srcdir(), "python/samba/tests/test_pam_winbind.sh"),
412 valgrindify(python), pam_wrapper_so_path,
413 "${TRUST_F_BOTH_DOMAIN}",
414 "${TRUST_F_BOTH_USERNAME}@${TRUST_F_BOTH_REALM}",
415 "$TRUST_F_BOTH_PASSWORD",
416 pam_options])
417 plantestsuite("samba.tests.pam_winbind(trust_e_both1+%s)" % description, env,
418 [os.path.join(srcdir(), "python/samba/tests/test_pam_winbind.sh"),
419 valgrindify(python), pam_wrapper_so_path,
420 "$TRUST_E_BOTH_DOMAIN",
421 "$TRUST_E_BOTH_USERNAME",
422 "$TRUST_E_BOTH_PASSWORD",
423 pam_options])
424 plantestsuite("samba.tests.pam_winbind(trust_e_both2+%s)" % description, env,
425 [os.path.join(srcdir(), "python/samba/tests/test_pam_winbind.sh"),
426 valgrindify(python), pam_wrapper_so_path,
427 "$TRUST_E_BOTH_REALM",
428 "$TRUST_E_BOTH_USERNAME",
429 "$TRUST_E_BOTH_PASSWORD",
430 pam_options])
431 plantestsuite("samba.tests.pam_winbind(trust_e_both3+%s)" % description, env,
432 [os.path.join(srcdir(), "python/samba/tests/test_pam_winbind.sh"),
433 valgrindify(python), pam_wrapper_so_path,
434 "''",
435 "${TRUST_E_BOTH_USERNAME}@${TRUST_E_BOTH_DOMAIN}",
436 "$TRUST_E_BOTH_PASSWORD",
437 pam_options])
438 plantestsuite("samba.tests.pam_winbind(trust_e_both4+%s)" % description, env,
439 [os.path.join(srcdir(), "python/samba/tests/test_pam_winbind.sh"),
440 valgrindify(python), pam_wrapper_so_path,
441 "''",
442 "${TRUST_E_BOTH_USERNAME}@${TRUST_E_BOTH_REALM}",
443 "$TRUST_E_BOTH_PASSWORD",
444 pam_options])
445 plantestsuite("samba.tests.pam_winbind(trust_e_both5+%s)" % description, env,
446 [os.path.join(srcdir(), "python/samba/tests/test_pam_winbind.sh"),
447 valgrindify(python), pam_wrapper_so_path,
448 "${TRUST_E_BOTH_REALM}",
449 "${TRUST_E_BOTH_USERNAME}@${TRUST_E_BOTH_DOMAIN}",
450 "$TRUST_E_BOTH_PASSWORD",
451 pam_options])
452 plantestsuite("samba.tests.pam_winbind(trust_e_both6+%s)" % description, env,
453 [os.path.join(srcdir(), "python/samba/tests/test_pam_winbind.sh"),
454 valgrindify(python), pam_wrapper_so_path,
455 "${TRUST_E_BOTH_DOMAIN}",
456 "${TRUST_E_BOTH_USERNAME}@${TRUST_E_BOTH_REALM}",
457 "$TRUST_E_BOTH_PASSWORD",
458 pam_options])
460 for authtok_options in ["", "use_authtok", "try_authtok"]:
461 _pam_options = "'%s %s'" % (o["pam_options"], authtok_options)
462 _description = "%s %s" % (description, authtok_options)
463 plantestsuite("samba.tests.pam_winbind_chauthtok(domain+%s)" % _description, env,
464 [os.path.join(srcdir(), "python/samba/tests/test_pam_winbind_chauthtok.sh"),
465 valgrindify(python), pam_wrapper_so_path, pam_set_items_so_path,
466 "$DOMAIN", "TestPamOptionsUser", "oldp@ssword0", "newp@ssword0",
467 _pam_options, 'yes',
468 "$DC_SERVER", "$DC_USERNAME", "$DC_PASSWORD"])
470 plantestsuite("samba.tests.pam_winbind_warn_pwd_expire(domain+%s)" % description, env,
471 [os.path.join(srcdir(), "python/samba/tests/test_pam_winbind_warn_pwd_expire.sh"),
472 valgrindify(python), pam_wrapper_so_path,
473 "$DOMAIN", "alice", "Secret007",
474 pam_options])
476 description = "krb5"
477 pam_options = "'krb5_auth krb5_ccache_type=FILE:%s/krb5cc_pam_test_setcred_%%u'" % (tempfile.gettempdir())
478 plantestsuite("samba.tests.pam_winbind_setcred(domain+%s)" % description, "ad_dc:local",
479 [os.path.join(srcdir(), "python/samba/tests/test_pam_winbind_setcred.sh"),
480 valgrindify(python), pam_wrapper_so_path,
481 "${DOMAIN}", "${DC_USERNAME}", "${DC_PASSWORD}",
482 pam_options])
485 plantestsuite("samba.unittests.krb5samba", "none",
486 [os.path.join(bindir(), "default/testsuite/unittests/test_krb5samba")])
487 plantestsuite("samba.unittests.lib_util_modules", "none",
488 [os.path.join(bindir(), "default/testsuite/unittests/test_lib_util_modules")])
489 plantestsuite("samba.unittests.background_send",
490 "none",
491 [os.path.join(
492 bindir(),
493 "default/testsuite/unittests/test_background_send"),
494 "$SMB_CONF_PATH"])
496 plantestsuite("samba.unittests.smb1cli_session", "none",
497 [os.path.join(bindir(), "default/libcli/smb/test_smb1cli_session")])
498 plantestsuite("samba.unittests.smb_util_translate", "none",
499 [os.path.join(bindir(), "default/libcli/smb/test_util_translate")])
501 plantestsuite("samba.unittests.talloc_keep_secret", "none",
502 [os.path.join(bindir(), "default/lib/util/test_talloc_keep_secret")])
504 plantestsuite("samba.unittests.tldap", "none",
505 [os.path.join(bindir(), "default/source3/test_tldap")])
506 plantestsuite("samba.unittests.rfc1738", "none",
507 [os.path.join(bindir(), "default/lib/util/test_rfc1738")])
508 plantestsuite("samba.unittests.kerberos", "none",
509 [os.path.join(bindir(), "test_kerberos")])
510 plantestsuite("samba.unittests.ms_fnmatch", "none",
511 [os.path.join(bindir(), "default/lib/util/test_ms_fnmatch")])
512 plantestsuite("samba.unittests.byteorder", "none",
513 [os.path.join(bindir(), "default/lib/util/test_byteorder")])
514 plantestsuite("samba.unittests.bytearray", "none",
515 [os.path.join(bindir(), "default/lib/util/test_bytearray")])
516 plantestsuite("samba.unittests.byteorder_verify", "none",
517 [os.path.join(bindir(), "default/lib/util/test_byteorder_verify")])
518 plantestsuite("samba.unittests.util_paths", "none",
519 [os.path.join(bindir(), "default/lib/util/test_util_paths")])
520 plantestsuite("samba.unittests.util", "none",
521 [os.path.join(bindir(), "default/lib/util/test_util")])
522 plantestsuite("samba.unittests.memcache", "none",
523 [os.path.join(bindir(), "default/lib/util/test_memcache")])
524 plantestsuite("samba.unittests.sys_rw", "none",
525 [os.path.join(bindir(), "default/lib/util/test_sys_rw")])
526 plantestsuite("samba.unittests.stable_sort", "none",
527 [os.path.join(bindir(), "default/lib/util/test_stable_sort")])
528 plantestsuite("samba.unittests.ntlm_check", "none",
529 [os.path.join(bindir(), "default/libcli/auth/test_ntlm_check")])
530 plantestsuite("samba.unittests.gnutls", "none",
531 [os.path.join(bindir(), "default/libcli/auth/test_gnutls")])
532 plantestsuite("samba.unittests.rc4_passwd_buffer", "none",
533 [os.path.join(bindir(), "default/libcli/auth/test_rc4_passwd_buffer")])
534 plantestsuite("samba.unittests.schannel", "none",
535 [os.path.join(bindir(), "default/libcli/auth/test_schannel")])
536 plantestsuite("samba.unittests.test_registry_regfio", "none",
537 [os.path.join(bindir(), "default/source3/test_registry_regfio")])
538 plantestsuite("samba.unittests.test_oLschema2ldif", "none",
539 [os.path.join(bindir(), "default/source4/utils/oLschema2ldif/test_oLschema2ldif")])
540 plantestsuite("samba.unittests.auth.sam", "none",
541 [os.path.join(bindir(), "test_auth_sam")])
542 if have_heimdal_support and not using_system_gssapi:
543 plantestsuite("samba.unittests.auth.heimdal_gensec_unwrap_des", "none",
544 [valgrindify(os.path.join(bindir(), "test_heimdal_gensec_unwrap_des"))])
545 plantestsuite("samba.unittests.test_wsp_parser", "none",
546 [os.path.join(bindir(), "default/libcli/wsp/test_wsp_parser")] + [configuration])
547 if with_elasticsearch_backend:
548 plantestsuite("samba.unittests.mdsparser_es", "none",
549 [os.path.join(bindir(), "default/source3/test_mdsparser_es")] + [configuration])
550 plantestsuite("samba.unittests.mdsparser_es_failures", "none",
551 [os.path.join(bindir(), "default/source3/test_mdsparser_es"),
552 " --option=elasticsearch:testmappingfailures=yes",
553 " --option=elasticsearch:ignoreunknownattribute=yes",
554 " --option=elasticsearch:ignoreunknowntype=yes"] +
555 [configuration])
556 plantestsuite("samba.unittests.credentials", "none",
557 [os.path.join(bindir(), "default/auth/credentials/test_creds")])
558 plantestsuite("samba.unittests.tsocket_bsd_addr", "none",
559 [os.path.join(bindir(), "default/lib/tsocket/test_tsocket_bsd_addr")])
560 if ("HAVE_TCP_USER_TIMEOUT" in config_hash):
561 plantestsuite("samba.unittests.tsocket_tstream", "none",
562 [os.path.join(bindir(), "default/lib/tsocket/test_tstream")],
563 environ={'SOCKET_WRAPPER_DIR': ''})
564 plantestsuite("samba.unittests.adouble", "none",
565 [os.path.join(bindir(), "test_adouble")])
566 plantestsuite("samba.unittests.gnutls_aead_aes_256_cbc_hmac_sha512", "none",
567 [os.path.join(bindir(), "test_gnutls_aead_aes_256_cbc_hmac_sha512")])
568 plantestsuite("samba.unittests.gnutls_sp800_108", "none",
569 [os.path.join(bindir(), "test_gnutls_sp800_108")])
570 plantestsuite("samba.unittests.gkdi", "none",
571 [os.path.join(bindir(), "test_gkdi")])
572 plantestsuite("samba.unittests.gkdi_key_derivation", "none",
573 [os.path.join(bindir(), "test_gkdi_key_derivation")])
574 plantestsuite("samba.unittests.encode_decode", "none",
575 [os.path.join(bindir(), "test_encode_decode")])
577 plantestsuite("samba.unittests.compression.lzxpress_huffman", "none",
578 [os.path.join(bindir(), "default/lib/compression/test_lzx_huffman")])
579 plantestsuite("samba.unittests.compression.lzxpress_plain", "none",
580 [os.path.join(bindir(),
581 "default/lib/compression/test_lzxpress_plain")])
583 plantestsuite("samba.unittests.sddl_conditional_ace", "none",
584 [os.path.join(bindir(), "test_sddl_conditional_ace")])
585 plantestsuite("samba.unittests.run_conditional_ace", "none",
586 [os.path.join(bindir(), "test_run_conditional_ace")])
587 plantestsuite("samba.unittests.claim_conversion", "none",
588 [os.path.join(bindir(), "test_claim_conversion")])