s4:torture rework LDAP sort test
[Samba/cd1.git] / source4 / selftest / tests.sh
blob6c6a09fbbdb683f382c8f1399497802a15d13331
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 plantest() {
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 skiptestsuite() {
47 name=$1
48 reason=$2
49 shift 2
50 # FIXME: Report this using subunit, but re-adjust the testsuite count somehow
51 echo "skipping $name ($reason)"
54 normalize_testname() {
55 name=$1
56 shift 1
57 echo $name | tr "A-Z-" "a-z."
60 planperltest() {
61 name=$1
62 env=$2
63 shift 2
64 cmdline="$*"
65 if $PERL -e 'eval require Test::More;' > /dev/null 2>&1; then
66 plantest "$name" "$env" $PERL $cmdline "|" $TAP2SUBUNIT
67 else
68 skiptestsuite "$name" "Test::More not available"
72 plansmbtorturetest() {
73 name=$1
74 env=$2
75 shift 2
76 other_args="$*"
77 modname=`normalize_testname $name`
78 cmdline="$VALGRIND $smb4torture $other_args $name"
79 plantest "$modname" "$env" $cmdline
82 samba4srcdir="`dirname $0`/.."
83 samba4bindir="$BUILDDIR/bin"
84 smb4torture="$samba4bindir/smbtorture${EXEEXT}"
85 TAP2SUBUNIT="$PERL $samba4srcdir/../lib/subunit/tap2subunit"
86 $smb4torture -V
88 bbdir=../testprogs/blackbox
90 prefix_abs="$SELFTEST_PREFIX/s4client"
91 CONFIGURATION="--configfile=\$SMB_CONF_PATH"
93 test -d "$prefix_abs" || mkdir "$prefix_abs"
95 TORTURE_OPTIONS=""
96 TORTURE_OPTIONS="$TORTURE_OPTIONS $CONFIGURATION"
97 TORTURE_OPTIONS="$TORTURE_OPTIONS --maximum-runtime=$SELFTEST_MAXTIME"
98 TORTURE_OPTIONS="$TORTURE_OPTIONS --target=$SELFTEST_TARGET"
99 TORTURE_OPTIONS="$TORTURE_OPTIONS --basedir=$prefix_abs"
100 if [ -n "$SELFTEST_VERBOSE" ]; then
101 TORTURE_OPTIONS="$TORTURE_OPTIONS --option=torture:progress=no"
103 TORTURE_OPTIONS="$TORTURE_OPTIONS --format=subunit"
104 if [ -n "$SELFTEST_QUICK" ]; then
105 TORTURE_OPTIONS="$TORTURE_OPTIONS --option=torture:quick=yes"
107 smb4torture="$smb4torture $TORTURE_OPTIONS"
109 echo "OPTIONS $TORTURE_OPTIONS"
111 # Simple tests for LDAP and CLDAP
113 for options in "" "--option=socket:testnonblock=true" "-U\$USERNAME%\$PASSWORD --option=socket:testnonblock=true" "-U\$USERNAME%\$PASSWORD"; do
114 plantest "ldb.ldap with options $options" dc $bbdir/test_ldb.sh ldap \$SERVER_IP $options
115 done
116 # see if we support ldaps
117 if grep ENABLE_GNUTLS.1 include/config.h > /dev/null; then
118 for options in "" "-U\$USERNAME%\$PASSWORD"; do
119 plantest "ldb.ldaps with options $options" dc $bbdir/test_ldb.sh ldaps \$SERVER_IP $options
120 done
122 plantest "ldb.ldapi with options $options" dc $bbdir/test_ldb.sh ldapi \$PREFIX_ABS/dc/private/ldapi $options
123 for t in `$smb4torture --list | grep "^LDAP-"`
125 plansmbtorturetest "$t" dc "-U\$USERNAME%\$PASSWORD" //\$SERVER_IP/_none_
126 done
128 # only do the ldb tests when not in quick mode - they are quite slow, and ldb
129 # is now pretty well tested by the rest of the quick tests anyway
130 LDBDIR=$samba4srcdir/lib/ldb
131 export LDBDIR
132 # Don't run LDB tests when using system ldb, as we won't have ldbtest installed
133 if [ -f $samba4bindir/ldbtest ]; then
134 plantest "ldb" none TEST_DATA_PREFIX=\$PREFIX $LDBDIR/tests/test-tdb.sh
135 else
136 skiptestsuite "ldb" "Using system LDB, ldbtest not available"
139 # Tests for RPC
141 # add tests to this list as they start passing, so we test
142 # that they stay passing
143 ncacn_np_tests="RPC-SCHANNEL RPC-JOIN RPC-LSA RPC-DSSETUP RPC-ALTERCONTEXT RPC-MULTIBIND RPC-NETLOGON RPC-HANDLES RPC-SAMSYNC RPC-SAMBA3SESSIONKEY RPC-SAMBA3-GETUSERNAME RPC-SAMBA3-LSA RPC-BINDSAMBA3 RPC-NETLOGSAMBA3 RPC-ASYNCBIND RPC-LSALOOKUP RPC-LSA-GETUSER RPC-SCHANNEL2 RPC-AUTHCONTEXT"
144 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"
145 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"
146 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"
147 slow_ncalrpc_tests="RPC-SAMR RPC-SAMR-PASSWORDS"
148 slow_ncacn_ip_tcp_tests="RPC-SAMR RPC-SAMR-PASSWORDS RPC-CRACKNAMES"
150 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"
152 # Make sure all tests get run
153 for t in `$smb4torture --list | grep "^RPC-"`
155 echo $all_tests | grep "$t" > /dev/null
156 if [ $? -ne 0 ]
157 then
158 auto_rpc_tests="$auto_rpc_tests $t"
160 done
162 for bindoptions in seal,padcheck $VALIDATE bigendian; do
163 for transport in ncalrpc ncacn_np ncacn_ip_tcp; do
164 env="dc"
165 case $transport in
166 ncalrpc) tests=$ncalrpc_tests;env="dc:local" ;;
167 ncacn_np) tests=$ncacn_np_tests ;;
168 ncacn_ip_tcp) tests=$ncacn_ip_tcp_tests ;;
169 esac
170 for t in $tests; do
171 plantest "`normalize_testname $t` on $transport with $bindoptions" $env $VALGRIND $smb4torture $transport:"\$SERVER[$bindoptions]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN $t "$*"
172 done
173 plantest "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 "$*"
174 done
175 done
177 for bindoptions in "" $VALIDATE bigendian; do
178 for t in $auto_rpc_tests; do
179 plantest "`normalize_testname $t` with $bindoptions" dc $VALGRIND $smb4torture "\$SERVER[$bindoptions]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN $t "$*"
180 done
181 done
183 t="RPC-COUNTCALLS"
184 plantest "`normalize_testname $t`" dc:local $VALGRIND $smb4torture "\$SERVER[$bindoptions]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN $t "$*"
186 for bindoptions in connect $VALIDATE ; do
187 for transport in ncalrpc ncacn_np ncacn_ip_tcp; do
188 env="dc"
189 case $transport in
190 ncalrpc) tests=$slow_ncalrpc_tests; env="dc:local" ;;
191 ncacn_np) tests=$slow_ncacn_np_tests ;;
192 ncacn_ip_tcp) tests=$slow_ncacn_ip_tcp_tests ;;
193 esac
194 for t in $tests; do
195 plantest "`normalize_testname $t` on $transport with $bindoptions" $env $VALGRIND $smb4torture $transport:"\$SERVER[$bindoptions]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN $t "$*"
196 done
197 done
198 done
201 # Tests for the NET API
203 net=`$smb4torture --list | grep "^NET-"`
205 for t in $net; do
206 plansmbtorturetest "$t" dc "\$SERVER[$VALIDATE]" -U"\$USERNAME"%"\$PASSWORD" -W "\$DOMAIN" "$*"
207 done
209 # Tests for session keys
210 # FIXME: Integrate these into a single smbtorture test
212 bindoptions=""
213 transport="ncacn_np"
214 for ntlmoptions in \
215 "-k no --option=usespnego=yes" \
216 "-k no --option=usespnego=yes --option=ntlmssp_client:128bit=no" \
217 "-k no --option=usespnego=yes --option=ntlmssp_client:56bit=yes" \
218 "-k no --option=usespnego=yes --option=ntlmssp_client:56bit=no" \
219 "-k no --option=usespnego=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=yes" \
220 "-k no --option=usespnego=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=no" \
221 "-k no --option=usespnego=yes --option=clientntlmv2auth=yes" \
222 "-k no --option=usespnego=yes --option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no" \
223 "-k no --option=usespnego=yes --option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=yes" \
224 "-k no --option=usespnego=no --option=clientntlmv2auth=yes" \
225 "-k no --option=gensec:spnego=no --option=clientntlmv2auth=yes" \
226 "-k no --option=usespnego=no"; do
227 name="rpc.lsa.secrets on $transport with $bindoptions with $ntlmoptions"
228 plantest "$name" dc $smb4torture $transport:"\$SERVER[$bindoptions]" $ntlmoptions -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN --option=gensec:target_hostname=\$NETBIOSNAME RPC-LSA-SECRETS "$*"
229 done
230 plantest "rpc.lsa.secrets on $transport with $bindoptions with Kerberos" dc $smb4torture $transport:"\$SERVER[$bindoptions]" -k yes -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN "--option=gensec:target_hostname=\$NETBIOSNAME" RPC-LSA-SECRETS "$*"
231 plantest "rpc.lsa.secrets on $transport with $bindoptions with Kerberos - use target principal" dc $smb4torture $transport:"\$SERVER[$bindoptions]" -k yes -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN "--option=clientusespnegoprincipal=yes" "--option=gensec:target_hostname=\$NETBIOSNAME" RPC-LSA-SECRETS "$*"
232 plantest "rpc.lsa.secrets on $transport with Kerberos - use Samba3 style login" dc $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*" "$*"
233 plantest "rpc.lsa.secrets on $transport with Kerberos - use Samba3 style login, use target principal" dc $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*" "$*"
235 # Echo tests
236 transports="ncacn_np ncacn_ip_tcp ncalrpc"
238 for transport in $transports; do
239 for bindoptions in connect spnego spnego,sign spnego,seal $VALIDATE padcheck bigendian bigendian,seal; do
240 for ntlmoptions in \
241 "--option=socket:testnonblock=True --option=torture:quick=yes"; do
242 env="dc"
243 if test x"$transport" = x"ncalrpc"; then
244 env="dc:local"
246 plantest "rpc.echo on $transport with $bindoptions and $ntlmoptions" $env $smb4torture $transport:"\$SERVER[$bindoptions]" $ntlmoptions -U"\$USERNAME"%"\$PASSWORD" -W "\$DOMAIN" RPC-ECHO "$*"
247 done
248 done
249 done
251 for transport in $transports; do
252 for bindoptions in sign seal; do
253 for ntlmoptions in \
254 "--option=ntlmssp_client:ntlm2=yes --option=torture:quick=yes" \
255 "--option=ntlmssp_client:ntlm2=no --option=torture:quick=yes" \
256 "--option=ntlmssp_client:ntlm2=yes --option=ntlmssp_client:128bit=no --option=torture:quick=yes" \
257 "--option=ntlmssp_client:ntlm2=no --option=ntlmssp_client:128bit=no --option=torture:quick=yes" \
258 "--option=ntlmssp_client:ntlm2=yes --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes" \
259 "--option=ntlmssp_client:ntlm2=no --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes" \
260 "--option=clientntlmv2auth=yes --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes" \
261 "--option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:keyexchange=yes --option=torture:quick=yes" \
262 "--option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes" \
263 ; do
264 env="dc"
265 if test x"$transport" = x"ncalrpc"; then
266 env="dc:local"
268 plantest "rpc.echo on $transport with $bindoptions and $ntlmoptions" $env $smb4torture $transport:"\$SERVER[$bindoptions]" $ntlmoptions -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN RPC-ECHO "$*"
269 done
270 done
271 done
273 plantest "rpc.echo on ncacn_np over smb2" dc $smb4torture ncacn_np:"\$SERVER[smb2]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN RPC-ECHO "$*"
275 # Tests against the NTVFS POSIX backend
276 NTVFSARGS=""
277 NTVFSARGS="${NTVFSARGS} --option=torture:sharedelay=100000"
278 NTVFSARGS="${NTVFSARGS} --option=torture:oplocktimeout=3"
279 NTVFSARGS="${NTVFSARGS} --option=torture:writetimeupdatedelay=500000"
281 smb2=`$smb4torture --list | grep "^SMB2-" | xargs`
282 #The QFILEINFO-IPC test needs to be on ipc$
283 raw=`$smb4torture --list | grep "^RAW-" | grep -v "RAW-QFILEINFO-IPC"| xargs`
284 base=`$smb4torture --list | grep "^BASE-" | xargs`
286 for t in $base $raw $smb2; do
287 plansmbtorturetest "$t" dc $ADDARGS //\$SERVER/tmp -U"\$USERNAME"%"\$PASSWORD" $NTVFSARGS
288 done
290 plansmbtorturetest "RAW-QFILEINFO-IPC" dc $ADDARGS //\$SERVER/ipc$ -U"\$USERNAME"%"\$PASSWORD"
292 rap=`$smb4torture --list | grep "^RAP-" | xargs`
293 for t in $rap; do
294 plansmbtorturetest "$t" dc $ADDARGS //\$SERVER/IPC\\\$ -U"\$USERNAME"%"\$PASSWORD"
295 done
297 # Tests against the NTVFS CIFS backend
298 for t in $base $raw; do
299 plantest "ntvfs.cifs.`normalize_testname $t`" dc $VALGRIND $smb4torture //\$NETBIOSNAME/cifs -U"\$USERNAME"%"\$PASSWORD" $NTVFSARGS $t
300 done
302 # Local tests
304 for t in `$smb4torture --list | grep "^LOCAL-" | xargs`; do
305 plansmbtorturetest "$t" none ncalrpc: "$*"
306 done
308 tdbtorture4="$samba4bindir/tdbtorture${EXEEXT}"
309 if test -f $tdbtorture4
310 then
311 plantest "tdb.stress" none $VALGRIND $tdbtorture4
312 else
313 skiptestsuite "tdb.stress" "Using system TDB, tdbtorture not available"
316 # Pidl tests
318 for f in $samba4srcdir/../pidl/tests/*.pl; do
319 planperltest "pidl.`basename $f .pl`" none $f
320 done
321 planperltest "selftest.samba4.pl" none $samba4srcdir/../selftest/test_samba4.pl
323 # Blackbox Tests:
324 # tests that interact directly with the command-line tools rather than using
325 # the API. These mainly test that the various command-line options of commands
326 # work correctly.
328 plantest "blackbox.ndrdump" none $samba4srcdir/librpc/tests/test_ndrdump.sh
329 plantest "blackbox.net" dc $samba4srcdir/utils/tests/test_net.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN"
330 plantest "blackbox.kinit" dc $bbdir/test_kinit.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$REALM" "\$DOMAIN" "$PREFIX" $CONFIGURATION
331 plantest "blackbox.passwords" dc $bbdir/test_passwords.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$REALM" "\$DOMAIN" "$PREFIX" --configfile=st/dc/etc/smb.conf
332 plantest "blackbox.export.keytab" dc $bbdir/test_export_keytab.sh "\$SERVER" "\$USERNAME" "\$REALM" "\$DOMAIN" "$PREFIX" --configfile=st/dc/etc/smb.conf
333 plantest "blackbox.cifsdd" dc $samba4srcdir/client/tests/test_cifsdd.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN"
334 plantest "blackbox.nmblookup" dc $samba4srcdir/utils/tests/test_nmblookup.sh "\$NETBIOSNAME" "\$NETBIOSALIAS" "\$SERVER" "\$SERVER_IP"
335 plantest "blackbox.nmblookup" member $samba4srcdir/utils/tests/test_nmblookup.sh "\$NETBIOSNAME" "\$NETBIOSALIAS" "\$SERVER" "\$SERVER_IP"
336 plantest "blackbox.locktest" dc $samba4srcdir/torture/tests/test_locktest.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" "$PREFIX"
337 plantest "blackbox.masktest" dc $samba4srcdir/torture/tests/test_masktest.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" "$PREFIX"
338 plantest "blackbox.gentest" dc $samba4srcdir/torture/tests/test_gentest.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" "$PREFIX"
339 plantest "blackbox.wbinfo" dc:local $samba4srcdir/../nsswitch/tests/test_wbinfo.sh "\$DOMAIN" "\$USERNAME" "\$PASSWORD" "dc"
340 plantest "blackbox.wbinfo" member:local $samba4srcdir/../nsswitch/tests/test_wbinfo.sh "\$DOMAIN" "\$DC_USERNAME" "\$DC_PASSWORD" "member"
342 # Tests using the "Simple" NTVFS backend
344 for t in "BASE-RW1"; do
345 plantest "ntvfs.simple.`normalize_testname $t`" dc $VALGRIND $smb4torture $ADDARGS //\$SERVER/simple -U"\$USERNAME"%"\$PASSWORD" $t
346 done
348 # Domain Member Tests
350 plantest "rpc.echo against member server with local creds" member $VALGRIND $smb4torture ncacn_np:"\$NETBIOSNAME" -U"\$NETBIOSNAME/\$USERNAME"%"\$PASSWORD" RPC-ECHO "$*"
351 plantest "rpc.echo against member server with domain creds" member $VALGRIND $smb4torture ncacn_np:"\$NETBIOSNAME" -U"\$DOMAIN/\$DC_USERNAME"%"\$DC_PASSWORD" RPC-ECHO "$*"
352 plantest "rpc.samr against member server with local creds" member $VALGRIND $smb4torture ncacn_np:"\$NETBIOSNAME" -U"\$NETBIOSNAME/\$USERNAME"%"\$PASSWORD" "RPC-SAMR" "$*"
353 plantest "rpc.samr.users against member server with local creds" member $VALGRIND $smb4torture ncacn_np:"\$NETBIOSNAME" -U"\$NETBIOSNAME/\$USERNAME"%"\$PASSWORD" "RPC-SAMR-USERS" "$*"
354 plantest "rpc.samr.passwords against member server with local creds" member $VALGRIND $smb4torture ncacn_np:"\$NETBIOSNAME" -U"\$NETBIOSNAME/\$USERNAME"%"\$PASSWORD" "RPC-SAMR-PASSWORDS" "$*"
355 plantest "blackbox.smbclient against member server with local creds" member $samba4srcdir/client/tests/test_smbclient.sh "\$NETBIOSNAME" "\$USERNAME" "\$PASSWORD" "\$NETBIOSNAME" "$PREFIX"
357 # Tests SMB signing
359 for mech in \
360 "-k no" \
361 "-k no --option=usespnego=no" \
362 "-k no --option=gensec:spengo=no" \
363 "-k yes" \
364 "-k yes --option=gensec:fake_gssapi_krb5=yes --option=gensec:gssapi_krb5=no"; do
365 for signing in \
366 "--signing=on" \
367 "--signing=required"; do
369 signoptions="$mech $signing"
370 name="smb.signing on with $signoptions"
371 plantest "$name" dc $VALGRIND $smb4torture //"\$NETBIOSNAME"/tmp $signoptions -U"\$USERNAME"%"\$PASSWORD" BASE-XCOPY "$*"
372 done
373 done
375 for mech in \
376 "-k no" \
377 "-k no --option=usespnego=no" \
378 "-k no --option=gensec:spengo=no" \
379 "-k yes" \
380 "-k yes --option=gensec:fake_gssapi_krb5=yes --option=gensec:gssapi_krb5=no"; do
381 signoptions="$mech --signing=off"
382 name="smb.signing on with $signoptions"
383 plantest "$name domain-creds" member $VALGRIND $smb4torture //"\$NETBIOSNAME"/tmp $signoptions -U"\$DC_USERNAME"%"\$DC_PASSWORD" BASE-XCOPY "$*"
384 done
385 for mech in \
386 "-k no" \
387 "-k no --option=usespnego=no" \
388 "-k no --option=gensec:spengo=no"; do
389 signoptions="$mech --signing=off"
390 name="smb.signing on with $signoptions"
391 plantest "$name local-creds" member $VALGRIND $smb4torture //"\$NETBIOSNAME"/tmp $signoptions -U"\$NETBIOSNAME/\$USERNAME"%"\$PASSWORD" BASE-XCOPY "$*"
392 done
393 plantest "smb.signing --signing=yes anon" dc $VALGRIND $smb4torture //"\$NETBIOSNAME"/tmp -k no --signing=yes -U% BASE-XCOPY "$*"
394 plantest "smb.signing --signing=required anon" dc $VALGRIND $smb4torture //"\$NETBIOSNAME"/tmp -k no --signing=required -U% BASE-XCOPY "$*"
395 plantest "smb.signing --signing=no anon" member $VALGRIND $smb4torture //"\$NETBIOSNAME"/tmp -k no --signing=no -U% BASE-XCOPY "$*"
397 NBT_TESTS=`$smb4torture --list | grep "^NBT-" | xargs`
399 for t in $NBT_TESTS; do
400 plansmbtorturetest "$t" dc //\$SERVER/_none_ -U\$USERNAME%\$PASSWORD
401 done
403 WB_OPTS="--option=\"torture:strict mode=no\""
404 WB_OPTS="${WB_OPTS} --option=\"torture:timelimit=1\""
405 WB_OPTS="${WB_OPTS} --option=\"torture:winbindd separator=/\""
406 WB_OPTS="${WB_OPTS} --option=\"torture:winbindd netbios name=\$SERVER\""
407 WB_OPTS="${WB_OPTS} --option=\"torture:winbindd netbios domain=\$DOMAIN\""
409 WINBIND_STRUCT_TESTS=`$smb4torture --list | grep "^WINBIND-STRUCT" | xargs`
410 WINBIND_NDR_TESTS=`$smb4torture --list | grep "^WINBIND-NDR" | xargs`
411 for env in dc member; do
412 for t in $WINBIND_STRUCT_TESTS; do
413 plansmbtorturetest $t $env $WB_OPTS //_none_/_none_
414 done
416 for t in $WINBIND_NDR_TESTS; do
417 plansmbtorturetest $t $env $WB_OPTS //_none_/_none_
418 done
419 done
421 nsstest4="$samba4bindir/nsstest${EXEEXT}"
422 if test -f $nsstest4
423 then
424 plantest "nss.test using winbind" member $VALGRIND $nsstest4 $samba4bindir/shared/libnss_winbind.so
427 SUBUNITRUN="$VALGRIND $PYTHON $samba4srcdir/scripting/bin/subunitrun"
428 plantest "ldb.python" none PYTHONPATH="$PYTHONPATH:$samba4srcdir/lib/ldb/tests/python/" $SUBUNITRUN api
429 plantest "credentials.python" none PYTHONPATH="$PYTHONPATH:$samba4srcdir/auth/credentials/tests" $SUBUNITRUN bindings
430 plantest "registry.python" none PYTHONPATH="$PYTHONPATH:$samba4srcdir/lib/registry/tests/" $SUBUNITRUN bindings
431 plantest "tdb.python" none PYTHONPATH="$PYTHONPATH:../lib/tdb/python/tests" $SUBUNITRUN simple
432 plantest "auth.python" none PYTHONPATH="$PYTHONPATH:$samba4srcdir/auth/tests/" $SUBUNITRUN bindings
433 plantest "security.python" none PYTHONPATH="$PYTHONPATH:$samba4srcdir/libcli/security/tests" $SUBUNITRUN bindings
434 plantest "misc.python" none $SUBUNITRUN samba.tests.dcerpc.misc
435 plantest "param.python" none PYTHONPATH="$PYTHONPATH:$samba4srcdir/param/tests" $SUBUNITRUN bindings
436 plantest "upgrade.python" none $SUBUNITRUN samba.tests.upgrade
437 plantest "samba.python" none $SUBUNITRUN samba.tests
438 plantest "provision.python" none $SUBUNITRUN samba.tests.provision
439 plantest "samba3.python" none $SUBUNITRUN samba.tests.samba3
440 plantest "samr.python" dc:local $SUBUNITRUN samba.tests.dcerpc.sam
441 plantest "dcerpc.bare.python" dc:local $SUBUNITRUN samba.tests.dcerpc.bare
442 plantest "unixinfo.python" dc:local $SUBUNITRUN samba.tests.dcerpc.unix
443 plantest "samdb.python" none $SUBUNITRUN samba.tests.samdb
444 plantest "shares.python" none $SUBUNITRUN samba.tests.shares
445 plantest "messaging.python" none PYTHONPATH="$PYTHONPATH:$samba4srcdir/lib/messaging/tests" $SUBUNITRUN bindings
446 plantest "samba3sam.python" none PYTHONPATH="$PYTHONPATH:$samba4srcdir/dsdb/samdb/ldb_modules/tests" $SUBUNITRUN samba3sam
447 plantest "subunit.python" none $SUBUNITRUN subunit
448 plantest "rpcecho.python" dc:local $SUBUNITRUN samba.tests.dcerpc.rpcecho
449 plantest "winreg.python" dc:local $SUBUNITRUN -U\$USERNAME%\$PASSWORD samba.tests.dcerpc.registry
450 plantest "ldap.python" dc PYTHONPATH="$PYTHONPATH:../lib/subunit/python" $PYTHON $samba4srcdir/lib/ldb/tests/python/ldap.py $CONFIGURATION \$SERVER -U\$USERNAME%\$PASSWORD -W \$DOMAIN
451 plantest "possibleInferiors.python" dc $PYTHON $samba4srcdir/dsdb/samdb/ldb_modules/tests/possibleinferiors.py $CONFIGURATION ldap://\$SERVER -U\$USERNAME%\$PASSWORD -W \$DOMAIN
452 plantest "blackbox.samba3dump" none $PYTHON $samba4srcdir/scripting/bin/samba3dump $samba4srcdir/../testdata/samba3
453 rm -rf $PREFIX/upgrade
454 plantest "blackbox.upgrade" none $PYTHON $samba4srcdir/setup/upgrade $CONFIGURATION --targetdir=$PREFIX/upgrade $samba4srcdir/../testdata/samba3 ../testdata/samba3/smb.conf
455 rm -rf $PREFIX/provision
456 mkdir $PREFIX/provision
457 plantest "blackbox.provision.py" none PYTHON="$PYTHON" $samba4srcdir/setup/tests/blackbox_provision.sh "$PREFIX/provision"
458 plantest "blackbox.provision-backend.py" none PYTHON="$PYTHON" $samba4srcdir/setup/tests/blackbox_provision-backend.sh "$PREFIX/provision"
459 plantest "blackbox.setpassword.py" none PYTHON="$PYTHON" $samba4srcdir/setup/tests/blackbox_setpassword.sh "$PREFIX/provision"
460 plantest "blackbox.newuser.py" none PYTHON="$PYTHON" $samba4srcdir/setup/tests/blackbox_newuser.sh "$PREFIX/provision"