smbtorture: Fix loading of --load-list.
[Samba/id10ts.git] / source4 / selftest / tests.sh
blob4181d83ba2beccfa3f92f782751a42d41c694257
1 #!/bin/sh
2 # This script generates a list of testsuites that should be run as part of
3 # the Samba 4 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 4, 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 4 and makes
13 # it possible to run the testsuite against other servers, such as Samba 3 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 if [ ! -n "$PERL" ]
22 then
23 PERL=perl
26 if [ ! -n "$PYTHON" ]
27 then
28 PYTHON=python
31 plantestsuite() {
32 name=$1
33 env=$2
34 shift 2
35 cmdline="$*"
36 echo "-- TEST --"
37 if [ "$env" = "none" ]; then
38 echo "samba4.$name"
39 else
40 echo "samba4.$name ($env)"
42 echo $env
43 echo $cmdline
46 plantestsuite_loadlist() {
47 name=$1
48 env=$2
49 shift 2
50 cmdline="$*"
51 echo "-- TEST-LOADLIST --"
52 if [ "$env" = "none" ]; then
53 echo "samba4.$name"
54 else
55 echo "samba4.$name ($env)"
57 echo $env
58 echo $cmdline
61 skiptestsuite() {
62 name=$1
63 reason=$2
64 shift 2
65 # FIXME: Report this using subunit, but re-adjust the testsuite count somehow
66 echo "skipping $name ($reason)"
69 normalize_testname() {
70 name=$1
71 shift 1
72 echo $name | tr "A-Z- " "a-z._"
75 planperltestsuite() {
76 name=$1
77 env=$2
78 shift 2
79 cmdline="$*"
80 if $PERL -e 'eval require Test::More;' > /dev/null 2>&1; then
81 plantestsuite "$name" "$env" $PERL $cmdline "|" $TAP2SUBUNIT
82 else
83 skiptestsuite "$name" "Test::More not available"
87 plansmbtorturetestsuite() {
88 name=$1
89 env=$2
90 shift 2
91 other_args="$*"
92 modname=`normalize_testname $name`
93 cmdline="$VALGRIND $smb4torture $other_args $name"
94 plantestsuite "$modname" "$env" $cmdline
97 samba4srcdir="`dirname $0`/.."
98 samba4bindir="$BUILDDIR/bin"
99 smb4torture="$samba4bindir/smbtorture${EXEEXT}"
100 if which tap2subunit 2>/dev/null; then
101 TAP2SUBUNIT=tap2subunit
102 else
103 TAP2SUBUNIT="PYTHONPATH=$samba4srcdir/../lib/subunit/python:$samba4srcdir/../lib/testtools $PYTHON $samba4srcdir/../lib/subunit/filters/tap2subunit"
105 $smb4torture -V
107 bbdir=../testprogs/blackbox
109 prefix_abs="$SELFTEST_PREFIX/s4client"
110 CONFIGURATION="--configfile=\$SMB_CONF_PATH"
112 test -d "$prefix_abs" || mkdir "$prefix_abs"
114 TORTURE_OPTIONS=""
115 TORTURE_OPTIONS="$TORTURE_OPTIONS $CONFIGURATION"
116 TORTURE_OPTIONS="$TORTURE_OPTIONS --maximum-runtime=$SELFTEST_MAXTIME"
117 TORTURE_OPTIONS="$TORTURE_OPTIONS --target=$SELFTEST_TARGET"
118 TORTURE_OPTIONS="$TORTURE_OPTIONS --basedir=$prefix_abs"
119 if [ -z "$SELFTEST_VERBOSE" ]; then
120 TORTURE_OPTIONS="$TORTURE_OPTIONS --option=torture:progress=no"
122 TORTURE_OPTIONS="$TORTURE_OPTIONS --format=subunit"
123 if [ -n "$SELFTEST_QUICK" ]; then
124 TORTURE_OPTIONS="$TORTURE_OPTIONS --option=torture:quick=yes"
126 smb4torture="$smb4torture $TORTURE_OPTIONS"
128 echo "OPTIONS $TORTURE_OPTIONS"
130 # Simple tests for LDAP and CLDAP
132 for options in "" "--option=socket:testnonblock=true" "-U\$USERNAME%\$PASSWORD --option=socket:testnonblock=true" "-U\$USERNAME%\$PASSWORD" "-U\$USERNAME%\$PASSWORD -k yes" "-U\$USERNAME%\$PASSWORD -k no" "-U\$USERNAME%\$PASSWORD -k no --sign" "-U\$USERNAME%\$PASSWORD -k no --encrypt" "-U\$USERNAME%\$PASSWORD -k yes --encrypt" "-U\$USERNAME%\$PASSWORD -k yes --sign"; do
133 plantestsuite "ldb.ldap with options $options" dc $bbdir/test_ldb.sh ldap \$SERVER $options
134 done
135 # see if we support ldaps
136 [ -n "$CONFIG_H" ] || {
137 CONFIG_H="include/config.h"
139 if grep ENABLE_GNUTLS.1 $CONFIG_H > /dev/null; then
140 for options in "" "-U\$USERNAME%\$PASSWORD"; do
141 plantestsuite "ldb.ldaps with options $options" dc $bbdir/test_ldb.sh ldaps \$SERVER_IP $options
142 done
144 for options in "" "-U\$USERNAME%\$PASSWORD"; do
145 plantestsuite "ldb.ldapi with options $options" dc $bbdir/test_ldb.sh ldapi \$PREFIX_ABS/dc/private/ldapi $options
146 done
147 for t in `$smb4torture --list | grep "^LDAP-"`
149 plansmbtorturetestsuite "$t" dc "-U\$USERNAME%\$PASSWORD" //\$SERVER_IP/_none_
150 done
152 # only do the ldb tests when not in quick mode - they are quite slow, and ldb
153 # is now pretty well tested by the rest of the quick tests anyway
154 LDBDIR=$samba4srcdir/lib/ldb
155 export LDBDIR
156 # Don't run LDB tests when using system ldb, as we won't have ldbtest installed
157 if [ -f $samba4bindir/ldbtest ]; then
158 plantestsuite "ldbbase" none TEST_DATA_PREFIX=\$PREFIX $LDBDIR/tests/test-tdb.sh
159 else
160 skiptestsuite "ldbbase" "Using system LDB, ldbtest not available"
163 # Tests for RPC
165 # add tests to this list as they start passing, so we test
166 # that they stay passing
167 ncacn_np_tests="RPC-SCHANNEL RPC-JOIN RPC-LSA RPC-DSSETUP RPC-ALTERCONTEXT RPC-MULTIBIND RPC-NETLOGON RPC-HANDLES RPC-SAMSYNC RPC-SAMBA3-SESSIONKEY RPC-SAMBA3-GETUSERNAME RPC-SAMBA3-LSA RPC-SAMBA3-BIND RPC-SAMBA3-NETLOGON RPC-ASYNCBIND RPC-LSALOOKUP RPC-LSA-GETUSER RPC-SCHANNEL2 RPC-AUTHCONTEXT"
168 ncalrpc_tests="RPC-SCHANNEL RPC-JOIN RPC-LSA RPC-DSSETUP RPC-ALTERCONTEXT RPC-MULTIBIND RPC-NETLOGON RPC-DRSUAPI RPC-ASYNCBIND RPC-LSALOOKUP RPC-LSA-GETUSER RPC-SCHANNEL2 RPC-AUTHCONTEXT"
169 ncacn_ip_tcp_tests="RPC-SCHANNEL RPC-JOIN RPC-LSA RPC-DSSETUP RPC-ALTERCONTEXT RPC-MULTIBIND RPC-NETLOGON RPC-HANDLES RPC-DSSYNC RPC-ASYNCBIND RPC-LSALOOKUP RPC-LSA-GETUSER RPC-SCHANNEL2 RPC-AUTHCONTEXT RPC-OBJECTUUID"
170 slow_ncacn_np_tests="RPC-SAMLOGON RPC-SAMR RPC-SAMR-USERS RPC-SAMR-LARGE-DC RPC-SAMR-USERS-PRIVILEGES RPC-SAMR-PASSWORDS RPC-SAMR-PASSWORDS-PWDLASTSET"
171 slow_ncalrpc_tests="RPC-SAMR RPC-SAMR-PASSWORDS"
172 slow_ncacn_ip_tcp_tests="RPC-SAMR RPC-SAMR-PASSWORDS RPC-CRACKNAMES"
174 all_tests="$ncalrpc_tests $ncacn_np_tests $ncacn_ip_tcp_tests $slow_ncalrpc_tests $slow_ncacn_np_tests $slow_ncacn_ip_tcp_tests RPC-LSA-SECRETS RPC-SAMBA3-SHARESEC RPC-COUNTCALLS"
176 # Make sure all tests get run
177 rpc_tests=`$smb4torture --list | grep '^RPC-'`
178 drs_rpc_tests=`$smb4torture --list | grep '^DRS-RPC'`
179 rpc_tests_list="${rpc_tests} ${drs_rpc_tests}"
180 for t in $rpc_tests_list
182 echo $all_tests | grep "$t" > /dev/null
183 if [ $? -ne 0 ]
184 then
185 auto_rpc_tests="$auto_rpc_tests $t"
187 done
189 for bindoptions in seal,padcheck $VALIDATE bigendian; do
190 for transport in ncalrpc ncacn_np ncacn_ip_tcp; do
191 env="dc"
192 case $transport in
193 ncalrpc) tests=$ncalrpc_tests;env="dc:local" ;;
194 ncacn_np) tests=$ncacn_np_tests ;;
195 ncacn_ip_tcp) tests=$ncacn_ip_tcp_tests ;;
196 esac
197 for t in $tests; do
198 plantestsuite "`normalize_testname $t` on $transport with $bindoptions" $env $VALGRIND $smb4torture $transport:"\$SERVER[$bindoptions]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN $t "$*"
199 done
200 plantestsuite "rpc.samba3.sharesec on $transport with $bindoptions" $env $VALGRIND $smb4torture $transport:"\$SERVER[$bindoptions]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN --option=torture:share=tmp RPC-SAMBA3-SHARESEC "$*"
201 done
202 done
204 for bindoptions in "" $VALIDATE bigendian; do
205 for t in $auto_rpc_tests; do
206 plantestsuite "`normalize_testname $t` with $bindoptions" dc $VALGRIND $smb4torture "\$SERVER[$bindoptions]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN $t "$*"
207 done
208 done
210 t="RPC-COUNTCALLS"
211 plantestsuite "`normalize_testname $t`" dc:local $VALGRIND $smb4torture "\$SERVER[$bindoptions]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN $t "$*"
213 for bindoptions in connect $VALIDATE ; do
214 for transport in ncalrpc ncacn_np ncacn_ip_tcp; do
215 env="dc"
216 case $transport in
217 ncalrpc) tests=$slow_ncalrpc_tests; env="dc:local" ;;
218 ncacn_np) tests=$slow_ncacn_np_tests ;;
219 ncacn_ip_tcp) tests=$slow_ncacn_ip_tcp_tests ;;
220 esac
221 for t in $tests; do
222 plantestsuite "`normalize_testname $t` on $transport with $bindoptions" $env $VALGRIND $smb4torture $transport:"\$SERVER[$bindoptions]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN $t "$*"
223 done
224 done
225 done
226 # Tests for the DFS referral calls implementation
228 dfsc=`$smb4torture --list | grep "^DFS-" | xargs`
230 for t in $dfsc; do
231 plansmbtorturetestsuite "$t" dc $ADDARGS //\$SERVER/ipc$ -U"\$USERNAME"%"\$PASSWORD"
232 done
234 # Tests for the NET API (NET-API-BECOME-DC tested below against all the roles)
236 net=`$smb4torture --list | grep "^NET-" | grep -v NET-API-BECOME-DC`
238 for t in $net; do
239 plansmbtorturetestsuite "$t" dc "\$SERVER[$VALIDATE]" -U"\$USERNAME"%"\$PASSWORD" -W "\$DOMAIN" "$*"
240 done
242 # Tests for session keys and encryption of RPC pipes
243 # FIXME: Integrate these into a single smbtorture test
245 bindoptions=""
246 transport="ncacn_np"
247 for ntlmoptions in \
248 "-k no --option=usespnego=yes" \
249 "-k no --option=usespnego=yes --option=ntlmssp_client:128bit=no" \
250 "-k no --option=usespnego=yes --option=ntlmssp_client:56bit=yes" \
251 "-k no --option=usespnego=yes --option=ntlmssp_client:56bit=no" \
252 "-k no --option=usespnego=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=yes" \
253 "-k no --option=usespnego=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=no" \
254 "-k no --option=usespnego=yes --option=clientntlmv2auth=yes" \
255 "-k no --option=usespnego=yes --option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no" \
256 "-k no --option=usespnego=yes --option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=yes" \
257 "-k no --option=usespnego=no --option=clientntlmv2auth=yes" \
258 "-k no --option=gensec:spnego=no --option=clientntlmv2auth=yes" \
259 "-k no --option=usespnego=no"; do
260 name="rpc.lsa.secrets on $transport with $bindoptions with $ntlmoptions"
261 plantestsuite "$name" dc $smb4torture $transport:"\$SERVER[$bindoptions]" $ntlmoptions -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN --option=gensec:target_hostname=\$NETBIOSNAME RPC-LSA-SECRETS "$*"
262 done
264 transports="ncacn_np ncacn_ip_tcp"
266 #Kerberos varies between functional levels, so it is important to check this on all of them
267 for env in dc fl2000dc fl2003dc fl2008r2dc; do
268 for transport in $transports; do
269 plantestsuite "rpc.lsa.secrets on $transport with $bindoptions with Kerberos" $env $smb4torture $transport:"\$SERVER[$bindoptions]" -k yes -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN "--option=gensec:target_hostname=\$NETBIOSNAME" RPC-LSA-SECRETS "$*"
270 plantestsuite "rpc.lsa.secrets on $transport with $bindoptions with Kerberos - use target principal" $env $smb4torture $transport:"\$SERVER[$bindoptions]" -k yes -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN "--option=clientusespnegoprincipal=yes" "--option=gensec:target_hostname=\$NETBIOSNAME" RPC-LSA-SECRETS "$*"
271 plantestsuite "rpc.lsa.secrets on $transport with Kerberos - use Samba3 style login" $env $smb4torture $transport:"\$SERVER" -k yes -U"\$USERNAME"%"\$PASSWORD" -W "\$DOMAIN" "--option=gensec:fake_gssapi_krb5=yes" "--option=gensec:gssapi_krb5=no" "--option=gensec:target_hostname=\$NETBIOSNAME" "RPC-LSA-SECRETS-none*" "$*"
272 plantestsuite "rpc.lsa.secrets on $transport with Kerberos - use Samba3 style login, use target principal" $env $smb4torture $transport:"\$SERVER" -k yes -U"\$USERNAME"%"\$PASSWORD" -W "\$DOMAIN" "--option=clientusespnegoprincipal=yes" "--option=gensec:fake_gssapi_krb5=yes" "--option=gensec:gssapi_krb5=no" "--option=gensec:target_hostname=\$NETBIOSNAME" "RPC-LSA-SECRETS-none*" "$*"
273 plansmbtorturetestsuite NET-API-BECOME-DC $env "\$SERVER[$VALIDATE]" -U"\$USERNAME"%"\$PASSWORD" -W "\$DOMAIN" "$*"
274 plantestsuite "rpc.echo on $transport with $bindoptions and $echooptions" $env $smb4torture $transport:"\$SERVER[$bindoptions]" $ntlmoptions -U"\$USERNAME"%"\$PASSWORD" -W "\$DOMAIN" RPC-ECHO "$*"
276 # Echo tests test bulk Kerberos encryption of DCE/RPC
277 for bindoptions in connect spnego spnego,sign spnego,seal $VALIDATE padcheck bigendian bigendian,seal; do
278 echooptions="--option=socket:testnonblock=True --option=torture:quick=yes -k yes"
279 plantestsuite "rpc.echo on $transport with $bindoptions and $echooptions" $env $smb4torture $transport:"\$SERVER[$bindoptions]" $echooptions -U"\$USERNAME"%"\$PASSWORD" -W "\$DOMAIN" RPC-ECHO "$*"
280 done
281 done
282 done
284 for transport in $transports; do
285 for bindoptions in sign seal; do
286 for ntlmoptions in \
287 "--option=ntlmssp_client:ntlm2=yes --option=torture:quick=yes" \
288 "--option=ntlmssp_client:ntlm2=no --option=torture:quick=yes" \
289 "--option=ntlmssp_client:ntlm2=yes --option=ntlmssp_client:128bit=no --option=torture:quick=yes" \
290 "--option=ntlmssp_client:ntlm2=no --option=ntlmssp_client:128bit=no --option=torture:quick=yes" \
291 "--option=ntlmssp_client:ntlm2=yes --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes" \
292 "--option=ntlmssp_client:ntlm2=no --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes" \
293 "--option=clientntlmv2auth=yes --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes" \
294 "--option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:keyexchange=yes --option=torture:quick=yes" \
295 "--option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes" \
296 ; do
297 env="dc"
298 if test x"$transport" = x"ncalrpc"; then
299 env="dc:local"
301 plantestsuite "rpc.echo on $transport with $bindoptions and $ntlmoptions" $env $smb4torture $transport:"\$SERVER[$bindoptions]" $ntlmoptions -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN RPC-ECHO "$*"
302 done
303 done
304 done
306 plantestsuite "rpc.echo on ncacn_np over smb2" dc $smb4torture ncacn_np:"\$SERVER[smb2]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN RPC-ECHO "$*"
308 plantestsuite "ntp.signd" dc:local $smb4torture ncacn_np:"\$SERVER" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN NTP-SIGND "$*"
310 # Tests against the NTVFS POSIX backend
311 NTVFSARGS=""
312 NTVFSARGS="${NTVFSARGS} --option=torture:sharedelay=10000"
313 NTVFSARGS="${NTVFSARGS} --option=torture:oplocktimeout=3"
314 NTVFSARGS="${NTVFSARGS} --option=torture:writetimeupdatedelay=50000"
316 smb2=`$smb4torture --list | grep "^SMB2-" | xargs`
317 #The QFILEINFO-IPC test needs to be on ipc$
318 raw=`$smb4torture --list | grep "^RAW-" | grep -v "RAW-QFILEINFO-IPC"| xargs`
319 base=`$smb4torture --list | grep "^BASE-" | xargs`
321 for t in $base $raw $smb2; do
322 plansmbtorturetestsuite "$t" dc $ADDARGS //\$SERVER/tmp -U"\$USERNAME"%"\$PASSWORD" $NTVFSARGS
323 done
325 plansmbtorturetestsuite "RAW-QFILEINFO-IPC" dc $ADDARGS //\$SERVER/ipc$ -U"\$USERNAME"%"\$PASSWORD"
327 rap=`$smb4torture --list | grep "^RAP-" | xargs`
328 for t in $rap; do
329 plansmbtorturetestsuite "$t" dc $ADDARGS //\$SERVER/IPC\\\$ -U"\$USERNAME"%"\$PASSWORD"
330 done
332 # Tests against the NTVFS CIFS backend
333 for t in $base $raw; do
334 plantestsuite "ntvfs.cifs.`normalize_testname $t`" dc $VALGRIND $smb4torture //\$NETBIOSNAME/cifs -U"\$USERNAME"%"\$PASSWORD" $NTVFSARGS $t
335 done
337 # Local tests
339 for t in `$smb4torture --list | grep "^LOCAL-" | xargs`; do
340 plansmbtorturetestsuite "$t" none ncalrpc: "$*"
341 done
343 tdbtorture4="$samba4bindir/tdbtorture${EXEEXT}"
344 if test -f $tdbtorture4
345 then
346 plantestsuite "tdb.stress" none $VALGRIND $tdbtorture4
347 else
348 skiptestsuite "tdb.stress" "Using system TDB, tdbtorture not available"
351 plansmbtorturetestsuite "DRS-UNIT" none ncalrpc: "$*"
353 # Pidl tests
355 for f in $samba4srcdir/../pidl/tests/*.pl; do
356 planperltestsuite "pidl.`basename $f .pl`" none $f
357 done
358 planperltestsuite "selftest.samba4.pl" none $samba4srcdir/../selftest/test_samba4.pl
360 # Blackbox Tests:
361 # tests that interact directly with the command-line tools rather than using
362 # the API. These mainly test that the various command-line options of commands
363 # work correctly.
365 plantestsuite "blackbox.ndrdump" none $samba4srcdir/librpc/tests/test_ndrdump.sh
366 plantestsuite "blackbox.net" dc $samba4srcdir/utils/tests/test_net.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN"
367 plantestsuite "blackbox.kinit" dc $bbdir/test_kinit.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$REALM" "\$DOMAIN" "$PREFIX" $CONFIGURATION
368 plantestsuite "blackbox.passwords" dc:local $bbdir/test_passwords.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$REALM" "\$DOMAIN" "$PREFIX"
369 plantestsuite "blackbox.export.keytab" dc:local $bbdir/test_export_keytab.sh "\$SERVER" "\$USERNAME" "\$REALM" "\$DOMAIN" "$PREFIX"
370 plantestsuite "blackbox.cifsdd" dc $samba4srcdir/client/tests/test_cifsdd.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN"
371 plantestsuite "blackbox.nmblookup" dc $samba4srcdir/utils/tests/test_nmblookup.sh "\$NETBIOSNAME" "\$NETBIOSALIAS" "\$SERVER" "\$SERVER_IP"
372 plantestsuite "blackbox.nmblookup" member $samba4srcdir/utils/tests/test_nmblookup.sh "\$NETBIOSNAME" "\$NETBIOSALIAS" "\$SERVER" "\$SERVER_IP"
373 plantestsuite "blackbox.locktest" dc $samba4srcdir/torture/tests/test_locktest.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" "$PREFIX"
374 plantestsuite "blackbox.masktest" dc $samba4srcdir/torture/tests/test_masktest.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" "$PREFIX"
375 plantestsuite "blackbox.gentest" dc $samba4srcdir/torture/tests/test_gentest.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" "$PREFIX"
376 plantestsuite "blackbox.wbinfo" dc:local $samba4srcdir/../nsswitch/tests/test_wbinfo.sh "\$DOMAIN" "\$USERNAME" "\$PASSWORD" "dc"
377 plantestsuite "blackbox.wbinfo" member:local $samba4srcdir/../nsswitch/tests/test_wbinfo.sh "\$DOMAIN" "\$DC_USERNAME" "\$DC_PASSWORD" "member"
379 # Tests using the "Simple" NTVFS backend
381 for t in "BASE-RW1"; do
382 plantestsuite "ntvfs.simple.`normalize_testname $t`" dc $VALGRIND $smb4torture $ADDARGS //\$SERVER/simple -U"\$USERNAME"%"\$PASSWORD" $t
383 done
385 # Domain Member Tests
387 plantestsuite "rpc.echo against member server with local creds" member $VALGRIND $smb4torture ncacn_np:"\$NETBIOSNAME" -U"\$NETBIOSNAME/\$USERNAME"%"\$PASSWORD" RPC-ECHO "$*"
388 plantestsuite "rpc.echo against member server with domain creds" member $VALGRIND $smb4torture ncacn_np:"\$NETBIOSNAME" -U"\$DOMAIN/\$DC_USERNAME"%"\$DC_PASSWORD" RPC-ECHO "$*"
389 plantestsuite "rpc.samr against member server with local creds" member $VALGRIND $smb4torture ncacn_np:"\$NETBIOSNAME" -U"\$NETBIOSNAME/\$USERNAME"%"\$PASSWORD" "RPC-SAMR" "$*"
390 plantestsuite "rpc.samr.users against member server with local creds" member $VALGRIND $smb4torture ncacn_np:"\$NETBIOSNAME" -U"\$NETBIOSNAME/\$USERNAME"%"\$PASSWORD" "RPC-SAMR-USERS" "$*"
391 plantestsuite "rpc.samr.passwords against member server with local creds" member $VALGRIND $smb4torture ncacn_np:"\$NETBIOSNAME" -U"\$NETBIOSNAME/\$USERNAME"%"\$PASSWORD" "RPC-SAMR-PASSWORDS" "$*"
392 plantestsuite "blackbox.smbclient against member server with local creds" member $samba4srcdir/client/tests/test_smbclient.sh "\$NETBIOSNAME" "\$USERNAME" "\$PASSWORD" "\$NETBIOSNAME" "$PREFIX"
394 # RPC Proxy
395 plantestsuite "rpc.echo against rpc proxy with domain creds" rpc_proxy $VALGRIND $smb4torture ncacn_ip_tcp:"\$NETBIOSNAME" -U"\$DOMAIN/\$DC_USERNAME"%"\$DC_PASSWORD" RPC-ECHO "$*"
397 # Tests SMB signing
399 for mech in \
400 "-k no" \
401 "-k no --option=usespnego=no" \
402 "-k no --option=gensec:spengo=no" \
403 "-k yes" \
404 "-k yes --option=gensec:fake_gssapi_krb5=yes --option=gensec:gssapi_krb5=no"; do
405 for signing in \
406 "--signing=on" \
407 "--signing=required"; do
409 signoptions="$mech $signing"
410 name="smb.signing on with $signoptions"
411 plantestsuite "$name" dc $VALGRIND $smb4torture //"\$NETBIOSNAME"/tmp $signoptions -U"\$USERNAME"%"\$PASSWORD" BASE-XCOPY "$*"
412 done
413 done
415 for mech in \
416 "-k no" \
417 "-k no --option=usespnego=no" \
418 "-k no --option=gensec:spengo=no" \
419 "-k yes" \
420 "-k yes --option=gensec:fake_gssapi_krb5=yes --option=gensec:gssapi_krb5=no"; do
421 signoptions="$mech --signing=off"
422 name="smb.signing on with $signoptions"
423 plantestsuite "$name domain-creds" member $VALGRIND $smb4torture //"\$NETBIOSNAME"/tmp $signoptions -U"\$DC_USERNAME"%"\$DC_PASSWORD" BASE-XCOPY "$*"
424 done
425 for mech in \
426 "-k no" \
427 "-k no --option=usespnego=no" \
428 "-k no --option=gensec:spengo=no"; do
429 signoptions="$mech --signing=off"
430 name="smb.signing on with $signoptions"
431 plantestsuite "$name local-creds" member $VALGRIND $smb4torture //"\$NETBIOSNAME"/tmp $signoptions -U"\$NETBIOSNAME/\$USERNAME"%"\$PASSWORD" BASE-XCOPY "$*"
432 done
433 plantestsuite "smb.signing --signing=yes anon" dc $VALGRIND $smb4torture //"\$NETBIOSNAME"/tmp -k no --signing=yes -U% BASE-XCOPY "$*"
434 plantestsuite "smb.signing --signing=required anon" dc $VALGRIND $smb4torture //"\$NETBIOSNAME"/tmp -k no --signing=required -U% BASE-XCOPY "$*"
435 plantestsuite "smb.signing --signing=no anon" member $VALGRIND $smb4torture //"\$NETBIOSNAME"/tmp -k no --signing=no -U% BASE-XCOPY "$*"
437 NBT_TESTS=`$smb4torture --list | grep "^NBT-" | xargs`
439 for t in $NBT_TESTS; do
440 plansmbtorturetestsuite "$t" dc //\$SERVER/_none_ -U\$USERNAME%\$PASSWORD
441 done
443 WB_OPTS="--option=\"torture:strict mode=no\""
444 WB_OPTS="${WB_OPTS} --option=\"torture:timelimit=1\""
445 WB_OPTS="${WB_OPTS} --option=\"torture:winbindd_separator=/\""
446 WB_OPTS="${WB_OPTS} --option=\"torture:winbindd_netbios_name=\$SERVER\""
447 WB_OPTS="${WB_OPTS} --option=\"torture:winbindd_netbios_domain=\$DOMAIN\""
449 WINBIND_STRUCT_TESTS=`$smb4torture --list | grep "^WINBIND-STRUCT" | xargs`
450 WINBIND_NDR_TESTS=`$smb4torture --list | grep "^WINBIND-NDR" | xargs`
451 for env in dc member; do
452 for t in $WINBIND_STRUCT_TESTS; do
453 plansmbtorturetestsuite $t $env $WB_OPTS //_none_/_none_
454 done
456 for t in $WINBIND_NDR_TESTS; do
457 plansmbtorturetestsuite $t $env $WB_OPTS //_none_/_none_
458 done
459 done
461 nsstest4="$samba4bindir/nsstest${EXEEXT}"
462 if test -f $nsstest4
463 then
464 plantestsuite "nss.test using winbind" member $VALGRIND $nsstest4 $samba4bindir/shared/libnss_winbind.so
467 SUBUNITRUN="$VALGRIND $PYTHON $samba4srcdir/scripting/bin/subunitrun"
468 plantestsuite "ldb.python" none PYTHONPATH="$PYTHONPATH:$samba4srcdir/lib/ldb/tests/python/" $PYTHON $samba4srcdir/lib/ldb/tests/python/api.py
469 plantestsuite "credentials.python" none PYTHONPATH="$PYTHONPATH:$samba4srcdir/auth/credentials/tests" $SUBUNITRUN bindings
470 plantestsuite "gensec.python" none PYTHONPATH="$PYTHONPATH:$samba4srcdir/auth/gensec/tests" $SUBUNITRUN bindings
471 plantestsuite "registry.python" none PYTHONPATH="$PYTHONPATH:$samba4srcdir/lib/registry/tests/" $SUBUNITRUN bindings
472 plantestsuite "tdb.python" none PYTHONPATH="$PYTHONPATH:../lib/tdb/python/tests" $SUBUNITRUN simple
473 plantestsuite "auth.python" none PYTHONPATH="$PYTHONPATH:$samba4srcdir/auth/tests/" $SUBUNITRUN bindings
474 plantestsuite "security.python" none PYTHONPATH="$PYTHONPATH:$samba4srcdir/libcli/security/tests" $SUBUNITRUN bindings
475 plantestsuite "misc.python" none $SUBUNITRUN samba.tests.dcerpc.misc
476 plantestsuite "param.python" none PYTHONPATH="$PYTHONPATH:$samba4srcdir/param/tests" $SUBUNITRUN bindings
477 plantestsuite "upgrade.python" none $SUBUNITRUN samba.tests.upgrade
478 plantestsuite "samba.python" none $SUBUNITRUN samba.tests
479 plantestsuite "provision.python" none $SUBUNITRUN samba.tests.provision
480 plantestsuite "samba3.python" none $SUBUNITRUN samba.tests.samba3
481 plantestsuite "samr.python" dc:local $SUBUNITRUN samba.tests.dcerpc.sam
482 plantestsuite "dsdb.python" dc:local $SUBUNITRUN samba.tests.dsdb
483 plantestsuite "netcmd.python" none $SUBUNITRUN samba.tests.netcmd
484 plantestsuite "dcerpc.bare.python" dc:local $SUBUNITRUN samba.tests.dcerpc.bare
485 plantestsuite "unixinfo.python" dc:local $SUBUNITRUN samba.tests.dcerpc.unix
486 plantestsuite "samdb.python" none $SUBUNITRUN samba.tests.samdb
487 plantestsuite "shares.python" none $SUBUNITRUN samba.tests.shares
488 plantestsuite "messaging.python" none PYTHONPATH="$PYTHONPATH:$samba4srcdir/lib/messaging/tests" $SUBUNITRUN bindings
489 plantestsuite "samba3sam.python" none PYTHONPATH="$PYTHONPATH:$samba4srcdir/dsdb/samdb/ldb_modules/tests" $SUBUNITRUN samba3sam
490 plantestsuite "subunit.python" none $SUBUNITRUN subunit
491 plantestsuite "rpcecho.python" dc:local $SUBUNITRUN samba.tests.dcerpc.rpcecho
492 plantestsuite "winreg.python" dc:local $SUBUNITRUN -U\$USERNAME%\$PASSWORD samba.tests.dcerpc.registry
493 plantestsuite "ldap.python" dc PYTHONPATH="$PYTHONPATH:../lib/subunit/python:../lib/testtools" $PYTHON $samba4srcdir/lib/ldb/tests/python/ldap.py \$SERVER -U\$USERNAME%\$PASSWORD -W \$DOMAIN
494 plantestsuite "schemaInfo.python" dc PYTHONPATH="$PYTHONPATH:$samba4srcdir/lib/ldb/tests/python/" $SUBUNITRUN dsdb_schema_info -U"\$DOMAIN/\$DC_USERNAME"%"\$DC_PASSWORD"
495 plantestsuite "urgent_replication.python" dc PYTHONPATH="$PYTHONPATH:../lib/subunit/python:../lib/testtools" $PYTHON $samba4srcdir/lib/ldb/tests/python/urgent_replication.py \$PREFIX_ABS/dc/private/sam.ldb
496 for env in "dc" "fl2000dc" "fl2003dc" "fl2008r2dc"; do
497 plantestsuite "ldap_schema.python" $env PYTHONPATH="$PYTHONPATH:../lib/subunit/python:../lib/testtools" $PYTHON $samba4srcdir/lib/ldb/tests/python/ldap_schema.py \$SERVER -U\$USERNAME%\$PASSWORD -W \$DOMAIN
498 plantestsuite "ldap.possibleInferiors.python" $env $PYTHON $samba4srcdir/dsdb/samdb/ldb_modules/tests/possibleinferiors.py ldap://\$SERVER -U\$USERNAME%\$PASSWORD -W \$DOMAIN
499 plantestsuite "ldap.secdesc.python" $env PYTHONPATH="$PYTHONPATH:../lib/subunit/python:../lib/testtools" $PYTHON $samba4srcdir/lib/ldb/tests/python/sec_descriptor.py \$SERVER -U\$USERNAME%\$PASSWORD -W \$DOMAIN
500 plantestsuite "ldap.acl.python" $env PYTHONPATH="$PYTHONPATH:../lib/subunit/python:../lib/testtools" $PYTHON $samba4srcdir/lib/ldb/tests/python/acl.py \$SERVER -U\$USERNAME%\$PASSWORD -W \$DOMAIN
501 plantestsuite "ldap.passwords.python" $env PYTHONPATH="$PYTHONPATH:../lib/subunit/python:../lib/testtools" $PYTHON $samba4srcdir/lib/ldb/tests/python/passwords.py \$SERVER -U\$USERNAME%\$PASSWORD -W \$DOMAIN
502 done
503 plantestsuite "upgradeprovisiondc.python" dc:local $SUBUNITRUN samba.tests.upgradeprovisionneeddc
504 plantestsuite "upgradeprovisionnodc.python" none $SUBUNITRUN samba.tests.upgradeprovision
505 plantestsuite "xattr.python" none $SUBUNITRUN samba.tests.xattr
506 plantestsuite "ntacls.python" none $SUBUNITRUN samba.tests.ntacls
507 plantestsuite "deletetest.python" dc PYTHONPATH="$PYTHONPATH:../lib/subunit/python:../lib/testtools" $PYTHON $samba4srcdir/lib/ldb/tests/python/deletetest.py \$SERVER -U\$USERNAME%\$PASSWORD -W \$DOMAIN
508 plantestsuite "policy.python" none PYTHONPATH="$PYTHONPATH:lib/policy/tests/python" $SUBUNITRUN bindings
509 plantestsuite "blackbox.samba3dump" none $PYTHON $samba4srcdir/scripting/bin/samba3dump $samba4srcdir/../testdata/samba3
510 rm -rf $PREFIX/upgrade
511 plantestsuite "blackbox.upgrade" none $PYTHON $samba4srcdir/setup/upgrade_from_s3 --targetdir=$PREFIX/upgrade $samba4srcdir/../testdata/samba3 ../testdata/samba3/smb.conf
512 rm -rf $PREFIX/provision
513 mkdir $PREFIX/provision
514 plantestsuite "blackbox.provision.py" none PYTHON="$PYTHON" $samba4srcdir/setup/tests/blackbox_provision.sh "$PREFIX/provision"
515 plantestsuite "blackbox.provision-backend.py" none PYTHON="$PYTHON" $samba4srcdir/setup/tests/blackbox_provision-backend.sh "$PREFIX/provision"
516 plantestsuite "blackbox.upgradeprovision.py" none PYTHON="$PYTHON" $samba4srcdir/setup/tests/blackbox_upgradeprovision.sh "$PREFIX/provision"
517 plantestsuite "blackbox.setpassword.py" none PYTHON="$PYTHON" $samba4srcdir/setup/tests/blackbox_setpassword.sh "$PREFIX/provision"
518 plantestsuite "blackbox.newuser.py" none PYTHON="$PYTHON" $samba4srcdir/setup/tests/blackbox_newuser.sh "$PREFIX/provision"
519 plantestsuite "blackbox.group.py" none PYTHON="$PYTHON" $samba4srcdir/setup/tests/blackbox_group.sh "$PREFIX/provision"
520 plantestsuite_loadlist "blaat" none PYTHON="$PYTHON" "$samba4srcdir/record.py"