2007-10-26 00:20:52 +04:00
#!/bin/sh
2008-01-06 04:33:05 +03:00
# This script generates a list of testsuites that should be run as part of
# the Samba 4 test suite.
# The output of this script is parsed by selftest.pl, which then decides
# which of the tests to actually run. It will, for example, skip all tests
2008-10-19 16:41:10 +04:00
# listed in selftest/skip or only run a subset during "make quicktest".
2008-01-06 04:33:05 +03:00
# The idea is that this script outputs all of the tests of Samba 4, not
# just those that are known to pass, and list those that should be skipped
2008-10-19 16:41:10 +04:00
# or are known to fail in selftest/skip or selftest/knownfail. This makes it
2008-01-06 04:33:05 +03:00
# very easy to see what functionality is still missing in Samba 4 and makes
# it possible to run the testsuite against other servers, such as Samba 3 or
# Windows that have a different set of features.
# The syntax for a testsuite is "-- TEST --" on a single line, followed
# by the name of the test, the environment it needs and the command to run, all
# three separated by newlines. All other lines in the output are considered
# comments.
2007-10-26 00:20:52 +04:00
if [ ! -n " $PERL " ]
then
PERL = perl
fi
2009-02-26 18:32:57 +03:00
if [ ! -n " $PYTHON " ]
then
PYTHON = python
fi
2007-10-26 00:20:52 +04:00
plantest( ) {
name = $1
env = $2
shift 2
cmdline = " $* "
echo "-- TEST --"
2007-10-26 19:13:42 +04:00
if [ " $env " = "none" ] ; then
echo " samba4. $name "
else
echo " samba4. $name ( $env ) "
fi
2007-10-26 00:20:52 +04:00
echo $env
echo $cmdline
}
2009-06-18 05:08:21 +04:00
skiptestsuite( ) {
name = $1
reason = $2
shift 2
# FIXME: Report this using subunit, but re-adjust the testsuite count somehow
echo " skipping $name ( $reason ) "
}
2008-02-18 23:13:03 +03:00
normalize_testname( ) {
name = $1
shift 1
echo $name | tr "A-Z-" "a-z."
}
2009-06-18 05:08:21 +04:00
planperltest( ) {
name = $1
env = $2
shift 2
cmdline = " $* "
if $PERL -e 'eval require Test::More;' > /dev/null 2>& 1; then
plantest " $name " " $env " $PERL $cmdline "|" $TAP2SUBUNIT
else
skiptestsuite " $name " "Test::More not available"
fi
}
2008-02-18 23:13:03 +03:00
plansmbtorturetest( ) {
name = $1
env = $2
shift 2
2008-02-19 01:27:55 +03:00
other_args = " $* "
2008-02-18 23:13:03 +03:00
modname = ` normalize_testname $name `
2008-02-19 01:27:55 +03:00
cmdline = " $VALGRIND $smb4torture $other_args $name "
2008-02-18 23:13:03 +03:00
plantest " $modname " " $env " $cmdline
}
2009-02-03 18:21:54 +03:00
samba4srcdir = " `dirname $0 `/.. "
samba4bindir = " $BUILDDIR /bin "
2009-01-21 12:12:04 +03:00
smb4torture = " $samba4bindir /smbtorture ${ EXEEXT } "
2009-09-27 18:34:59 +04:00
if which tap2subunit 2>/dev/null; then
TAP2SUBUNIT = tap2subunit
else
TAP2SUBUNIT = " $PERL $samba4srcdir /../lib/subunit/tap2subunit "
fi
2009-01-21 12:12:04 +03:00
$smb4torture -V
2008-10-19 18:07:00 +04:00
2009-02-03 18:21:54 +03:00
bbdir = ../testprogs/blackbox
2008-10-19 18:07:00 +04:00
prefix_abs = " $SELFTEST_PREFIX /s4client "
2009-01-30 13:03:45 +03:00
CONFIGURATION = "--configfile=\$SMB_CONF_PATH"
2008-10-19 18:07:00 +04:00
2008-10-21 16:29:38 +04:00
test -d " $prefix_abs " || mkdir " $prefix_abs "
2008-10-19 18:07:00 +04:00
TORTURE_OPTIONS = ""
2009-01-30 13:03:45 +03:00
TORTURE_OPTIONS = " $TORTURE_OPTIONS $CONFIGURATION "
2008-10-19 18:07:00 +04:00
TORTURE_OPTIONS = " $TORTURE_OPTIONS --maximum-runtime= $SELFTEST_MAXTIME "
TORTURE_OPTIONS = " $TORTURE_OPTIONS --target= $SELFTEST_TARGET "
TORTURE_OPTIONS = " $TORTURE_OPTIONS --basedir= $prefix_abs "
2009-11-17 18:58:11 +03:00
if [ -z " $SELFTEST_VERBOSE " ] ; then
2008-10-19 18:07:00 +04:00
TORTURE_OPTIONS = " $TORTURE_OPTIONS --option=torture:progress=no "
fi
TORTURE_OPTIONS = " $TORTURE_OPTIONS --format=subunit "
if [ -n " $SELFTEST_QUICK " ] ; then
TORTURE_OPTIONS = " $TORTURE_OPTIONS --option=torture:quick=yes "
fi
2009-01-21 12:12:04 +03:00
smb4torture = " $smb4torture $TORTURE_OPTIONS "
2007-10-26 00:20:52 +04:00
2008-10-19 18:07:00 +04:00
echo " OPTIONS $TORTURE_OPTIONS "
2007-10-26 00:20:52 +04:00
# Simple tests for LDAP and CLDAP
for options in "" "--option=socket:testnonblock=true" "-U\$USERNAME%\$PASSWORD --option=socket:testnonblock=true" "-U\$USERNAME%\$PASSWORD" ; do
2009-02-03 18:21:54 +03:00
plantest " ldb.ldap with options $options " dc $bbdir /test_ldb.sh ldap \$ SERVER_IP $options
2007-10-26 00:20:52 +04:00
done
# see if we support ldaps
if grep ENABLE_GNUTLS.1 include/config.h > /dev/null; then
for options in "" "-U\$USERNAME%\$PASSWORD" ; do
2009-02-03 18:21:54 +03:00
plantest " ldb.ldaps with options $options " dc $bbdir /test_ldb.sh ldaps \$ SERVER_IP $options
2007-10-26 00:20:52 +04:00
done
fi
2009-02-03 18:21:54 +03:00
plantest " ldb.ldapi with options $options " dc $bbdir /test_ldb.sh ldapi \$ PREFIX_ABS/dc/private/ldapi $options
2009-08-04 06:52:11 +04:00
for t in ` $smb4torture --list | grep "^LDAP-" `
2007-10-26 00:20:52 +04:00
do
2008-02-18 23:13:03 +03:00
plansmbtorturetest " $t " dc "-U\$USERNAME%\$PASSWORD" //\$ SERVER_IP/_none_
2007-10-26 00:20:52 +04:00
done
# only do the ldb tests when not in quick mode - they are quite slow, and ldb
# is now pretty well tested by the rest of the quick tests anyway
LDBDIR = $samba4srcdir /lib/ldb
export LDBDIR
2009-06-18 05:08:21 +04:00
# Don't run LDB tests when using system ldb, as we won't have ldbtest installed
if [ -f $samba4bindir /ldbtest ] ; then
plantest "ldb" none TEST_DATA_PREFIX = \$ PREFIX $LDBDIR /tests/test-tdb.sh
else
skiptestsuite "ldb" "Using system LDB, ldbtest not available"
fi
2007-10-26 00:20:52 +04:00
# Tests for RPC
# add tests to this list as they start passing, so we test
# that they stay passing
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"
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"
2008-09-30 08:42:53 +04:00
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"
2009-06-02 06:09:05 +04:00
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"
2007-10-26 00:20:52 +04:00
slow_ncalrpc_tests = "RPC-SAMR RPC-SAMR-PASSWORDS"
slow_ncacn_ip_tcp_tests = "RPC-SAMR RPC-SAMR-PASSWORDS RPC-CRACKNAMES"
2009-06-10 06:24:12 +04:00
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 "
2007-10-26 00:20:52 +04:00
# Make sure all tests get run
2009-10-25 23:43:04 +03:00
rpc_tests = ` $smb4torture --list | grep '^RPC-' `
drs_rpc_tests = ` $smb4torture --list | grep '^DRS-RPC' `
rpc_tests_list = " ${ rpc_tests } ${ drs_rpc_tests } "
for t in $rpc_tests_list
2007-10-26 00:20:52 +04:00
do
2009-03-01 23:38:31 +03:00
echo $all_tests | grep " $t " > /dev/null
2007-10-26 00:20:52 +04:00
if [ $? -ne 0 ]
then
auto_rpc_tests = " $auto_rpc_tests $t "
fi
done
for bindoptions in seal,padcheck $VALIDATE bigendian; do
for transport in ncalrpc ncacn_np ncacn_ip_tcp; do
2009-01-30 12:30:13 +03:00
env = "dc"
2007-10-26 00:20:52 +04:00
case $transport in
2009-01-30 12:30:13 +03:00
ncalrpc) tests = $ncalrpc_tests ; env = "dc:local" ; ;
2007-10-26 00:20:52 +04:00
ncacn_np) tests = $ncacn_np_tests ; ;
ncacn_ip_tcp) tests = $ncacn_ip_tcp_tests ; ;
esac
for t in $tests ; do
2009-01-30 12:30:13 +03:00
plantest " `normalize_testname $t ` on $transport with $bindoptions " $env $VALGRIND $smb4torture $transport :" \$SERVER[ $bindoptions ] " -U"\$USERNAME" %"\$PASSWORD" -W \$ DOMAIN $t " $* "
2007-10-26 00:20:52 +04:00
done
2009-01-30 12:30:13 +03:00
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 " $* "
2007-10-26 00:20:52 +04:00
done
done
for bindoptions in "" $VALIDATE bigendian; do
for t in $auto_rpc_tests ; do
2008-02-18 23:13:03 +03:00
plantest " `normalize_testname $t ` with $bindoptions " dc $VALGRIND $smb4torture " \$SERVER[ $bindoptions ] " -U"\$USERNAME" %"\$PASSWORD" -W \$ DOMAIN $t " $* "
2007-10-26 00:20:52 +04:00
done
done
2009-01-30 15:33:45 +03:00
t = "RPC-COUNTCALLS"
plantest " `normalize_testname $t ` " dc:local $VALGRIND $smb4torture " \$SERVER[ $bindoptions ] " -U"\$USERNAME" %"\$PASSWORD" -W \$ DOMAIN $t " $* "
2007-10-26 00:20:52 +04:00
for bindoptions in connect $VALIDATE ; do
for transport in ncalrpc ncacn_np ncacn_ip_tcp; do
2009-01-30 12:30:13 +03:00
env = "dc"
2007-10-26 00:20:52 +04:00
case $transport in
2009-01-30 12:30:13 +03:00
ncalrpc) tests = $slow_ncalrpc_tests ; env = "dc:local" ; ;
2007-10-26 00:20:52 +04:00
ncacn_np) tests = $slow_ncacn_np_tests ; ;
ncacn_ip_tcp) tests = $slow_ncacn_ip_tcp_tests ; ;
esac
for t in $tests ; do
2009-01-30 12:30:13 +03:00
plantest " `normalize_testname $t ` on $transport with $bindoptions " $env $VALGRIND $smb4torture $transport :" \$SERVER[ $bindoptions ] " -U"\$USERNAME" %"\$PASSWORD" -W \$ DOMAIN $t " $* "
2007-10-26 00:20:52 +04:00
done
done
done
# Tests for the NET API
2009-03-01 23:38:31 +03:00
net = ` $smb4torture --list | grep "^NET-" `
2007-10-26 00:20:52 +04:00
for t in $net ; do
2008-02-18 23:13:03 +03:00
plansmbtorturetest " $t " dc " \$SERVER[ $VALIDATE ] " -U"\$USERNAME" %"\$PASSWORD" -W "\$DOMAIN" " $* "
2007-10-26 00:20:52 +04:00
done
# Tests for session keys
2008-09-16 20:34:40 +04:00
# FIXME: Integrate these into a single smbtorture test
2007-10-26 00:20:52 +04:00
bindoptions = ""
transport = "ncacn_np"
for ntlmoptions in \
"-k no --option=usespnego=yes" \
"-k no --option=usespnego=yes --option=ntlmssp_client:128bit=no" \
"-k no --option=usespnego=yes --option=ntlmssp_client:56bit=yes" \
"-k no --option=usespnego=yes --option=ntlmssp_client:56bit=no" \
"-k no --option=usespnego=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=yes" \
"-k no --option=usespnego=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=no" \
"-k no --option=usespnego=yes --option=clientntlmv2auth=yes" \
"-k no --option=usespnego=yes --option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no" \
"-k no --option=usespnego=yes --option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=yes" \
"-k no --option=usespnego=no --option=clientntlmv2auth=yes" \
"-k no --option=gensec:spnego=no --option=clientntlmv2auth=yes" \
"-k no --option=usespnego=no" ; do
2009-06-09 17:31:51 +04:00
name = " rpc.lsa.secrets on $transport with $bindoptions with $ntlmoptions "
2009-06-10 06:24:12 +04:00
plantest " $name " dc $smb4torture $transport :" \$SERVER[ $bindoptions ] " $ntlmoptions -U"\$USERNAME" %"\$PASSWORD" -W \$ DOMAIN --option= gensec:target_hostname= \$ NETBIOSNAME RPC-LSA-SECRETS " $* "
2007-10-26 00:20:52 +04:00
done
2009-06-10 06:24:12 +04:00
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 " $* "
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 " $* "
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*" " $* "
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*" " $* "
2007-10-26 00:20:52 +04:00
# Echo tests
transports = "ncacn_np ncacn_ip_tcp ncalrpc"
for transport in $transports ; do
for bindoptions in connect spnego spnego,sign spnego,seal $VALIDATE padcheck bigendian bigendian,seal; do
for ntlmoptions in \
"--option=socket:testnonblock=True --option=torture:quick=yes" ; do
2009-01-30 12:30:13 +03:00
env = "dc"
if test x" $transport " = x"ncalrpc" ; then
env = "dc:local"
fi
plantest " rpc.echo on $transport with $bindoptions and $ntlmoptions " $env $smb4torture $transport :" \$SERVER[ $bindoptions ] " $ntlmoptions -U"\$USERNAME" %"\$PASSWORD" -W "\$DOMAIN" RPC-ECHO " $* "
2007-10-26 00:20:52 +04:00
done
done
done
for transport in $transports ; do
for bindoptions in sign seal; do
for ntlmoptions in \
"--option=ntlmssp_client:ntlm2=yes --option=torture:quick=yes" \
"--option=ntlmssp_client:ntlm2=no --option=torture:quick=yes" \
"--option=ntlmssp_client:ntlm2=yes --option=ntlmssp_client:128bit=no --option=torture:quick=yes" \
"--option=ntlmssp_client:ntlm2=no --option=ntlmssp_client:128bit=no --option=torture:quick=yes" \
"--option=ntlmssp_client:ntlm2=yes --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes" \
"--option=ntlmssp_client:ntlm2=no --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes" \
"--option=clientntlmv2auth=yes --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes" \
"--option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:keyexchange=yes --option=torture:quick=yes" \
"--option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:keyexchange=no --option=torture:quick=yes" \
; do
2009-01-30 12:30:13 +03:00
env = "dc"
if test x" $transport " = x"ncalrpc" ; then
env = "dc:local"
fi
plantest " rpc.echo on $transport with $bindoptions and $ntlmoptions " $env $smb4torture $transport :" \$SERVER[ $bindoptions ] " $ntlmoptions -U"\$USERNAME" %"\$PASSWORD" -W \$ DOMAIN RPC-ECHO " $* "
2007-10-26 00:20:52 +04:00
done
done
done
2008-02-18 23:13:03 +03:00
plantest "rpc.echo on ncacn_np over smb2" dc $smb4torture ncacn_np:"\$SERVER[smb2]" -U"\$USERNAME" %"\$PASSWORD" -W \$ DOMAIN RPC-ECHO " $* "
2007-10-26 00:20:52 +04:00
2009-11-16 20:00:42 +03:00
plantest "ntp.signd" dc:local $smb4torture ncacn_np:"\$SERVER" -U"\$USERNAME" %"\$PASSWORD" -W \$ DOMAIN NTP-SIGND " $* "
2009-08-11 12:20:39 +04:00
2007-10-26 00:20:52 +04:00
# Tests against the NTVFS POSIX backend
2008-05-05 15:06:54 +04:00
NTVFSARGS = ""
2009-10-23 08:38:54 +04:00
NTVFSARGS = " ${ NTVFSARGS } --option=torture:sharedelay=10000 "
2008-05-05 15:06:54 +04:00
NTVFSARGS = " ${ NTVFSARGS } --option=torture:oplocktimeout=3 "
2009-10-23 08:38:54 +04:00
NTVFSARGS = " ${ NTVFSARGS } --option=torture:writetimeupdatedelay=50000 "
2008-05-05 15:06:54 +04:00
2007-12-10 06:33:33 +03:00
smb2 = ` $smb4torture --list | grep "^SMB2-" | xargs`
2008-04-17 13:25:19 +04:00
#The QFILEINFO-IPC test needs to be on ipc$
raw = ` $smb4torture --list | grep "^RAW-" | grep -v "RAW-QFILEINFO-IPC" | xargs`
2007-12-10 06:33:33 +03:00
base = ` $smb4torture --list | grep "^BASE-" | xargs`
2007-10-26 00:20:52 +04:00
for t in $base $raw $smb2 ; do
2008-02-25 09:42:38 +03:00
plansmbtorturetest " $t " dc $ADDARGS //\$ SERVER/tmp -U"\$USERNAME" %"\$PASSWORD" $NTVFSARGS
2007-10-26 00:20:52 +04:00
done
2008-04-17 13:25:19 +04:00
plansmbtorturetest "RAW-QFILEINFO-IPC" dc $ADDARGS //\$ SERVER/ipc$ -U"\$USERNAME" %"\$PASSWORD"
2008-01-06 04:03:36 +03:00
rap = ` $smb4torture --list | grep "^RAP-" | xargs`
for t in $rap ; do
2008-02-18 23:13:03 +03:00
plansmbtorturetest " $t " dc $ADDARGS //\$ SERVER/IPC\\ \$ -U"\$USERNAME" %"\$PASSWORD"
2008-01-06 04:03:36 +03:00
done
2007-10-26 00:20:52 +04:00
# Tests against the NTVFS CIFS backend
for t in $base $raw ; do
2008-02-25 09:42:38 +03:00
plantest " ntvfs.cifs.`normalize_testname $t ` " dc $VALGRIND $smb4torture //\$ NETBIOSNAME/cifs -U"\$USERNAME" %"\$PASSWORD" $NTVFSARGS $t
2007-10-26 00:20:52 +04:00
done
# Local tests
2007-12-10 06:33:33 +03:00
for t in ` $smb4torture --list | grep "^LOCAL-" | xargs` ; do
2008-02-19 01:27:55 +03:00
plansmbtorturetest " $t " none ncalrpc: " $* "
2007-10-26 00:20:52 +04:00
done
2009-01-21 12:12:04 +03:00
tdbtorture4 = " $samba4bindir /tdbtorture ${ EXEEXT } "
if test -f $tdbtorture4
2007-10-26 00:20:52 +04:00
then
2009-01-21 12:12:04 +03:00
plantest "tdb.stress" none $VALGRIND $tdbtorture4
2009-06-18 05:08:21 +04:00
else
skiptestsuite "tdb.stress" "Using system TDB, tdbtorture not available"
2007-10-26 00:20:52 +04:00
fi
2009-10-25 23:07:18 +03:00
plansmbtorturetest "DRS-UNIT" none ncalrpc: " $* "
2007-10-26 00:20:52 +04:00
# Pidl tests
2009-06-18 05:08:21 +04:00
for f in $samba4srcdir /../pidl/tests/*.pl; do
planperltest " pidl.`basename $f .pl` " none $f
done
planperltest "selftest.samba4.pl" none $samba4srcdir /../selftest/test_samba4.pl
2007-10-26 00:20:52 +04:00
# Blackbox Tests:
# tests that interact directly with the command-line tools rather than using
2008-09-16 20:34:40 +04:00
# the API. These mainly test that the various command-line options of commands
# work correctly.
2007-10-26 00:20:52 +04:00
2008-09-19 14:07:03 +04:00
plantest "blackbox.ndrdump" none $samba4srcdir /librpc/tests/test_ndrdump.sh
2008-09-08 08:18:04 +04:00
plantest "blackbox.net" dc $samba4srcdir /utils/tests/test_net.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN"
2008-03-28 13:57:15 +03:00
plantest "blackbox.kinit" dc $bbdir /test_kinit.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$REALM" "\$DOMAIN" " $PREFIX " $CONFIGURATION
2009-11-16 20:00:42 +03:00
plantest "blackbox.passwords" dc:local $bbdir /test_passwords.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$REALM" "\$DOMAIN" " $PREFIX "
plantest "blackbox.export.keytab" dc:local $bbdir /test_export_keytab.sh "\$SERVER" "\$USERNAME" "\$REALM" "\$DOMAIN" " $PREFIX "
2008-06-26 12:56:59 +04:00
plantest "blackbox.cifsdd" dc $samba4srcdir /client/tests/test_cifsdd.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN"
2008-02-09 19:17:21 +03:00
plantest "blackbox.nmblookup" dc $samba4srcdir /utils/tests/test_nmblookup.sh "\$NETBIOSNAME" "\$NETBIOSALIAS" "\$SERVER" "\$SERVER_IP"
plantest "blackbox.nmblookup" member $samba4srcdir /utils/tests/test_nmblookup.sh "\$NETBIOSNAME" "\$NETBIOSALIAS" "\$SERVER" "\$SERVER_IP"
2008-09-16 20:30:24 +04:00
plantest "blackbox.locktest" dc $samba4srcdir /torture/tests/test_locktest.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" " $PREFIX "
plantest "blackbox.masktest" dc $samba4srcdir /torture/tests/test_masktest.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" " $PREFIX "
plantest "blackbox.gentest" dc $samba4srcdir /torture/tests/test_gentest.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" " $PREFIX "
2009-01-30 10:25:27 +03:00
plantest "blackbox.wbinfo" dc:local $samba4srcdir /../nsswitch/tests/test_wbinfo.sh "\$DOMAIN" "\$USERNAME" "\$PASSWORD" "dc"
plantest "blackbox.wbinfo" member:local $samba4srcdir /../nsswitch/tests/test_wbinfo.sh "\$DOMAIN" "\$DC_USERNAME" "\$DC_PASSWORD" "member"
2007-10-26 00:20:52 +04:00
# Tests using the "Simple" NTVFS backend
for t in "BASE-RW1" ; do
2008-02-18 23:13:03 +03:00
plantest " ntvfs.simple.`normalize_testname $t ` " dc $VALGRIND $smb4torture $ADDARGS //\$ SERVER/simple -U"\$USERNAME" %"\$PASSWORD" $t
2007-10-26 00:20:52 +04:00
done
# Domain Member Tests
2008-02-18 23:13:03 +03:00
plantest "rpc.echo against member server with local creds" member $VALGRIND $smb4torture ncacn_np:"\$NETBIOSNAME" -U"\$NETBIOSNAME/\$USERNAME" %"\$PASSWORD" RPC-ECHO " $* "
plantest "rpc.echo against member server with domain creds" member $VALGRIND $smb4torture ncacn_np:"\$NETBIOSNAME" -U"\$DOMAIN/\$DC_USERNAME" %"\$DC_PASSWORD" RPC-ECHO " $* "
plantest "rpc.samr against member server with local creds" member $VALGRIND $smb4torture ncacn_np:"\$NETBIOSNAME" -U"\$NETBIOSNAME/\$USERNAME" %"\$PASSWORD" "RPC-SAMR" " $* "
plantest "rpc.samr.users against member server with local creds" member $VALGRIND $smb4torture ncacn_np:"\$NETBIOSNAME" -U"\$NETBIOSNAME/\$USERNAME" %"\$PASSWORD" "RPC-SAMR-USERS" " $* "
plantest "rpc.samr.passwords against member server with local creds" member $VALGRIND $smb4torture ncacn_np:"\$NETBIOSNAME" -U"\$NETBIOSNAME/\$USERNAME" %"\$PASSWORD" "RPC-SAMR-PASSWORDS" " $* "
2008-09-08 08:18:04 +04:00
plantest "blackbox.smbclient against member server with local creds" member $samba4srcdir /client/tests/test_smbclient.sh "\$NETBIOSNAME" "\$USERNAME" "\$PASSWORD" "\$NETBIOSNAME" " $PREFIX "
2007-10-26 00:20:52 +04:00
2008-09-09 23:10:08 +04:00
# Tests SMB signing
for mech in \
"-k no" \
"-k no --option=usespnego=no" \
"-k no --option=gensec:spengo=no" \
"-k yes" \
"-k yes --option=gensec:fake_gssapi_krb5=yes --option=gensec:gssapi_krb5=no" ; do
for signing in \
"--signing=on" \
"--signing=required" ; do
signoptions = " $mech $signing "
name = " smb.signing on with $signoptions "
plantest " $name " dc $VALGRIND $smb4torture //"\$NETBIOSNAME" /tmp $signoptions -U"\$USERNAME" %"\$PASSWORD" BASE-XCOPY " $* "
done
done
for mech in \
"-k no" \
"-k no --option=usespnego=no" \
"-k no --option=gensec:spengo=no" \
"-k yes" \
"-k yes --option=gensec:fake_gssapi_krb5=yes --option=gensec:gssapi_krb5=no" ; do
signoptions = " $mech --signing=off "
name = " smb.signing on with $signoptions "
plantest " $name domain-creds " member $VALGRIND $smb4torture //"\$NETBIOSNAME" /tmp $signoptions -U"\$DC_USERNAME" %"\$DC_PASSWORD" BASE-XCOPY " $* "
done
for mech in \
"-k no" \
"-k no --option=usespnego=no" \
"-k no --option=gensec:spengo=no" ; do
signoptions = " $mech --signing=off "
name = " smb.signing on with $signoptions "
2008-09-25 05:28:58 +04:00
plantest " $name local-creds " member $VALGRIND $smb4torture //"\$NETBIOSNAME" /tmp $signoptions -U"\$NETBIOSNAME/\$USERNAME" %"\$PASSWORD" BASE-XCOPY " $* "
2008-09-09 23:10:08 +04:00
done
2008-09-30 08:43:32 +04:00
plantest "smb.signing --signing=yes anon" dc $VALGRIND $smb4torture //"\$NETBIOSNAME" /tmp -k no --signing= yes -U% BASE-XCOPY " $* "
plantest "smb.signing --signing=required anon" dc $VALGRIND $smb4torture //"\$NETBIOSNAME" /tmp -k no --signing= required -U% BASE-XCOPY " $* "
plantest "smb.signing --signing=no anon" member $VALGRIND $smb4torture //"\$NETBIOSNAME" /tmp -k no --signing= no -U% BASE-XCOPY " $* "
2008-09-09 23:10:08 +04:00
2007-12-10 06:33:33 +03:00
NBT_TESTS = ` $smb4torture --list | grep "^NBT-" | xargs`
2007-10-26 00:20:52 +04:00
2008-02-18 23:13:03 +03:00
for t in $NBT_TESTS ; do
2008-02-20 12:51:26 +03:00
plansmbtorturetest " $t " dc //\$ SERVER/_none_ -U\$ USERNAME%\$ PASSWORD
2007-10-26 00:20:52 +04:00
done
2008-04-16 19:33:58 +04:00
WB_OPTS = "--option=\"torture:strict mode=no\""
2007-10-26 00:20:52 +04:00
WB_OPTS = " ${ WB_OPTS } --option=\"torture:timelimit=1\" "
2008-04-15 18:31:08 +04:00
WB_OPTS = " ${ WB_OPTS } --option=\"torture:winbindd separator=/\" "
2007-10-26 00:20:52 +04:00
WB_OPTS = " ${ WB_OPTS } --option=\"torture:winbindd netbios name=\$SERVER\" "
WB_OPTS = " ${ WB_OPTS } --option=\"torture:winbindd netbios domain=\$DOMAIN\" "
2007-12-10 06:33:33 +03:00
WINBIND_STRUCT_TESTS = ` $smb4torture --list | grep "^WINBIND-STRUCT" | xargs`
WINBIND_NDR_TESTS = ` $smb4torture --list | grep "^WINBIND-NDR" | xargs`
2007-10-26 00:20:52 +04:00
for env in dc member; do
for t in $WINBIND_STRUCT_TESTS ; do
2008-02-18 23:13:03 +03:00
plansmbtorturetest $t $env $WB_OPTS //_none_/_none_
2007-10-26 00:20:52 +04:00
done
for t in $WINBIND_NDR_TESTS ; do
2008-02-18 23:13:03 +03:00
plansmbtorturetest $t $env $WB_OPTS //_none_/_none_
2007-10-26 00:20:52 +04:00
done
done
2009-01-21 12:12:04 +03:00
nsstest4 = " $samba4bindir /nsstest ${ EXEEXT } "
if test -f $nsstest4
2007-10-26 00:20:52 +04:00
then
2009-01-21 12:12:04 +03:00
plantest "nss.test using winbind" member $VALGRIND $nsstest4 $samba4bindir /shared/libnss_winbind.so
2007-10-26 00:20:52 +04:00
fi
2007-11-21 13:47:55 +03:00
2009-02-03 18:21:54 +03:00
SUBUNITRUN = " $VALGRIND $PYTHON $samba4srcdir /scripting/bin/subunitrun "
plantest "ldb.python" none PYTHONPATH = " $PYTHONPATH : $samba4srcdir /lib/ldb/tests/python/ " $SUBUNITRUN api
plantest "credentials.python" none PYTHONPATH = " $PYTHONPATH : $samba4srcdir /auth/credentials/tests " $SUBUNITRUN bindings
2009-09-26 21:41:59 +04:00
plantest "gensec.python" none PYTHONPATH = " $PYTHONPATH : $samba4srcdir /auth/gensec/tests " $SUBUNITRUN bindings
2009-02-03 18:21:54 +03:00
plantest "registry.python" none PYTHONPATH = " $PYTHONPATH : $samba4srcdir /lib/registry/tests/ " $SUBUNITRUN bindings
2008-09-18 17:25:31 +04:00
plantest "tdb.python" none PYTHONPATH = " $PYTHONPATH :../lib/tdb/python/tests " $SUBUNITRUN simple
2009-02-03 18:21:54 +03:00
plantest "auth.python" none PYTHONPATH = " $PYTHONPATH : $samba4srcdir /auth/tests/ " $SUBUNITRUN bindings
plantest "security.python" none PYTHONPATH = " $PYTHONPATH : $samba4srcdir /libcli/security/tests " $SUBUNITRUN bindings
2009-09-23 18:54:17 +04:00
plantest "misc.python" none $SUBUNITRUN samba.tests.dcerpc.misc
2009-02-03 18:21:54 +03:00
plantest "param.python" none PYTHONPATH = " $PYTHONPATH : $samba4srcdir /param/tests " $SUBUNITRUN bindings
2008-02-15 18:06:57 +03:00
plantest "upgrade.python" none $SUBUNITRUN samba.tests.upgrade
plantest "samba.python" none $SUBUNITRUN samba.tests
plantest "provision.python" none $SUBUNITRUN samba.tests.provision
plantest "samba3.python" none $SUBUNITRUN samba.tests.samba3
2009-09-23 18:54:17 +04:00
plantest "samr.python" dc:local $SUBUNITRUN samba.tests.dcerpc.sam
plantest "dcerpc.bare.python" dc:local $SUBUNITRUN samba.tests.dcerpc.bare
plantest "unixinfo.python" dc:local $SUBUNITRUN samba.tests.dcerpc.unix
2008-05-29 19:38:12 +04:00
plantest "samdb.python" none $SUBUNITRUN samba.tests.samdb
2009-06-16 04:05:18 +04:00
plantest "shares.python" none $SUBUNITRUN samba.tests.shares
2009-02-03 18:21:54 +03:00
plantest "messaging.python" none PYTHONPATH = " $PYTHONPATH : $samba4srcdir /lib/messaging/tests " $SUBUNITRUN bindings
plantest "samba3sam.python" none PYTHONPATH = " $PYTHONPATH : $samba4srcdir /dsdb/samdb/ldb_modules/tests " $SUBUNITRUN samba3sam
2008-10-08 03:58:42 +04:00
plantest "subunit.python" none $SUBUNITRUN subunit
2009-09-23 18:54:17 +04:00
plantest "rpcecho.python" dc:local $SUBUNITRUN samba.tests.dcerpc.rpcecho
plantest "winreg.python" dc:local $SUBUNITRUN -U\$ USERNAME%\$ PASSWORD samba.tests.dcerpc.registry
2009-06-02 15:57:08 +04:00
plantest "ldap.python" dc PYTHONPATH = " $PYTHONPATH :../lib/subunit/python " $PYTHON $samba4srcdir /lib/ldb/tests/python/ldap.py $CONFIGURATION \$ SERVER -U\$ USERNAME%\$ PASSWORD -W \$ DOMAIN
2009-09-16 04:34:42 +04:00
plantest "ldap.possibleInferiors.python" dc $PYTHON $samba4srcdir /dsdb/samdb/ldb_modules/tests/possibleinferiors.py $CONFIGURATION ldap://\$ SERVER -U\$ USERNAME%\$ PASSWORD -W \$ DOMAIN
plantest "ldap.secdesc.python" dc PYTHONPATH = " $PYTHONPATH :../lib/subunit/python " $PYTHON $samba4srcdir /lib/ldb/tests/python/sec_descriptor.py $CONFIGURATION \$ SERVER -U\$ USERNAME%\$ PASSWORD -W \$ DOMAIN
2009-11-05 18:40:54 +03:00
plantest "ldap.acl.python" dc PYTHONPATH = " $PYTHONPATH :../lib/subunit/python " $PYTHON $samba4srcdir /lib/ldb/tests/python/acl.py $CONFIGURATION \$ SERVER -U\$ USERNAME%\$ PASSWORD -W \$ DOMAIN
2009-02-03 18:21:54 +03:00
plantest "blackbox.samba3dump" none $PYTHON $samba4srcdir /scripting/bin/samba3dump $samba4srcdir /../testdata/samba3
2008-02-15 18:06:57 +03:00
rm -rf $PREFIX /upgrade
2009-11-28 21:23:08 +03:00
plantest "blackbox.upgrade" none $PYTHON $samba4srcdir /setup/upgrade_from_s3 $CONFIGURATION --targetdir= $PREFIX /upgrade $samba4srcdir /../testdata/samba3 ../testdata/samba3/smb.conf
2008-02-15 18:06:57 +03:00
rm -rf $PREFIX /provision
mkdir $PREFIX /provision
2008-05-30 08:36:24 +04:00
plantest "blackbox.provision.py" none PYTHON = " $PYTHON " $samba4srcdir /setup/tests/blackbox_provision.sh " $PREFIX /provision "
2008-06-19 05:05:20 +04:00
plantest "blackbox.provision-backend.py" none PYTHON = " $PYTHON " $samba4srcdir /setup/tests/blackbox_provision-backend.sh " $PREFIX /provision "
2009-11-26 07:34:53 +03:00
plantest "blackbox.upgradeprovision.py" none PYTHON = " $PYTHON " $samba4srcdir /setup/tests/blackbox_upgradeprovision.sh " $PREFIX /provision "
2008-05-30 08:36:24 +04:00
plantest "blackbox.setpassword.py" none PYTHON = " $PYTHON " $samba4srcdir /setup/tests/blackbox_setpassword.sh " $PREFIX /provision "
plantest "blackbox.newuser.py" none PYTHON = " $PYTHON " $samba4srcdir /setup/tests/blackbox_newuser.sh " $PREFIX /provision "