selftest: Fix use of --load-list.
[sfrench/samba-autobuild/.git] / source4 / selftest / tests.sh
1 #!/bin/sh
2 # This script generates a list of testsuites that should be run as part of 
3 # the Samba 4 test suite.
4
5 # The output of this script is parsed by selftest.pl, which then decides 
6 # which of the tests to actually run. It will, for example, skip all tests 
7 # listed in selftest/skip or only run a subset during "make quicktest".
8
9 # The idea is that this script outputs all of the tests of Samba 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.
15
16 # The syntax for a testsuite is "-- TEST --" on a single line, followed 
17 # by the name of the test, the environment it needs and the command to run, all 
18 # three separated by newlines. All other lines in the output are considered 
19 # comments.
20
21 if [ ! -n "$PERL" ]
22 then
23         PERL=perl
24 fi
25
26 if [ ! -n "$PYTHON" ]
27 then
28         PYTHON=python
29 fi
30
31 plantestsuite() {
32         name=$1
33         env=$2
34         shift 2
35         cmdline="$*"
36         echo "-- TEST --"
37         if [ "$env" = "none" ]; then
38                 fullname="$name"
39         else
40                 fullname="$name ($env)"
41         fi
42         echo $fullname
43         echo $env
44         echo "$cmdline 2>&1 | ../selftest/filter-subunit --prefix=\"$fullname.\""
45 }
46
47 plantestsuite_loadlist() {
48         name=$1
49         env=$2
50         shift 2
51         cmdline="$*"
52         echo "-- TEST-LOADLIST --"
53         if [ "$env" = "none" ]; then
54                 fullname="$name"
55         else
56                 fullname="$name ($env)"
57         fi
58         echo $fullname
59         echo $env
60         echo "$cmdline \$LOADLIST 2>&1 | ../selftest/filter-subunit --prefix=\"$fullname.\""
61 }
62
63 plantestsuite_idlist() {
64         name=$1
65         env=$2
66         shift 2
67         cmdline="$*"
68         echo "-- TEST-IDLIST --"
69         if [ "$env" = "none" ]; then
70                 fullname="$name"
71         else
72                 fullname="$name ($env)"
73         fi
74         echo $fullname
75         echo $env
76         echo $cmdline
77 }
78
79 skiptestsuite() {
80         name=$1
81         reason=$2
82         shift 2
83         # FIXME: Report this using subunit, but re-adjust the testsuite count somehow
84         echo "skipping $name ($reason)"
85 }
86
87 normalize_testname() {
88         name=$1
89         shift 1
90         echo $name | tr "A-Z- " "a-z._"
91 }
92
93 planperltestsuite() {
94         name=$1
95         env=$2
96         shift 2
97         cmdline="$*"
98         if $PERL -e 'eval require Test::More;' > /dev/null 2>&1; then
99                 plantestsuite "$name" "$env" $PERL $cmdline "|" $TAP2SUBUNIT 
100         else
101                 skiptestsuite "$name" "Test::More not available"
102         fi
103 }
104
105 planpythontestsuite() {
106         env=$1
107         module=$2
108         shift 2
109         plantestsuite_idlist "$module" "$env" PYTHONPATH=$PYTHONPATH:$samba4srcdir/../lib/subunit/python:$samba4srcdir/../lib/testtools $PYTHON -m subunit.run $module
110 }
111
112 plansmbtorturetestsuite() {
113         name=$1
114         env=$2
115         shift 2
116         other_args="$*"
117         modname="samba4.`normalize_testname $name`"
118         cmdline="$VALGRIND $smb4torture $other_args $name"
119         plantestsuite_loadlist "$modname" "$env" $cmdline
120 }
121
122 samba4srcdir="`dirname $0`/.."
123 if [ -z "$BUILDDIR" ]; then
124         BUILDDIR="$samba4srcdir"
125 fi
126 samba4bindir="$BUILDDIR/bin"
127 smb4torture="$samba4bindir/smbtorture${EXEEXT}"
128 if which tap2subunit 2>/dev/null; then
129         TAP2SUBUNIT=tap2subunit
130 else
131         TAP2SUBUNIT="PYTHONPATH=$samba4srcdir/../lib/subunit/python:$samba4srcdir/../lib/testtools $PYTHON $samba4srcdir/../lib/subunit/filters/tap2subunit"
132 fi
133 $smb4torture -V
134
135 bbdir=../testprogs/blackbox
136
137 CONFIGURATION="--configfile=\$SMB_CONF_PATH"
138
139 rm -rf $SELFTEST_PREFIX/s4client
140 mkdir -p $SELFTEST_PREFIX/s4client
141
142 TORTURE_OPTIONS=""
143 TORTURE_OPTIONS="$TORTURE_OPTIONS $CONFIGURATION"
144 TORTURE_OPTIONS="$TORTURE_OPTIONS --maximum-runtime=$SELFTEST_MAXTIME"
145 TORTURE_OPTIONS="$TORTURE_OPTIONS --target=$SELFTEST_TARGET"
146 TORTURE_OPTIONS="$TORTURE_OPTIONS --basedir=$SELFTEST_PREFIX/s4client"
147 if [ -z "$SELFTEST_VERBOSE" ]; then
148         TORTURE_OPTIONS="$TORTURE_OPTIONS --option=torture:progress=no"
149 fi
150 TORTURE_OPTIONS="$TORTURE_OPTIONS --format=subunit"
151 if [ -n "$SELFTEST_QUICK" ]; then
152         TORTURE_OPTIONS="$TORTURE_OPTIONS --option=torture:quick=yes"
153 fi
154 smb4torture="$smb4torture $TORTURE_OPTIONS"
155
156 echo "OPTIONS $TORTURE_OPTIONS"
157
158 # Simple tests for LDAP and CLDAP
159
160 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
161         plantestsuite "ldb.ldap with options $options" dc $bbdir/test_ldb.sh ldap \$SERVER $options
162 done
163 # see if we support ldaps
164 [ -n "$CONFIG_H" ] || {
165         CONFIG_H="$samba4bindir/default/source4/include/config.h"
166 }
167 if grep ENABLE_GNUTLS.1 $CONFIG_H > /dev/null; then
168         for options in "" "-U\$USERNAME%\$PASSWORD"; do
169                 plantestsuite "ldb.ldaps with options $options" dc $bbdir/test_ldb.sh ldaps \$SERVER_IP $options
170         done
171 fi
172 for options in "" "-U\$USERNAME%\$PASSWORD"; do
173     plantestsuite "ldb.ldapi with options $options" dc:local $bbdir/test_ldb.sh ldapi \$PREFIX_ABS/dc/private/ldapi $options
174 done
175 for t in `$smb4torture --list | grep "^LDAP-"`
176 do
177         plansmbtorturetestsuite "$t" dc "-U\$USERNAME%\$PASSWORD" //\$SERVER_IP/_none_
178 done
179
180 LDBDIR=$samba4srcdir/lib/ldb
181 export LDBDIR
182 # Don't run LDB tests when using system ldb, as we won't have ldbtest installed
183 if [ -f $samba4bindir/ldbtest ]; then
184         plantestsuite "ldbbase" none TEST_DATA_PREFIX=\$PREFIX $LDBDIR/tests/test-tdb.sh
185 else
186         skiptestsuite "ldbbase" "Using system LDB, ldbtest not available"
187 fi
188
189 # Tests for RPC
190
191 # add tests to this list as they start passing, so we test
192 # that they stay passing
193 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"
194 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"
195 drs_rpc_tests=`$smb4torture --list | grep '^DRS-RPC'`
196 ncacn_ip_tcp_tests="RPC-SCHANNEL RPC-JOIN RPC-LSA RPC-DSSETUP RPC-ALTERCONTEXT RPC-MULTIBIND RPC-NETLOGON RPC-HANDLES RPC-ASYNCBIND RPC-LSALOOKUP RPC-LSA-GETUSER RPC-SCHANNEL2 RPC-AUTHCONTEXT RPC-OBJECTUUID $drs_rpc_tests"
197 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"
198 slow_ncalrpc_tests="RPC-SAMR RPC-SAMR-PASSWORDS"
199 slow_ncacn_ip_tcp_tests="RPC-SAMR RPC-SAMR-PASSWORDS RPC-CRACKNAMES"
200
201 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"
202
203 # Make sure all tests get run
204 rpc_tests=`$smb4torture --list | grep '^RPC-'`
205 rpc_tests_list="${rpc_tests}"
206 for t in $rpc_tests_list
207 do
208         echo $all_tests | grep "$t"  > /dev/null
209         if [ $? -ne 0 ]
210         then
211                 auto_rpc_tests="$auto_rpc_tests $t"
212         fi
213 done
214
215 for bindoptions in seal,padcheck $VALIDATE bigendian; do
216         for transport in ncalrpc ncacn_np ncacn_ip_tcp; do
217                 env="dc"
218                 case $transport in
219                          ncalrpc) tests=$ncalrpc_tests;env="dc:local" ;;
220                          ncacn_np) tests=$ncacn_np_tests ;;
221                          ncacn_ip_tcp) tests=$ncacn_ip_tcp_tests ;;
222                 esac
223                 for t in $tests; do
224                         plantestsuite_loadlist "samba4.`normalize_testname $t` on $transport with $bindoptions" $env $VALGRIND $smb4torture $transport:"\$SERVER[$bindoptions]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN $t "$*"
225                 done
226                 plantestsuite_loadlist "samba4.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 "$*"
227         done
228 done
229
230 for bindoptions in "" $VALIDATE bigendian; do
231         for t in $auto_rpc_tests; do
232                 plantestsuite_loadlist "samba4.`normalize_testname $t` with $bindoptions" dc $VALGRIND $smb4torture "\$SERVER[$bindoptions]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN $t "$*"
233         done
234 done
235
236 t="RPC-COUNTCALLS"
237 plantestsuite_loadlist "samba4.`normalize_testname $t`" dc:local $VALGRIND $smb4torture "\$SERVER[$bindoptions]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN $t "$*"
238
239 for bindoptions in connect $VALIDATE ; do
240         for transport in ncalrpc ncacn_np ncacn_ip_tcp; do
241                 env="dc"
242                 case $transport in
243                         ncalrpc) tests=$slow_ncalrpc_tests; env="dc:local" ;;
244                         ncacn_np) tests=$slow_ncacn_np_tests ;;
245                         ncacn_ip_tcp) tests=$slow_ncacn_ip_tcp_tests ;;
246                 esac
247                 for t in $tests; do
248                         plantestsuite_loadlist "samba4.`normalize_testname $t` on $transport with $bindoptions" $env $VALGRIND $smb4torture $transport:"\$SERVER[$bindoptions]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN $t "$*"
249                 done
250         done
251 done
252 # Tests for the DFS referral calls implementation
253
254 dfsc=`$smb4torture --list | grep "^DFS-" | xargs`
255
256 for t in $dfsc; do
257         plansmbtorturetestsuite "$t" dc $ADDARGS //\$SERVER/ipc$ -U"\$USERNAME"%"\$PASSWORD"
258 done
259
260 # Tests for the NET API (NET-API-BECOME-DC tested below against all the roles)
261
262 net=`$smb4torture --list | grep "^NET-" | grep -v NET-API-BECOME-DC`
263
264 for t in $net; do
265         plansmbtorturetestsuite "$t" dc "\$SERVER[$VALIDATE]" -U"\$USERNAME"%"\$PASSWORD" -W "\$DOMAIN" "$*"
266 done
267
268 # Tests for session keys and encryption of RPC pipes
269 # FIXME: Integrate these into a single smbtorture test
270
271 bindoptions=""
272 transport="ncacn_np"
273 for ntlmoptions in \
274     "-k no --option=usespnego=yes" \
275     "-k no --option=usespnego=yes --option=ntlmssp_client:128bit=no" \
276     "-k no --option=usespnego=yes --option=ntlmssp_client:56bit=yes" \
277     "-k no --option=usespnego=yes --option=ntlmssp_client:56bit=no" \
278     "-k no --option=usespnego=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=yes" \
279     "-k no --option=usespnego=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=no" \
280     "-k no --option=usespnego=yes --option=clientntlmv2auth=yes" \
281     "-k no --option=usespnego=yes --option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no" \
282     "-k no --option=usespnego=yes --option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=yes" \
283     "-k no --option=usespnego=no --option=clientntlmv2auth=yes" \
284     "-k no --option=gensec:spnego=no --option=clientntlmv2auth=yes" \
285     "-k no --option=usespnego=no"; do
286     name="rpc.lsa.secrets on $transport with $bindoptions with $ntlmoptions"
287         plantestsuite_loadlist "samba4.$name" dc $smb4torture $transport:"\$SERVER[$bindoptions]"  $ntlmoptions -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN --option=gensec:target_hostname=\$NETBIOSNAME RPC-LSA-SECRETS "$*"
288 done
289
290 transports="ncacn_np ncacn_ip_tcp"
291
292 #Kerberos varies between functional levels, so it is important to check this on all of them
293 for env in dc fl2000dc fl2003dc fl2008r2dc; do
294         for transport in $transports; do
295                 plantestsuite_loadlist "samba4.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 "$*"
296                 plantestsuite_loadlist "samba4.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 "$*"
297                 plantestsuite_loadlist "samba4.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*" "$*"
298                 plantestsuite_loadlist "samba4.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*" "$*"
299                 plansmbtorturetestsuite NET-API-BECOME-DC $env "\$SERVER[$VALIDATE]" -U"\$USERNAME"%"\$PASSWORD" -W "\$DOMAIN" "$*"
300                 plantestsuite_loadlist "samba4.rpc.echo on $transport with $bindoptions and $echooptions" $env $smb4torture $transport:"\$SERVER[$bindoptions]" $ntlmoptions -U"\$USERNAME"%"\$PASSWORD" -W "\$DOMAIN" RPC-ECHO "$*"
301
302                 # Echo tests test bulk Kerberos encryption of DCE/RPC
303                 for bindoptions in connect spnego spnego,sign spnego,seal $VALIDATE padcheck bigendian bigendian,seal; do
304                         echooptions="--option=socket:testnonblock=True --option=torture:quick=yes -k yes"
305                         plantestsuite_loadlist "samba4.rpc.echo on $transport with $bindoptions and $echooptions" $env $smb4torture $transport:"\$SERVER[$bindoptions]" $echooptions -U"\$USERNAME"%"\$PASSWORD" -W "\$DOMAIN" RPC-ECHO "$*"
306                 done
307         done
308 done
309
310 for transport in $transports; do
311         for bindoptions in sign seal; do
312         for ntlmoptions in \
313         "--option=ntlmssp_client:ntlm2=yes --option=torture:quick=yes" \
314         "--option=ntlmssp_client:ntlm2=no --option=torture:quick=yes" \
315         "--option=ntlmssp_client:ntlm2=yes --option=ntlmssp_client:128bit=no --option=torture:quick=yes" \
316         "--option=ntlmssp_client:ntlm2=no --option=ntlmssp_client:128bit=no --option=torture:quick=yes" \
317         "--option=ntlmssp_client:ntlm2=yes --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes" \
318         "--option=ntlmssp_client:ntlm2=no --option=ntlmssp_client:keyexchange=no  --option=torture:quick=yes" \
319         "--option=clientntlmv2auth=yes --option=ntlmssp_client:keyexchange=no  --option=torture:quick=yes" \
320         "--option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:keyexchange=yes --option=torture:quick=yes" \
321         "--option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes" \
322     ; do
323                         env="dc"
324                         if test x"$transport" = x"ncalrpc"; then
325                                 env="dc:local"
326                         fi
327                         plantestsuite_loadlist "samba4.rpc.echo on $transport with $bindoptions and $ntlmoptions" $env $smb4torture $transport:"\$SERVER[$bindoptions]" $ntlmoptions -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN RPC-ECHO "$*"
328                 done
329         done
330 done
331
332 plantestsuite_loadlist "samba4.rpc.echo on ncacn_np over smb2" dc $smb4torture ncacn_np:"\$SERVER[smb2]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN RPC-ECHO "$*"
333
334 plantestsuite_loadlist "samba4.ntp.signd" dc:local $smb4torture ncacn_np:"\$SERVER" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN NTP-SIGND "$*"
335
336 # Tests against the NTVFS POSIX backend
337 NTVFSARGS=""
338 NTVFSARGS="${NTVFSARGS} --option=torture:sharedelay=10000"
339 NTVFSARGS="${NTVFSARGS} --option=torture:oplocktimeout=3"
340 NTVFSARGS="${NTVFSARGS} --option=torture:writetimeupdatedelay=50000"
341
342 smb2=`$smb4torture --list | grep "^SMB2-" | xargs`
343 #The QFILEINFO-IPC test needs to be on ipc$
344 raw=`$smb4torture --list | grep "^RAW-" | grep -v "RAW-QFILEINFO-IPC"| xargs`
345 base=`$smb4torture --list | grep "^BASE-" | xargs`
346
347 for t in $base $raw $smb2; do
348         plansmbtorturetestsuite "$t" dc $ADDARGS //\$SERVER/tmp -U"\$USERNAME"%"\$PASSWORD" $NTVFSARGS
349 done
350
351 plansmbtorturetestsuite "RAW-QFILEINFO-IPC" dc $ADDARGS //\$SERVER/ipc$ -U"\$USERNAME"%"\$PASSWORD"
352
353 rap=`$smb4torture --list | grep "^RAP-" | xargs`
354 for t in $rap; do
355         plansmbtorturetestsuite "$t" dc $ADDARGS //\$SERVER/IPC\\\$ -U"\$USERNAME"%"\$PASSWORD"
356 done
357
358 # Tests against the NTVFS CIFS backend
359 for t in $base $raw; do
360     plantestsuite_loadlist "samba4.ntvfs.cifs.`normalize_testname $t`" dc $VALGRIND $smb4torture //\$NETBIOSNAME/cifs -U"\$USERNAME"%"\$PASSWORD" $NTVFSARGS $t
361 done
362
363 # Local tests
364
365 for t in `$smb4torture --list | grep "^LOCAL-" | xargs`; do
366         plansmbtorturetestsuite "$t" none ncalrpc: "$*"
367 done
368
369 tdbtorture4="$samba4bindir/tdbtorture${EXEEXT}"
370 if test -f $tdbtorture4
371 then
372         plantestsuite "tdb.stress" none $VALGRIND $tdbtorture4
373 else
374         skiptestsuite "tdb.stress" "Using system TDB, tdbtorture not available"
375 fi
376
377 plansmbtorturetestsuite "DRS-UNIT" none ncalrpc: "$*"
378
379 # Pidl tests
380 for f in $samba4srcdir/../pidl/tests/*.pl; do
381         planperltestsuite "pidl.`basename $f .pl`" none $f
382 done
383 planperltestsuite "selftest.samba4" none $samba4srcdir/../selftest/test_samba4.pl
384
385 # Blackbox Tests:
386 # tests that interact directly with the command-line tools rather than using 
387 # the API. These mainly test that the various command-line options of commands 
388 # work correctly.
389
390 planpythontestsuite none samba.tests.blackbox.ndrdump
391 plantestsuite "samba4.blackbox.net" dc:local $samba4srcdir/utils/tests/test_net.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN"
392 plantestsuite "samba4.blackbox.pkinit" dc:local $bbdir/test_pkinit.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$REALM" "\$DOMAIN" "$PREFIX" aes256-cts-hmac-sha1-96 $CONFIGURATION 
393 plantestsuite "samba4.blackbox.kinit" dc:local $bbdir/test_kinit.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$REALM" "\$DOMAIN" "$PREFIX" aes256-cts-hmac-sha1-96 $CONFIGURATION
394 plantestsuite "samba4.blackbox.kinit" fl2000dc:local $bbdir/test_kinit.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$REALM" "\$DOMAIN" "$PREFIX" arcfour-hmac-md5 $CONFIGURATION
395 plantestsuite "samba4.blackbox.kinit" fl2008r2dc:local $bbdir/test_kinit.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$REALM" "\$DOMAIN" "$PREFIX" aes256-cts-hmac-sha1-96 $CONFIGURATION
396 plantestsuite "samba4.blackbox.ktpass" dc $bbdir/test_ktpass.sh $PREFIX
397 plantestsuite "samba4.blackbox.passwords" dc:local $bbdir/test_passwords.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$REALM" "\$DOMAIN" "$PREFIX"
398 plantestsuite "samba4.blackbox.export.keytab" dc:local $bbdir/test_export_keytab.sh "\$SERVER" "\$USERNAME" "\$REALM" "\$DOMAIN" "$PREFIX"
399 plantestsuite "samba4.blackbox.cifsdd" dc $samba4srcdir/client/tests/test_cifsdd.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" 
400 plantestsuite "samba4.blackbox.nmblookup" dc $samba4srcdir/utils/tests/test_nmblookup.sh "\$NETBIOSNAME" "\$NETBIOSALIAS" "\$SERVER" "\$SERVER_IP" 
401 plantestsuite "samba4.blackbox.nmblookup" member $samba4srcdir/utils/tests/test_nmblookup.sh "\$NETBIOSNAME" "\$NETBIOSALIAS" "\$SERVER" "\$SERVER_IP"
402 plantestsuite "samba4.blackbox.locktest" dc $samba4srcdir/torture/tests/test_locktest.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" "$PREFIX"
403 plantestsuite "samba4.blackbox.masktest" dc $samba4srcdir/torture/tests/test_masktest.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" "$PREFIX"
404 plantestsuite "samba4.blackbox.gentest" dc $samba4srcdir/torture/tests/test_gentest.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" "$PREFIX"
405 plantestsuite "samba4.blackbox.wbinfo" dc:local $samba4srcdir/../nsswitch/tests/test_wbinfo.sh "\$DOMAIN" "\$USERNAME" "\$PASSWORD" "dc"
406 plantestsuite "samba4.blackbox.wbinfo" member:local $samba4srcdir/../nsswitch/tests/test_wbinfo.sh "\$DOMAIN" "\$DC_USERNAME" "\$DC_PASSWORD" "member"
407 plantestsuite "samba4.blackbox.chgdcpass" dc $bbdir/test_chgdcpass.sh "\$SERVER" "LOCALDC\\\$" "\$REALM" "\$DOMAIN" "$PREFIX" aes256-cts-hmac-sha1-96 $SELFTEST_PREFIX/dc
408
409 # Tests using the "Simple" NTVFS backend
410 for t in "BASE-RW1"; do
411         plantestsuite_loadlist "samba4.ntvfs.simple.`normalize_testname $t`" dc $VALGRIND $smb4torture $ADDARGS //\$SERVER/simple -U"\$USERNAME"%"\$PASSWORD" $t
412 done
413
414 # Domain Member Tests
415 plantestsuite_loadlist "samba4.rpc.echo against member server with local creds" member $VALGRIND $smb4torture ncacn_np:"\$NETBIOSNAME" -U"\$NETBIOSNAME/\$USERNAME"%"\$PASSWORD" RPC-ECHO "$*"
416 plantestsuite_loadlist "samba4.rpc.echo against member server with domain creds" member $VALGRIND $smb4torture ncacn_np:"\$NETBIOSNAME" -U"\$DOMAIN/\$DC_USERNAME"%"\$DC_PASSWORD" RPC-ECHO "$*"
417 plantestsuite_loadlist "samba4.rpc.samr against member server with local creds" member $VALGRIND $smb4torture ncacn_np:"\$NETBIOSNAME" -U"\$NETBIOSNAME/\$USERNAME"%"\$PASSWORD" "RPC-SAMR" "$*"
418 plantestsuite_loadlist "samba4.rpc.samr.users against member server with local creds" member $VALGRIND $smb4torture ncacn_np:"\$NETBIOSNAME" -U"\$NETBIOSNAME/\$USERNAME"%"\$PASSWORD" "RPC-SAMR-USERS" "$*"
419 plantestsuite_loadlist "samba4.rpc.samr.passwords against member server with local creds" member $VALGRIND $smb4torture ncacn_np:"\$NETBIOSNAME" -U"\$NETBIOSNAME/\$USERNAME"%"\$PASSWORD" "RPC-SAMR-PASSWORDS" "$*"
420 plantestsuite "samba4.blackbox.smbclient against member server with local creds" member $samba4srcdir/client/tests/test_smbclient.sh "\$NETBIOSNAME" "\$USERNAME" "\$PASSWORD" "\$NETBIOSNAME" "$PREFIX" 
421
422 # RPC Proxy
423 plantestsuite_loadlist "samba4.rpc.echo against rpc proxy with domain creds" rpc_proxy $VALGRIND $smb4torture ncacn_ip_tcp:"\$NETBIOSNAME" -U"\$DOMAIN/\$DC_USERNAME"%"\$DC_PASSWORD" RPC-ECHO "$*"
424
425 # Tests SMB signing
426 for mech in \
427         "-k no" \
428         "-k no --option=usespnego=no" \
429         "-k no --option=gensec:spengo=no" \
430         "-k yes" \
431         "-k yes --option=gensec:fake_gssapi_krb5=yes --option=gensec:gssapi_krb5=no"; do
432    for signing in \
433         "--signing=on" \
434         "--signing=required"; do
435
436         signoptions="$mech $signing"
437         name="smb.signing on with $signoptions"
438         plantestsuite_loadlist "samba4.$name" dc $VALGRIND $smb4torture //"\$NETBIOSNAME"/tmp $signoptions -U"\$USERNAME"%"\$PASSWORD" BASE-XCOPY "$*"
439    done
440 done
441
442 for mech in \
443         "-k no" \
444         "-k no --option=usespnego=no" \
445         "-k no --option=gensec:spengo=no" \
446         "-k yes" \
447         "-k yes --option=gensec:fake_gssapi_krb5=yes --option=gensec:gssapi_krb5=no"; do
448         signoptions="$mech --signing=off"
449         name="smb.signing on with $signoptions"
450         plantestsuite_loadlist "samba4.$name domain-creds" member $VALGRIND $smb4torture //"\$NETBIOSNAME"/tmp $signoptions -U"\$DC_USERNAME"%"\$DC_PASSWORD" BASE-XCOPY "$*"
451 done
452 for mech in \
453         "-k no" \
454         "-k no --option=usespnego=no" \
455         "-k no --option=gensec:spengo=no"; do
456         signoptions="$mech --signing=off"
457         name="smb.signing on with $signoptions"
458         plantestsuite_loadlist "samba4.$name local-creds" member $VALGRIND $smb4torture //"\$NETBIOSNAME"/tmp $signoptions -U"\$NETBIOSNAME/\$USERNAME"%"\$PASSWORD" BASE-XCOPY "$*"
459 done
460 plantestsuite_loadlist "samba4.smb.signing --signing=yes anon" dc $VALGRIND $smb4torture //"\$NETBIOSNAME"/tmp -k no --signing=yes -U% BASE-XCOPY "$*"
461 plantestsuite_loadlist "samba4.smb.signing --signing=required anon" dc $VALGRIND $smb4torture //"\$NETBIOSNAME"/tmp -k no --signing=required -U% BASE-XCOPY "$*"
462 plantestsuite_loadlist "samba4.smb.signing --signing=no anon" member $VALGRIND $smb4torture //"\$NETBIOSNAME"/tmp -k no --signing=no -U% BASE-XCOPY "$*"
463
464 NBT_TESTS=`$smb4torture --list | grep "^NBT-" | xargs`
465 for t in $NBT_TESTS; do
466         plansmbtorturetestsuite "$t" dc //\$SERVER/_none_ -U\$USERNAME%\$PASSWORD 
467 done
468
469 WB_OPTS="--option=\"torture:strict mode=no\""
470 WB_OPTS="${WB_OPTS} --option=\"torture:timelimit=1\""
471 WB_OPTS="${WB_OPTS} --option=\"torture:winbindd_separator=/\""
472 WB_OPTS="${WB_OPTS} --option=\"torture:winbindd_netbios_name=\$SERVER\""
473 WB_OPTS="${WB_OPTS} --option=\"torture:winbindd_netbios_domain=\$DOMAIN\""
474
475 WINBIND_STRUCT_TESTS=`$smb4torture --list | grep "^WINBIND-STRUCT" | xargs`
476 WINBIND_NDR_TESTS=`$smb4torture --list | grep "^WINBIND-NDR" | xargs`
477 for env in dc member; do
478         for t in $WINBIND_STRUCT_TESTS; do
479                 plansmbtorturetestsuite $t $env $WB_OPTS //_none_/_none_
480         done
481
482         for t in $WINBIND_NDR_TESTS; do
483                 plansmbtorturetestsuite $t $env $WB_OPTS //_none_/_none_
484         done
485 done
486
487 nsstest4="$samba4bindir/nsstest${EXEEXT}"
488 if test -f $nsstest4
489 then
490         plantestsuite "samba4.nss.test using winbind" member $VALGRIND $nsstest4 $samba4bindir/shared/libnss_winbind.so
491 fi
492
493 SUBUNITRUN="$VALGRIND $PYTHON $samba4srcdir/scripting/bin/subunitrun"
494 plantestsuite "ldb.python" none PYTHONPATH="$PYTHONPATH:$samba4srcdir/lib/ldb/tests/python/" $PYTHON $samba4srcdir/lib/ldb/tests/python/api.py
495 plantestsuite "samba4.credentials.python" none PYTHONPATH="$PYTHONPATH:$samba4srcdir/auth/credentials/tests" $SUBUNITRUN bindings
496 planpythontestsuite none samba.tests.gensec
497 planpythontestsuite none samba.tests.registry
498 plantestsuite "tdb.python" none PYTHONPATH="$PYTHONPATH:../lib/tdb/python/tests" $SUBUNITRUN simple
499 planpythontestsuite none samba.tests.auth
500 planpythontestsuite none samba.tests.security
501 planpythontestsuite none samba.tests.dcerpc.misc
502 planpythontestsuite none samba.tests.param
503 planpythontestsuite none samba.tests.upgrade
504 planpythontestsuite none samba.tests
505 planpythontestsuite none samba.tests.provision
506 planpythontestsuite none samba.tests.samba3
507 planpythontestsuite dc:local samba.tests.dcerpc.sam
508 planpythontestsuite dc:local samba.tests.dsdb
509 planpythontestsuite none samba.tests.netcmd
510 planpythontestsuite dc:local samba.tests.dcerpc.bare
511 planpythontestsuite dc:local samba.tests.dcerpc.unix
512 planpythontestsuite none samba.tests.dcerpc.rpc_talloc
513 planpythontestsuite none samba.tests.samdb
514 planpythontestsuite none samba.tests.shares
515 planpythontestsuite none samba.tests.messaging
516 plantestsuite "samba4.samba3sam.python" none PYTHONPATH="$PYTHONPATH:$samba4srcdir/dsdb/samdb/ldb_modules/tests" $SUBUNITRUN samba3sam
517 planpythontestsuite none subunit
518 planpythontestsuite dc:local samba.tests.dcerpc.rpcecho
519 plantestsuite "samba4.winreg.python" dc:local $SUBUNITRUN -U\$USERNAME%\$PASSWORD samba.tests.dcerpc.registry
520 plantestsuite "samba4.ldap.python" dc PYTHONPATH="$PYTHONPATH:../lib/subunit/python:../lib/testtools" $PYTHON $samba4srcdir/dsdb/tests/python/ldap.py \$SERVER -U\$USERNAME%\$PASSWORD -W \$DOMAIN
521 plantestsuite "samba4.schemaInfo.python" dc PYTHONPATH="$PYTHONPATH:$samba4srcdir/dsdb/tests/python/" $SUBUNITRUN dsdb_schema_info -U"\$DOMAIN/\$DC_USERNAME"%"\$DC_PASSWORD"
522 plantestsuite "samba4.urgent_replication.python" dc PYTHONPATH="$PYTHONPATH:../lib/subunit/python:../lib/testtools" $PYTHON $samba4srcdir/dsdb/tests/python/urgent_replication.py \$PREFIX_ABS/dc/private/sam.ldb
523 for env in "dc" "fl2000dc" "fl2003dc" "fl2008r2dc"; do
524         plantestsuite "samba4.ldap_schema.python" $env PYTHONPATH="$PYTHONPATH:../lib/subunit/python:../lib/testtools" $PYTHON $samba4srcdir/dsdb/tests/python/ldap_schema.py \$SERVER -U\$USERNAME%\$PASSWORD -W \$DOMAIN
525         plantestsuite "samba4.ldap.possibleInferiors.python" $env $PYTHON $samba4srcdir/dsdb/samdb/ldb_modules/tests/possibleinferiors.py ldap://\$SERVER -U\$USERNAME%\$PASSWORD -W \$DOMAIN
526         plantestsuite "samba4.ldap.secdesc.python" $env PYTHONPATH="$PYTHONPATH:../lib/subunit/python:../lib/testtools" $PYTHON $samba4srcdir/dsdb/tests/python/sec_descriptor.py \$SERVER -U\$USERNAME%\$PASSWORD -W \$DOMAIN
527         plantestsuite "samba4.ldap.acl.python" $env PYTHONPATH="$PYTHONPATH:../lib/subunit/python:../lib/testtools" $PYTHON $samba4srcdir/dsdb/tests/python/acl.py \$SERVER -U\$USERNAME%\$PASSWORD -W \$DOMAIN
528         plantestsuite "samba4.ldap.passwords.python" $env PYTHONPATH="$PYTHONPATH:../lib/subunit/python:../lib/testtools" $PYTHON $samba4srcdir/dsdb/tests/python/passwords.py \$SERVER -U\$USERNAME%\$PASSWORD -W \$DOMAIN
529 done
530 planpythontestsuite dc:local samba.tests.upgradeprovisionneeddc
531 planpythontestsuite none samba.tests.upgradeprovision
532 planpythontestsuite none samba.tests.xattr
533 planpythontestsuite none samba.tests.ntacls
534 plantestsuite "samba4.deletetest.python" dc PYTHONPATH="$PYTHONPATH:../lib/subunit/python:../lib/testtools" $PYTHON $samba4srcdir/dsdb/tests/python/deletetest.py \$SERVER -U\$USERNAME%\$PASSWORD -W \$DOMAIN
535 plantestsuite "samba4.policy.python" none PYTHONPATH="$PYTHONPATH:lib/policy/tests/python" $SUBUNITRUN bindings
536 plantestsuite "samba4.blackbox.samba3dump" none $PYTHON $samba4srcdir/scripting/bin/samba3dump $samba4srcdir/../testdata/samba3
537 rm -rf $PREFIX/upgrade
538 plantestsuite "samba4.blackbox.upgrade" none $PYTHON $samba4srcdir/setup/upgrade_from_s3 --targetdir=$PREFIX/upgrade $samba4srcdir/../testdata/samba3 ../testdata/samba3/smb.conf
539 rm -rf $PREFIX/provision
540 mkdir $PREFIX/provision
541 plantestsuite "samba4.blackbox.provision.py" none PYTHON="$PYTHON" $samba4srcdir/setup/tests/blackbox_provision.sh "$PREFIX/provision"
542 plantestsuite "samba4.blackbox.provision-backend.py" none PYTHON="$PYTHON" $samba4srcdir/setup/tests/blackbox_provision-backend.sh "$PREFIX/provision"
543 plantestsuite "samba4.blackbox.upgradeprovision.py" none PYTHON="$PYTHON" $samba4srcdir/setup/tests/blackbox_upgradeprovision.sh "$PREFIX/provision"
544 plantestsuite "samba4.blackbox.setpassword.py" none PYTHON="$PYTHON" $samba4srcdir/setup/tests/blackbox_setpassword.sh "$PREFIX/provision"
545 plantestsuite "samba4.blackbox.newuser.py" none PYTHON="$PYTHON" $samba4srcdir/setup/tests/blackbox_newuser.sh "$PREFIX/provision"
546 plantestsuite "samba4.blackbox.group.py" none PYTHON="$PYTHON" $samba4srcdir/setup/tests/blackbox_group.sh "$PREFIX/provision"
547 plantestsuite "samba4.blackbox.spn.py" dc:local PYTHON="$PYTHON" $samba4srcdir/setup/tests/blackbox_spn.sh "$PREFIX/dc"
548
549 # DRS python tests
550 plantestsuite "samba4.drs_delete_object.python" vampire_dc PYTHONPATH="$PYTHONPATH:$samba4srcdir/torture/drs/python" DC1=\$DC_SERVER DC2=\$VAMPIRE_DC_SERVER $SUBUNITRUN delete_object -U"\$DOMAIN/\$DC_USERNAME"%"\$DC_PASSWORD"
551 plantestsuite "samba4.drs_fsmo.python" vampire_dc PYTHONPATH="$PYTHONPATH:$samba4srcdir/torture/drs/python" DC1=\$DC_SERVER DC2=\$VAMPIRE_DC_SERVER $SUBUNITRUN fsmo -U"\$DOMAIN/\$DC_USERNAME"%"\$DC_PASSWORD"
552
553 # This makes sure we test the rid allocation code
554 t="RPC-SAMR-LARGE-DC"
555 plantestsuite_loadlist "samba4.`normalize_testname $t.one`" vampire_dc $VALGRIND $smb4torture "\$SERVER[$bindoptions]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN $t "$*"
556 plantestsuite_loadlist "samba4.`normalize_testname $t.two`" vampire_dc $VALGRIND $smb4torture "\$SERVER[$bindoptions]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN $t "$*"
557
558 # some RODC testing
559 plantestsuite_loadlist "samba4.rpc.echo to RODC" "rodc" $smb4torture ncacn_np:"\$SERVER" -k yes -U"\$USERNAME"%"\$PASSWORD" -W "\$DOMAIN" RPC-ECHO "$*"