From dc8ece0e26f49618232a78c1d2c4d97454633bde Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 25 Oct 2007 22:20:52 +0200 Subject: r25737: Integrate more of the test recipe code into one file, use different mechanism for determining the quicktest list. Quicktest is a bit verbose now (reports all the tests not run as SKIP:) (This used to be commit e99e9c167f49c5f8762c7ad16b10ff4aab98091e) --- source4/selftest/config.mk | 2 +- source4/selftest/env/Samba4.pm | 169 +++++++++++++++++++- source4/selftest/mk-keyblobs.sh | 156 ------------------- source4/selftest/samba4_tests.sh | 288 +++++++++++++++++++++++++++++++++++ source4/selftest/selftest.pl | 59 ++++--- source4/selftest/test_echo.sh | 38 ----- source4/selftest/test_ejs.sh | 18 --- source4/selftest/test_functions.sh | 15 -- source4/selftest/test_ldap.sh | 31 ---- source4/selftest/test_nbt.sh | 18 --- source4/selftest/test_nss.sh | 11 -- source4/selftest/test_rpc.sh | 61 -------- source4/selftest/test_s3upgrade.sh | 20 --- source4/selftest/test_session_key.sh | 30 ---- source4/selftest/test_swig.sh | 20 --- source4/selftest/test_winbind.sh | 28 ---- source4/selftest/tests_all.sh | 96 ------------ source4/selftest/tests_quick.sh | 47 ------ 18 files changed, 498 insertions(+), 609 deletions(-) delete mode 100755 source4/selftest/mk-keyblobs.sh create mode 100755 source4/selftest/samba4_tests.sh delete mode 100755 source4/selftest/test_echo.sh delete mode 100755 source4/selftest/test_ejs.sh delete mode 100755 source4/selftest/test_functions.sh delete mode 100755 source4/selftest/test_ldap.sh delete mode 100755 source4/selftest/test_nbt.sh delete mode 100755 source4/selftest/test_nss.sh delete mode 100755 source4/selftest/test_rpc.sh delete mode 100755 source4/selftest/test_s3upgrade.sh delete mode 100755 source4/selftest/test_session_key.sh delete mode 100755 source4/selftest/test_swig.sh delete mode 100755 source4/selftest/test_winbind.sh delete mode 100755 source4/selftest/tests_all.sh delete mode 100755 source4/selftest/tests_quick.sh (limited to 'source4/selftest') diff --git a/source4/selftest/config.mk b/source4/selftest/config.mk index 0f949997dfb..52148090ad0 100644 --- a/source4/selftest/config.mk +++ b/source4/selftest/config.mk @@ -1,7 +1,7 @@ SELFTEST = $(PERL) $(srcdir)/selftest/selftest.pl --prefix=${selftest_prefix} \ --builddir=$(builddir) --srcdir=$(srcdir) \ --expected-failures=$(srcdir)/samba4-knownfail \ - --skip=$(srcdir)/samba4-skip \ + --exclude=$(srcdir)/samba4-skip --testlist="./selftest/samba4_tests.sh|" \ $(TEST_OPTIONS) htmltest: everything diff --git a/source4/selftest/env/Samba4.pm b/source4/selftest/env/Samba4.pm index c5b33bc8975..a43c4dc965a 100644 --- a/source4/selftest/env/Samba4.pm +++ b/source4/selftest/env/Samba4.pm @@ -271,6 +271,172 @@ moduleload syncprov return ($slapd_conf, $pidfile); } +sub mk_keyblobs($$) +{ + my ($self, $tlsdir) = @_; + + #TLS and PKINIT crypto blobs + my $dhfile = "$tlsdir/dhparms.pem"; + my $cafile = "$tlsdir/ca.pem"; + my $certfile = "$tlsdir/cert.pem"; + my $reqkdc = "$tlsdir/req-kdc.der"; + my $kdccertfile = "$tlsdir/kdc.pem"; + my $keyfile = "$tlsdir/key.pem"; + my $adminkeyfile = "$tlsdir/adminkey.pem"; + my $reqadmin = "$tlsdir/req-admin.der"; + my $admincertfile = "$tlsdir/admincert.pem"; + + mkdir($tlsdir, 0777); + + #This is specified here to avoid draining entropy on every run + open(DHFILE, ">$dhfile"); + print DHFILE <$keyfile"); + print KEYFILE <$adminkeyfile"); + + print ADMINKEYFILE <$cafile"); + print CAFILE <$certfile"); + print CERTFILE <$kdccertfile"); + print KDCCERTFILE <$admincertfile"); + print ADMINCERTFILE <mk_keyblobs($tlsdir); open(KRB5CONF, ">$krb5_config"); print KRB5CONF " diff --git a/source4/selftest/mk-keyblobs.sh b/source4/selftest/mk-keyblobs.sh deleted file mode 100755 index 7792e0a6d5e..00000000000 --- a/source4/selftest/mk-keyblobs.sh +++ /dev/null @@ -1,156 +0,0 @@ -#TLS and PKINIT crypto blobs -DHFILE=$TLSDIR/dhparms.pem -CAFILE=$TLSDIR/ca.pem -CERTFILE=$TLSDIR/cert.pem -REQKDC=$TLSDIR/req-kdc.der -KDCCERTFILE=$TLSDIR/kdc.pem -KEYFILE=$TLSDIR/key.pem -ADMINKEYFILE=$TLSDIR/adminkey.pem -REQADMIN=$TLSDIR/req-admin.der -ADMINKEYFILE=$TLSDIR/adminkey.pem -ADMINCERTFILE=$TLSDIR/admincert.pem - -mkdir -p $TLSDIR - -#This is specified here to avoid draining entropy on every run -cat >$DHFILE<$KEYFILE<$ADMINKEYFILE<$CAFILE<$CERTFILE<$KDCCERTFILE<$ADMINCERTFILE< /dev/null; then + for options in "" "-U\$USERNAME%\$PASSWORD"; do + plantest "TESTING PROTOCOL ldaps with options $options" dc $samba4srcdir/../testprogs/blackbox/test_ldb.sh ldaps \$SERVER_IP $options + done +fi +for t in LDAP-CLDAP LDAP-BASIC LDAP-SCHEMA LDAP-UPTODATEVECTOR +do + plantest "$t" dc $samba4bindir/smbtorture $TORTURE_OPTIONS "-U\$USERNAME%\$PASSWORD" //\$SERVER_IP/_none_ $t +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 +plantest "ldb" none $LDBDIR/tests/test-tdb.sh + +plantest "ejs ldap" dc $SCRIPTDIR/ldap.js $CONFIGURATION \$SERVER -U\$USERNAME%\$PASSWORD + +# 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" +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" +slow_ncacn_np_tests="RPC-SAMLOGON RPC-SAMR RPC-SAMR-USERS RPC-SAMR-PASSWORDS" +slow_ncalrpc_tests="RPC-SAMR RPC-SAMR-PASSWORDS" +slow_ncacn_ip_tcp_tests="RPC-SAMR RPC-SAMR-PASSWORDS RPC-CRACKNAMES" + +all_tests="$ncalrpc_tests $ncacn_np_tests $ncacn_ip_tcp_tests $slow_ncalrpc_tests $slow_ncacn_np_tests $slow_ncacn_ip_tcp_tests RPC-SECRETS RPC-SAMBA3-SHARESEC" + +# Make sure all tests get run +for t in `$samba4bindir/smbtorture --list | grep "^RPC-"` +do + echo $all_tests | grep $t > /dev/null + 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 + case $transport in + ncalrpc) tests=$ncalrpc_tests ;; + ncacn_np) tests=$ncacn_np_tests ;; + ncacn_ip_tcp) tests=$ncacn_ip_tcp_tests ;; + esac + for t in $tests; do + plantest "$t on $transport with $bindoptions" dc $VALGRIND $samba4bindir/smbtorture $TORTURE_OPTIONS $transport:"\$SERVER[$bindoptions]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN $t "$*" + done + plantest "RPC-SAMBA3-SHARESEC on $transport with $bindoptions" dc $VALGRIND $samba4bindir/smbtorture $TORTURE_OPTIONS $transport:"\$SERVER[$bindoptions]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN --option=torture:share=tmp $t "$*" + done +done + +for bindoptions in "" $VALIDATE bigendian; do + for t in $auto_rpc_tests; do + plantest "$t with $bindoptions" dc $VALGRIND $samba4bindir/smbtorture $TORTURE_OPTIONS "\$SERVER[$bindoptions]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN $t "$*" + done +done + +for bindoptions in connect $VALIDATE ; do + for transport in ncalrpc ncacn_np ncacn_ip_tcp; do + case $transport in + ncalrpc) tests=$slow_ncalrpc_tests ;; + ncacn_np) tests=$slow_ncacn_np_tests ;; + ncacn_ip_tcp) tests=$slow_ncacn_ip_tcp_tests ;; + esac + for t in $tests; do + plantest "$t on $transport with $bindoptions" dc $VALGRIND $samba4bindir/smbtorture $TORTURE_OPTIONS $transport:"\$SERVER[$bindoptions]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN $t "$*" + done + done +done + + +# Tests for the NET API + +net=`$samba4bindir/smbtorture --list | grep ^NET-` + +for t in $net; do + plantest "$t" dc $VALGRIND $samba4bindir/smbtorture $TORTURE_OPTIONS "\$SERVER[$VALIDATE]" -U"\$USERNAME"%"\$PASSWORD" -W "\$DOMAIN" $t "$*" +done + +# Tests for session keys + +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 + name="RPC-SECRETS on $transport with $bindoptions with $ntlmoptions" + plantest "$name" dc $samba4bindir/smbtorture $TORTURE_OPTIONS $transport:"\$SERVER[$bindoptions]" $ntlmoptions -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN --option=gensec:target_hostname=\$NETBIOSNAME RPC-SECRETS "$*" +done +plantest "RPC-SECRETS on $transport with $bindoptions with Kerberos" dc $samba4bindir/smbtorture $TORTURE_OPTIONS $transport:"\$SERVER[$bindoptions]" -k yes -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN "--option=gensec:target_hostname=\$NETBIOSNAME" RPC-SECRETS "$*" +plantest "RPC-SECRETS on $transport with $bindoptions with Kerberos - use target principal" dc $samba4bindir/smbtorture $TORTURE_OPTIONS $transport:"\$SERVER[$bindoptions]" -k yes -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN "--option=clientusespnegoprincipal=yes" "--option=gensec:target_hostname=\$NETBIOSNAME" RPC-SECRETS "$*" + plantest "RPC-SECRETS on $transport with Kerberos - use Samba3 style login" dc $samba4bindir/smbtorture $TORTURE_OPTIONS $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-SECRETS-none*" "$*" + plantest "RPC-SECRETS on $transport with Kerberos - use Samba3 style login, use target principal" dc $samba4bindir/smbtorture $TORTURE_OPTIONS $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-SECRETS-none*" "$*" + +# 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 + plantest "RPC-ECHO on $transport with $bindoptions and $ntlmoptions" dc $samba4bindir/smbtorture $TORTURE_OPTIONS $transport:"\$SERVER[$bindoptions]" $ntlmoptions -U"\$USERNAME"%"\$PASSWORD" -W "\$DOMAIN" RPC-ECHO "$*" + 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 + plantest "RPC-ECHO on $transport with $bindoptions and $ntlmoptions" dc $samba4bindir/smbtorture $TORTURE_OPTIONS $transport:"\$SERVER[$bindoptions]" $ntlmoptions -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN RPC-ECHO "$*" + done + done +done + +plantest "RPC-ECHO on ncacn_np over smb2" dc $samba4bindir/smbtorture $TORTURE_OPTIONS ncacn_np:"\$SERVER[smb2]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN RPC-ECHO "$*" + +# Tests against the NTVFS POSIX backend +smb2=`$samba4bindir/smbtorture --list | grep "^SMB2-" | xargs` +raw=`$samba4bindir/smbtorture --list | grep "^RAW-" | xargs` +base=`$samba4bindir/smbtorture --list | grep "^BASE-" | xargs` + +for t in $base $raw $smb2; do + plantest "$t" dc $VALGRIND $samba4bindir/smbtorture $TORTURE_OPTIONS $ADDARGS //\$SERVER/tmp -U"\$USERNAME"%"\$PASSWORD" $t +done + +# Tests against the NTVFS CIFS backend +for t in $base $raw; do + plantest "ntvfs/cifs $t" dc $VALGRIND $samba4bindir/smbtorture $TORTURE_OPTIONS //\$NETBIOSNAME/cifs -U"\$USERNAME"%"\$PASSWORD" $t +done + +# Local tests + +for t in `$samba4bindir/smbtorture --list | grep "^LOCAL-" | xargs`; do + plantest "$t" none $VALGRIND $samba4bindir/smbtorture $TORTURE_OPTIONS ncalrpc: $t "$*" +done + +if test -f $samba4bindir/tdbtorture +then + plantest "tdb stress" none $VALGRIND $samba4bindir/tdbtorture +fi + +# Pidl tests + +if test x"${PIDL_TESTS_SKIP}" = x"yes"; then + echo "Skipping pidl tests - PIDL_TESTS_SKIP=yes" +elif $PERL -e 'eval require Test::More;' > /dev/null 2>&1; then + for f in $samba4srcdir/pidl/tests/*.pl; do + plantest "pidl/`basename $f`" none $PERL $f "|" $samba4srcdir/script/harness2subunit.pl + done +else + echo "Skipping pidl tests - Test::More not installed" +fi + +# Blackbox Tests: +# tests that interact directly with the command-line tools rather than using +# the API + +bbdir=$incdir/../../testprogs/blackbox + +plantest "blackbox.smbclient" dc $bbdir/test_smbclient.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" "$PREFIX" +plantest "blackbox.kinit" dc $bbdir/test_kinit.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$REALM" "\$DOMAIN" "$PREFIX" +plantest "blackbox.cifsdd" dc $bbdir/test_cifsdd.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" +plantest "blackbox.nmblookup:dc" dc $bbdir/test_nmblookup.sh "\$NETBIOSNAME" "\$NETBIOSALIAS" "\$SERVER" "\$SERVER_IP" +plantest "blackbox.nmblookup:member" member $bbdir/test_nmblookup.sh "\$NETBIOSNAME" "\$NETBIOSALIAS" "\$SERVER" "\$SERVER_IP" + +# Tests using the "Simple" NTVFS backend + +for t in "BASE-RW1"; do + plantest "ntvfs/simple $t" dc $VALGRIND $samba4bindir/smbtorture $TORTURE_OPTIONS $ADDARGS //\$SERVER/simple -U"\$USERNAME"%"\$PASSWORD" $t +done + +DATADIR=$samba4srcdir/../testdata + +plantest "parse samba3" none $samba4bindir/smbscript $DATADIR/samba3/verify $CONFIGURATION $DATADIR/samba3 +plantest "samba3sam.js" none $SCRIPTDIR/samba3sam.js $CONFIGURATION `pwd` $DATADIR/samba3/ + +rm -rf $PREFIX/upgrade +mkdir -p $PREFIX/upgrade +#plantest "upgrade" none $samba4bindir/smbscript setup/upgrade $CONFIGURATION --verify --targetdir=$PREFIX ../testdata/samba3 ../testdata/samba3/smb.conf + +# Domain Member Tests + +plantest "RPC-ECHO against member server with local creds" member $VALGRIND $samba4bindir/smbtorture $TORTURE_OPTIONS ncacn_np:"\$NETBIOSNAME" -U"\$NETBIOSNAME/\$USERNAME"%"\$PASSWORD" RPC-ECHO "$*" +plantest "RPC-ECHO against member server with domain creds" member $VALGRIND $samba4bindir/smbtorture $TORTURE_OPTIONS ncacn_np:"\$NETBIOSNAME" -U"\$DOMAIN/\$DC_USERNAME"%"\$DC_PASSWORD" RPC-ECHO "$*" +plantest "RPC-SAMR against member server with local creds" member $VALGRIND $samba4bindir/smbtorture $TORTURE_OPTIONS ncacn_np:"\$NETBIOSNAME" -U"\$NETBIOSNAME/\$USERNAME"%"\$PASSWORD" "RPC-SAMR" "$*" +plantest "RPC-SAMR-USERS against member server with local creds" member $VALGRIND $samba4bindir/smbtorture $TORTURE_OPTIONS ncacn_np:"\$NETBIOSNAME" -U"\$NETBIOSNAME/\$USERNAME"%"\$PASSWORD" "RPC-SAMR-USERS" "$*" +plantest "RPC-SAMR-PASSWORDS against member server with local creds" member $VALGRIND $samba4bindir/smbtorture $TORTURE_OPTIONS ncacn_np:"\$NETBIOSNAME" -U"\$NETBIOSNAME/\$USERNAME"%"\$PASSWORD" "RPC-SAMR-PASSWORDS" "$*" +plantest "wbinfo -a against member server with domain creds" member $VALGRIND $samba4bindir/wbinfo -a "\$DOMAIN/\$DC_USERNAME"%"\$DC_PASSWORD" + +NBT_TESTS=`$samba4bindir/smbtorture --list | grep "^NBT-" | xargs` + +for f in $NBT_TESTS; do + plantest "$f:$env" "dc" $samba4bindir/smbtorture $TORTURE_OPTIONS //\$SERVER/_none_ $f -U\$USERNAME%\$PASSWORD +done + +WB_OPTS="${TORTURE_OPTIONS}" +WB_OPTS="${WB_OPTS} --option=\"torture:strict mode=yes\"" +WB_OPTS="${WB_OPTS} --option=\"torture:timelimit=1\"" +WB_OPTS="${WB_OPTS} --option=\"torture:winbindd separator=\\\\\"" +WB_OPTS="${WB_OPTS} --option=\"torture:winbindd private pipe dir=\$WINBINDD_PRIV_PIPE_DIR\"" +WB_OPTS="${WB_OPTS} --option=\"torture:winbindd netbios name=\$SERVER\"" +WB_OPTS="${WB_OPTS} --option=\"torture:winbindd netbios domain=\$DOMAIN\"" + +WINBIND_STRUCT_TESTS=`$samba4bindir/smbtorture --list | grep "^WINBIND-STRUCT" | xargs` +WINBIND_NDR_TESTS=`$samba4bindir/smbtorture --list | grep "^WINBIND-NDR" | xargs` +for env in dc member; do + for t in $WINBIND_STRUCT_TESTS; do + plantest "$ENVNAME:$t" $ENVNAME $samba4bindir/smbtorture $WB_OPTS //_none_/_none_ $t + done + + for t in $WINBIND_NDR_TESTS; do + plantest "$ENVNAME:$t" $ENVNAME $samba4bindir/smbtorture $WB_OPTS //_none_/_none_ $t + done +done + +# Tests for SWIG +# export PYTHONPATH=lib/tdb/swig:lib/ldb/swig:scripting/swig:$PYTHONPATH +# export LD_LIBRARY_PATH=bin:$LD_LIBRARY_PATH + +# plantest "tdb wrappers" scripting/swig/torture/torture_tdb.py +# plantest "ldb wrappers" scripting/swig/torture/torture_ldb.py + +if test -f $samba4bindir/nsstest +then + plantest "NSS-TEST using winbind" member $VALGRIND $samba4bindir/nsstest $samba4bindir/shared/libnss_winbind.so +fi diff --git a/source4/selftest/selftest.pl b/source4/selftest/selftest.pl index 634b1bb4fe3..725e1dc1537 100755 --- a/source4/selftest/selftest.pl +++ b/source4/selftest/selftest.pl @@ -13,7 +13,7 @@ selftest - Samba test runner selftest --help -selftest [--srcdir=DIR] [--builddir=DIR] [--target=samba4|samba3|win] [--socket-wrapper] [--quick] [--one] [--prefix=prefix] [--immediate] [--testlist=FILE] [TESTS] +selftest [--srcdir=DIR] [--builddir=DIR] [--target=samba4|samba3|win] [--socket-wrapper] [--quick] [--exclude=FILE] [--include=FILE] [--one] [--prefix=prefix] [--immediate] [--testlist=FILE] [TESTS] =head1 DESCRIPTION @@ -72,12 +72,19 @@ TESTSUITE-NAME/TEST-NAME The reason for a test can also be specified, by adding a hash sign (#) and the reason after the test name. -=item I<--skip> +=item I<--exclude> -Specify a file containing a list of tests that should be skipped. Possible candidates are -tests that segfault the server, flip or don't end. The format of this file is the same as +Specify a file containing a list of tests that should be skipped. Possible +candidates are tests that segfault the server, flip or don't end. The format of this file is the same as for the --expected-failures flag. +=item I<--include> + +Specify a file containing a list of tests that should be run. Same format +as the --exclude flag. + +Not includes specified means all tests will be run. + =item I<--one> Abort as soon as one test fails. @@ -137,7 +144,8 @@ my $opt_socket_wrapper_keep_pcap = undef; my $opt_one = 0; my $opt_immediate = 0; my $opt_expected_failures = undef; -my @opt_skip = (); +my @opt_exclude = (); +my @opt_include = (); my $opt_verbose = 0; my $opt_testenv = 0; my $ldap = undef; @@ -146,14 +154,15 @@ my $opt_resetup_env = undef; my $opt_bindir = undef; my $opt_no_lazy_setup = undef; my $opt_format = "plain"; -my @opt_testlists = (); +my @testlists = (); my $srcdir = "."; my $builddir = "."; my $prefix = "./st"; my @expected_failures = (); -my @skips = (); +my @includes = (); +my @excludes = (); my $statistics = { START_TIME => time(), @@ -193,7 +202,16 @@ sub expecting_failure($) sub skip($) { my ($name) = @_; - return find_in_list(\@skips, $name); + + my $reason = find_in_list(\@excludes, $name); + + return $reason if $reason; + + return undef unless ($#includes > -1); + + return "not included" if (not find_in_list(\@includes, $name)); + + return undef; } sub getlog_env($); @@ -322,7 +340,8 @@ my $result = GetOptions ( 'one' => \$opt_one, 'immediate' => \$opt_immediate, 'expected-failures=s' => \$opt_expected_failures, - 'skip=s' => \@opt_skip, + 'exclude=s' => \@opt_exclude, + 'include=s' => \@opt_include, 'srcdir=s' => \$srcdir, 'builddir=s' => \$builddir, 'verbose' => \$opt_verbose, @@ -333,7 +352,7 @@ my $result = GetOptions ( 'resetup-environment' => \$opt_resetup_env, 'bindir:s' => \$opt_bindir, 'format=s' => \$opt_format, - 'testlist=s' => \@opt_testlists + 'testlist=s' => \@testlists ); exit(1) if (not $result); @@ -466,8 +485,16 @@ if (defined($opt_expected_failures)) { @expected_failures = read_test_regexes($opt_expected_failures); } -foreach (@opt_skip) { - push (@skips, read_test_regexes($_)); +foreach (@opt_exclude) { + push (@excludes, read_test_regexes($_)); +} + +if ($opt_quick) { + push (@includes, read_test_regexes("samba4-quick")); +} + +foreach (@opt_include) { + push (@includes, read_test_regexes($_)); } my $interfaces = join(',', ("127.0.0.6/8", @@ -580,13 +607,11 @@ sub read_testlist($) return @ret; } -if ($opt_quick) { - @todo = read_testlist("$testsdir/tests_quick.sh|"); -} else { - @todo = read_testlist("$testsdir/tests_all.sh|"); +if ($#testlists == -1) { + die("No testlists specified"); } -foreach (@opt_testlists) { +foreach (@testlists) { push(@todo, read_testlist($_)); } diff --git a/source4/selftest/test_echo.sh b/source4/selftest/test_echo.sh deleted file mode 100755 index 38bbec4f4e4..00000000000 --- a/source4/selftest/test_echo.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh - -incdir=`dirname $0` -. $incdir/test_functions.sh - -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 - name="RPC-ECHO on $transport with $bindoptions and $ntlmoptions" - plantest "$name" dc $samba4bindir/smbtorture $TORTURE_OPTIONS $transport:"\$SERVER[$bindoptions]" $ntlmoptions -U"\$USERNAME"%"\$PASSWORD" -W "\$DOMAIN" RPC-ECHO "$*" - 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 - name="RPC-ECHO on $transport with $bindoptions and $ntlmoptions" - plantest "$name" dc $samba4bindir/smbtorture $TORTURE_OPTIONS $transport:"\$SERVER[$bindoptions]" $ntlmoptions -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN RPC-ECHO "$*" - done - done -done - -name="RPC-ECHO on ncacn_np over smb2" -plantest "$name" dc $samba4bindir/smbtorture $TORTURE_OPTIONS ncacn_np:"\$SERVER[smb2]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN RPC-ECHO "$*" diff --git a/source4/selftest/test_ejs.sh b/source4/selftest/test_ejs.sh deleted file mode 100755 index 86ea6cd8c90..00000000000 --- a/source4/selftest/test_ejs.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh -# test some simple EJS operations - -CONFIGURATION="$*" - -incdir=`dirname $0` -. $incdir/test_functions.sh - -SCRIPTDIR=$samba4srcdir/../testprogs/ejs -DATADIR=$samba4srcdir/../testdata - -plantest "base.js" dc "$SCRIPTDIR/base.js" $CONFIGURATION -plantest "samr.js" dc "$SCRIPTDIR/samr.js" $CONFIGURATION ncalrpc: -U\$USERNAME%\$PASSWORD -plantest "echo.js" dc "$SCRIPTDIR/echo.js" $CONFIGURATION ncalrpc: -U\$USERNAME%\$PASSWORD -#plantest "ejsnet.js" dc "$SCRIPTDIR/ejsnet.js" $CONFIGURATION -U\$USERNAME%\$PASSWORD \$DOMAIN ejstestuser -plantest "ldb.js" none "$SCRIPTDIR/ldb.js" `pwd` $CONFIGURATION -plantest "samba3sam.js" none $SCRIPTDIR/samba3sam.js $CONFIGURATION `pwd` $DATADIR/samba3/ -plantest "winreg" dc $samba4srcdir/scripting/bin/winreg $CONFIGURATION ncalrpc: 'HKLM' -U\$USERNAME%\$PASSWORD diff --git a/source4/selftest/test_functions.sh b/source4/selftest/test_functions.sh deleted file mode 100755 index 1983760c648..00000000000 --- a/source4/selftest/test_functions.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -plantest() { - name=$1 - env=$2 - shift 2 - cmdline="$*" - echo "-- TEST --" - echo $name - echo $env - echo $cmdline -} - -samba4srcdir=$incdir/.. -samba4bindir=$samba4srcdir/bin diff --git a/source4/selftest/test_ldap.sh b/source4/selftest/test_ldap.sh deleted file mode 100755 index 85c3f959159..00000000000 --- a/source4/selftest/test_ldap.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -# test some simple LDAP and CLDAP operations - -incdir=`dirname $0` -. $incdir/test_functions.sh - -for options in "" "--option=socket:testnonblock=true" "-U\$USERNAME%\$PASSWORD --option=socket:testnonblock=true" "-U\$USERNAME%\$PASSWORD"; do - plantest "TESTING PROTOCOL ldap with options $options" dc $samba4srcdir/../testprogs/blackbox/test_ldb.sh ldap \$SERVER_IP $options -done -# see if we support ldaps -if grep ENABLE_GNUTLS.1 include/config.h > /dev/null; then - for options in "" "-U\$USERNAME%\$PASSWORD"; do - plantest "TESTING PROTOCOL ldaps with options $options" dc $samba4srcdir/../testprogs/blackbox/test_ldb.sh ldaps \$SERVER_IP $options - done -fi -for t in LDAP-CLDAP LDAP-BASIC LDAP-SCHEMA LDAP-UPTODATEVECTOR -do - plantest "$t" dc $samba4bindir/smbtorture $TORTURE_OPTIONS "-U\$USERNAME%\$PASSWORD" //\$SERVER_IP/_none_ $t -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 -test "$TORTURE_QUICK" = "yes" || { - LDBDIR=$samba4srcdir/lib/ldb - export LDBDIR - plantest "ldb" none $LDBDIR/tests/test-tdb.sh -} - -SCRIPTDIR=$samba4srcdir/../testprogs/ejs - -plantest "ejs ldap" dc $SCRIPTDIR/ldap.js $CONFIGURATION \$SERVER -U\$USERNAME%\$PASSWORD diff --git a/source4/selftest/test_nbt.sh b/source4/selftest/test_nbt.sh deleted file mode 100755 index 22062d5d447..00000000000 --- a/source4/selftest/test_nbt.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh -# test some NBT/WINS operations - -incdir=`dirname $0` -. $incdir/test_functions.sh - -TEST_NBT_ENVNAME=$1 -if test x"$TEST_NBT_ENVNAME" = x"";then - TEST_NBT_ENVNAME="dc" -fi - -NBT_TESTS=`$samba4bindir/smbtorture --list | grep "^NBT-" | xargs` - -if test x"$TEST_NBT_ENVNAME" = x"dc";then - for f in $NBT_TESTS; do - plantest "$f:$TEST_NBT_ENVNAME" $TEST_NBT_ENVNAME $samba4bindir/smbtorture $TORTURE_OPTIONS //\$SERVER/_none_ $f -U\$USERNAME%\$PASSWORD - done -fi diff --git a/source4/selftest/test_nss.sh b/source4/selftest/test_nss.sh deleted file mode 100755 index 689d1038f1a..00000000000 --- a/source4/selftest/test_nss.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -incdir=`dirname $0` -. $incdir/test_functions.sh - -if [ ! -f $samba4bindir/nsstest ]; then - exit 0 -fi - -plantest "NSS-TEST using winbind" member $VALGRIND $samba4bindir/nsstest $samba4bindir/shared/libnss_winbind.so - diff --git a/source4/selftest/test_rpc.sh b/source4/selftest/test_rpc.sh deleted file mode 100755 index 3ac4e3de664..00000000000 --- a/source4/selftest/test_rpc.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/sh - -# 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" -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" -slow_ncacn_np_tests="RPC-SAMLOGON RPC-SAMR RPC-SAMR-USERS RPC-SAMR-PASSWORDS" -slow_ncalrpc_tests="RPC-SAMR RPC-SAMR-PASSWORDS" -slow_ncacn_ip_tcp_tests="RPC-SAMR RPC-SAMR-PASSWORDS RPC-CRACKNAMES" - -incdir=`dirname $0` -. $incdir/test_functions.sh - -all_tests="$ncalrpc_tests $ncacn_np_tests $ncacn_ip_tcp_tests $slow_ncalrpc_tests $slow_ncacn_np_tests $slow_ncacn_ip_tcp_tests RPC-SECRETS RPC-SAMBA3-SHARESEC" - -# Make sure all tests get run -for t in `$samba4bindir/smbtorture --list | grep "^RPC-"` -do - echo $all_tests | grep $t > /dev/null - 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 - case $transport in - ncalrpc) tests=$ncalrpc_tests ;; - ncacn_np) tests=$ncacn_np_tests ;; - ncacn_ip_tcp) tests=$ncacn_ip_tcp_tests ;; - esac - for t in $tests; do - name="$t on $transport with $bindoptions" - plantest "$name" dc $VALGRIND $samba4bindir/smbtorture $TORTURE_OPTIONS $transport:"\$SERVER[$bindoptions]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN $t "$*" - done - plantest "RPC-SAMBA3-SHARESEC on $transport with $bindoptions" dc $VALGRIND $samba4bindir/smbtorture $TORTURE_OPTIONS $transport:"\$SERVER[$bindoptions]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN --option=torture:share=tmp $t "$*" - done -done - -for bindoptions in "" $VALIDATE bigendian; do - for t in $auto_rpc_tests; do - plantest "$t with $bindoptions" dc $VALGRIND $samba4bindir/smbtorture $TORTURE_OPTIONS "\$SERVER[$bindoptions]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN $t "$*" - done -done - -for bindoptions in connect $VALIDATE ; do - for transport in ncalrpc ncacn_np ncacn_ip_tcp; do - case $transport in - ncalrpc) tests=$slow_ncalrpc_tests ;; - ncacn_np) tests=$slow_ncacn_np_tests ;; - ncacn_ip_tcp) tests=$slow_ncacn_ip_tcp_tests ;; - esac - for t in $tests; do - name="$t on $transport with $bindoptions" - plantest "$name" dc $VALGRIND $samba4bindir/smbtorture $TORTURE_OPTIONS $transport:"\$SERVER[$bindoptions]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN $t "$*" - done - done -done - diff --git a/source4/selftest/test_s3upgrade.sh b/source4/selftest/test_s3upgrade.sh deleted file mode 100755 index 692199acda8..00000000000 --- a/source4/selftest/test_s3upgrade.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -PREFIX=$1 - -if [ -z "$PREFIX" ] -then - echo "Usage: test_s3upgrade.sh " - exit 1 -fi - -mkdir -p $PREFIX -rm -f $PREFIX/* - -incdir=`dirname $0` -. $incdir/test_functions.sh - -SCRIPTDIR=$samba4srcdir/../testprogs/ejs -DATADIR=$samba4srcdir/../testdata - -plantest "parse samba3" none $samba4bindir/smbscript $DATADIR/samba3/verify $CONFIGURATION $DATADIR/samba3 -#plantest "upgrade" none $samba4bindir/smbscript setup/upgrade $CONFIGURATION --verify --targetdir=$PREFIX ../testdata/samba3 ../testdata/samba3/smb.conf diff --git a/source4/selftest/test_session_key.sh b/source4/selftest/test_session_key.sh deleted file mode 100755 index 93be4f99f28..00000000000 --- a/source4/selftest/test_session_key.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -incdir=`dirname $0` -. $incdir/test_functions.sh - -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 - name="RPC-SECRETS on $transport with $bindoptions with $ntlmoptions" - plantest "$name" dc $samba4bindir/smbtorture $TORTURE_OPTIONS $transport:"\$SERVER[$bindoptions]" $ntlmoptions -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN --option=gensec:target_hostname=\$NETBIOSNAME RPC-SECRETS "$*" -done -name="RPC-SECRETS on $transport with $bindoptions with Kerberos" -plantest "$name" dc $samba4bindir/smbtorture $TORTURE_OPTIONS $transport:"\$SERVER[$bindoptions]" -k yes -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN "--option=gensec:target_hostname=\$NETBIOSNAME" RPC-SECRETS "$*" -name="RPC-SECRETS on $transport with $bindoptions with Kerberos - use target principal" -plantest "$name" dc $samba4bindir/smbtorture $TORTURE_OPTIONS $transport:"\$SERVER[$bindoptions]" -k yes -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN "--option=clientusespnegoprincipal=yes" "--option=gensec:target_hostname=\$NETBIOSNAME" RPC-SECRETS "$*" -name="RPC-SECRETS on $transport with Kerberos - use Samba3 style login" - plantest "$name" dc $samba4bindir/smbtorture $TORTURE_OPTIONS $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-SECRETS-none*" "$*" -name="RPC-SECRETS on $transport with Kerberos - use Samba3 style login, use target principal" - plantest "$name" dc $samba4bindir/smbtorture $TORTURE_OPTIONS $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-SECRETS-none*" "$*" diff --git a/source4/selftest/test_swig.sh b/source4/selftest/test_swig.sh deleted file mode 100755 index 9f5e7c0ebf0..00000000000 --- a/source4/selftest/test_swig.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -if [ $# -ne 0 ]; then - cat < /dev/null 2>&1; then - for f in $samba4srcdir/pidl/tests/*.pl; do - plantest "pidl/`basename $f`" none $PERL $f "|" $samba4srcdir/script/harness2subunit.pl - done -else - echo "Skipping pidl tests - Test::More not installed" -fi - -# Blackbox Tests: -# tests that interact directly with the command-line tools rather than using -# the API - -bbdir=$incdir/../../testprogs/blackbox - -plantest "blackbox.smbclient" dc $bbdir/test_smbclient.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" "$PREFIX" -plantest "blackbox.kinit" dc $bbdir/test_kinit.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$REALM" "\$DOMAIN" "$PREFIX" -plantest "blackbox.cifsdd" dc $bbdir/test_cifsdd.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" -plantest "blackbox.nmblookup:dc" dc $bbdir/test_nmblookup.sh "\$NETBIOSNAME" "\$NETBIOSALIAS" "\$SERVER" "\$SERVER_IP" -plantest "blackbox.nmblookup:member" member $bbdir/test_nmblookup.sh "\$NETBIOSNAME" "\$NETBIOSALIAS" "\$SERVER" "\$SERVER_IP" - -# Tests using the "Simple" NTVFS backend - -for t in "BASE-RW1"; do - plantest "ntvfs/simple $t" dc $VALGRIND $samba4bindir/smbtorture $TORTURE_OPTIONS $ADDARGS //\$SERVER/simple -U"\$USERNAME"%"\$PASSWORD" $t -done - -$SRCDIR/selftest/test_s3upgrade.sh $PREFIX/upgrade - -# Domain Member Tests - -plantest "RPC-ECHO against member server with local creds" member $VALGRIND $samba4bindir/smbtorture $TORTURE_OPTIONS ncacn_np:"\$NETBIOSNAME" -U"\$NETBIOSNAME/\$USERNAME"%"\$PASSWORD" RPC-ECHO "$*" -plantest "RPC-ECHO against member server with domain creds" member $VALGRIND $samba4bindir/smbtorture $TORTURE_OPTIONS ncacn_np:"\$NETBIOSNAME" -U"\$DOMAIN/\$DC_USERNAME"%"\$DC_PASSWORD" RPC-ECHO "$*" -plantest "RPC-SAMR against member server with local creds" member $VALGRIND $samba4bindir/smbtorture $TORTURE_OPTIONS ncacn_np:"\$NETBIOSNAME" -U"\$NETBIOSNAME/\$USERNAME"%"\$PASSWORD" "RPC-SAMR" "$*" -plantest "RPC-SAMR-USERS against member server with local creds" member $VALGRIND $samba4bindir/smbtorture $TORTURE_OPTIONS ncacn_np:"\$NETBIOSNAME" -U"\$NETBIOSNAME/\$USERNAME"%"\$PASSWORD" "RPC-SAMR-USERS" "$*" -plantest "RPC-SAMR-PASSWORDS against member server with local creds" member $VALGRIND $samba4bindir/smbtorture $TORTURE_OPTIONS ncacn_np:"\$NETBIOSNAME" -U"\$NETBIOSNAME/\$USERNAME"%"\$PASSWORD" "RPC-SAMR-PASSWORDS" "$*" -plantest "wbinfo -a against member server with domain creds" member $VALGRIND $samba4bindir/wbinfo -a "\$DOMAIN/\$DC_USERNAME"%"\$DC_PASSWORD" - -$SRCDIR/selftest/test_nbt.sh "member" -$SRCDIR/selftest/test_winbind.sh "member" diff --git a/source4/selftest/tests_quick.sh b/source4/selftest/tests_quick.sh deleted file mode 100755 index c05185afad6..00000000000 --- a/source4/selftest/tests_quick.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh -ADDARGS="$*" - -incdir=`dirname $0` -. $incdir/test_functions.sh - -$incdir/../bin/smbtorture -V - -TORTURE_QUICK="yes" -export TORTURE_QUICK - -$SRCDIR/selftest/test_ejs.sh $CONFIGURATION -$SRCDIR/selftest/test_ldap.sh -$SRCDIR/selftest/test_nbt.sh - -tests="BASE-UNLINK BASE-ATTR BASE-DELETE" -tests="$tests BASE-TCON BASE-OPEN" -tests="$tests BASE-CHKPATH RAW-QFSINFO RAW-QFILEINFO RAW-SFILEINFO" -tests="$tests RAW-MKDIR RAW-SEEK RAW-OPEN RAW-WRITE" -tests="$tests RAW-UNLINK RAW-READ RAW-CLOSE RAW-IOCTL RAW-RENAME" -tests="$tests RAW-EAS RAW-STREAMS" - -for t in $tests; do - plantest "$t" dc $VALGRIND $samba4bindir/smbtorture $TORTURE_OPTIONS $ADDARGS //\$SERVER/tmp -U"\$USERNAME"%"\$PASSWORD" $t -done - -plantest "ntvfs/cifs BASE-OPEN" dc $VALGRIND $samba4bindir/smbtorture $TORTURE_OPTIONS $ADDARGS //\$NETBIOSNAME/cifs -U"\$USERNAME"%"\$PASSWORD" BASE-OPEN - -# add tests to this list as they start passing, so we test -# that they stay passing -ncacn_np_tests="RPC-ALTERCONTEXT RPC-JOIN RPC-ECHO RPC-SCHANNEL RPC-NETLOGON RPC-UNIXINFO RPC-HANDLES" -ncacn_ip_tcp_tests="RPC-ALTERCONTEXT RPC-JOIN RPC-ECHO RPC-HANDLES" -ncalrpc_tests="RPC-ECHO" - -for bindoptions in seal,padcheck $VALIDATE bigendian; do - for transport in ncalrpc ncacn_np ncacn_ip_tcp; do - case $transport in - ncalrpc) tests=$ncalrpc_tests ;; - ncacn_np) tests=$ncacn_np_tests ;; - ncacn_ip_tcp) tests=$ncacn_ip_tcp_tests ;; - esac - for t in $tests; do - name="$t on $transport with $bindoptions" - plantest "$name" dc $VALGRIND $samba4bindir/smbtorture $TORTURE_OPTIONS $transport:"\$SERVER[$bindoptions]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN $t "$*" - done - done -done -- cgit