summaryrefslogtreecommitdiff
path: root/source4/selftest
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-10-11 03:12:21 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-10-11 03:12:21 +0200
commit0fd0fc75c46b39a611c7f9a56081105714d73e36 (patch)
treeb93ef5e67e49a3aa49c37e13df3d6222b2df7095 /source4/selftest
parent69d38a95c29498c0266cb98b911faa3e7240c787 (diff)
parent47f7ef8f39ba482a7d6578ab82c9e0670381c4f8 (diff)
downloadsamba-0fd0fc75c46b39a611c7f9a56081105714d73e36.tar.gz
samba-0fd0fc75c46b39a611c7f9a56081105714d73e36.tar.bz2
samba-0fd0fc75c46b39a611c7f9a56081105714d73e36.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba into selftest
Conflicts: selftest/selftest.pl
Diffstat (limited to 'source4/selftest')
-rw-r--r--source4/selftest/config.mk15
-rw-r--r--source4/selftest/quick1
-rw-r--r--source4/selftest/skip2
-rwxr-xr-xsource4/selftest/test_win.sh2
-rwxr-xr-xsource4/selftest/tests.sh55
5 files changed, 55 insertions, 20 deletions
diff --git a/source4/selftest/config.mk b/source4/selftest/config.mk
index 9e5983d026..dd440edb53 100644
--- a/source4/selftest/config.mk
+++ b/source4/selftest/config.mk
@@ -49,33 +49,36 @@ quicktestone:: all
testenv:: everything
$(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --socket-wrapper --testenv
+testenv-%:: everything
+ SELFTEST_TESTENV=$* $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --socket-wrapper --testenv
+
valgrindtest:: valgrindtest-all
valgrindtest-quick:: all
- SMBD_VALGRIND="xterm -n smbd -e $(srcdir)/script/valgrind_run $(LD_LIBPATH_OVERRIDE)" \
+ SMBD_VALGRIND="xterm -n server -e $(srcdir)/script/valgrind_run $(LD_LIBPATH_OVERRIDE)" \
VALGRIND="valgrind -q --num-callers=30 --log-file=${selftest_prefix}/valgrind.log" \
$(SELFTEST) $(SELFTEST_QUICK_OPTS) --immediate --socket-wrapper $(TESTS)
valgrindtest-all:: everything
- SMBD_VALGRIND="xterm -n smbd -e $(srcdir)/script/valgrind_run $(LD_LIBPATH_OVERRIDE)" \
+ SMBD_VALGRIND="xterm -n server -e $(srcdir)/script/valgrind_run $(LD_LIBPATH_OVERRIDE)" \
VALGRIND="valgrind -q --num-callers=30 --log-file=${selftest_prefix}/valgrind.log" \
$(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --immediate --socket-wrapper $(TESTS)
valgrindtest-env:: everything
- SMBD_VALGRIND="xterm -n smbd -e $(srcdir)/script/valgrind_run $(LD_LIBPATH_OVERRIDE)" \
+ SMBD_VALGRIND="xterm -n server -e $(srcdir)/script/valgrind_run $(LD_LIBPATH_OVERRIDE)" \
VALGRIND="valgrind -q --num-callers=30 --log-file=${selftest_prefix}/valgrind.log" \
$(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --socket-wrapper --testenv
gdbtest:: gdbtest-all
gdbtest-quick:: all
- SMBD_VALGRIND="xterm -n smbd -e $(srcdir)/script/gdb_run $(LD_LIBPATH_OVERRIDE)" \
+ SMBD_VALGRIND="xterm -n server -e $(srcdir)/script/gdb_run $(LD_LIBPATH_OVERRIDE)" \
$(SELFTEST) $(SELFTEST_QUICK_OPTS) --immediate --socket-wrapper $(TESTS)
gdbtest-all:: everything
- SMBD_VALGRIND="xterm -n smbd -e $(srcdir)/script/gdb_run $(LD_LIBPATH_OVERRIDE)" \
+ SMBD_VALGRIND="xterm -n server -e $(srcdir)/script/gdb_run $(LD_LIBPATH_OVERRIDE)" \
$(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --immediate --socket-wrapper $(TESTS)
gdbtest-env:: everything
- SMBD_VALGRIND="xterm -n smbd -e $(srcdir)/script/gdb_run $(LD_LIBPATH_OVERRIDE)" \
+ SMBD_VALGRIND="xterm -n server -e $(srcdir)/script/gdb_run $(LD_LIBPATH_OVERRIDE)" \
$(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --socket-wrapper --testenv
diff --git a/source4/selftest/quick b/source4/selftest/quick
index 3627a87bbe..7bea619f18 100644
--- a/source4/selftest/quick
+++ b/source4/selftest/quick
@@ -35,3 +35,4 @@ rpc.altercontext
rpc.join
rpc.handles
rpc.echo
+smb.signing
diff --git a/source4/selftest/skip b/source4/selftest/skip
index b1313adea0..e3e2d2d525 100644
--- a/source4/selftest/skip
+++ b/source4/selftest/skip
@@ -58,6 +58,4 @@ samba4.ntvfs.cifs.raw.
^samba4.net.domopen.*$ # Hangs for some reason
^samba4.net.api.become.dc.*$ # Fails
nss.test # Fails
-samba4.samba3sam.python # Conversion from EJS not yet finished
raw.offline # Samba 4 doesn't have much offline support yet
-winreg* #Does not authenticate against the target server
diff --git a/source4/selftest/test_win.sh b/source4/selftest/test_win.sh
index bc40620af5..17c09e6b26 100755
--- a/source4/selftest/test_win.sh
+++ b/source4/selftest/test_win.sh
@@ -32,7 +32,7 @@ name="NET against Windows 2003"
testit "$name" smb $WINTEST_DIR/wintest_net.sh $SMBTORTURE_REMOTE_HOST \
$SMBTORTURE_USERNAME $SMBTORTURE_PASSWORD $SMBTORTURE_WORKGROUP
-name="Windows 2003 against smbd"
+name="Windows 2003 against samba"
testit "$name" smb $WINTEST_DIR/wintest_client.sh $SMBTORTURE_REMOTE_HOST
dc_tests="RPC-DRSUAPI ncacn_np ncacn_ip_tcp"
diff --git a/source4/selftest/tests.sh b/source4/selftest/tests.sh
index eff06f588e..fa799f51ff 100755
--- a/source4/selftest/tests.sh
+++ b/source4/selftest/tests.sh
@@ -58,12 +58,8 @@ bin/smbtorture -V
samba4srcdir=.
samba4bindir=$samba4srcdir/bin
-SCRIPTDIR=$samba4srcdir/../testprogs/ejs
smb4torture="$samba4bindir/smbtorture $TORTURE_OPTIONS"
-plantest "js.base" dc "$SCRIPTDIR/base.js" $CONFIGURATION
-plantest "js.ldb" none "$SCRIPTDIR/ldb.js" `pwd` $CONFIGURATION -d 10
-
# Simple tests for LDAP and CLDAP
for options in "" "--option=socket:testnonblock=true" "-U\$USERNAME%\$PASSWORD --option=socket:testnonblock=true" "-U\$USERNAME%\$PASSWORD"; do
@@ -93,7 +89,7 @@ plantest "ldb" none TEST_DATA_PREFIX=\$PREFIX $LDBDIR/tests/test-tdb.sh
# 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"
+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"
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"
@@ -254,7 +250,7 @@ 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 .pl`" none $PERL $f "|" $samba4srcdir/script/harness2subunit.pl
+ plantest "pidl.`basename $f .pl`" none $PERL $f "|" $samba4srcdir/../lib/subunit/harness2subunit.pl
done
else
echo "Skipping pidl tests - Test::More not installed"
@@ -267,7 +263,7 @@ fi
bbdir=../testprogs/blackbox
-plantest "blackbox.ndrdump" dc $samba4srcdir/librpc/tests/test_ndrdump.sh
+plantest "blackbox.ndrdump" none $samba4srcdir/librpc/tests/test_ndrdump.sh
plantest "blackbox.net" dc $samba4srcdir/utils/tests/test_net.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN"
plantest "blackbox.kinit" dc $bbdir/test_kinit.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$REALM" "\$DOMAIN" "$PREFIX" $CONFIGURATION
plantest "blackbox.cifsdd" dc $samba4srcdir/client/tests/test_cifsdd.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN"
@@ -285,10 +281,6 @@ for t in "BASE-RW1"; do
plantest "ntvfs.simple.`normalize_testname $t`" dc $VALGRIND $smb4torture $ADDARGS //\$SERVER/simple -U"\$USERNAME"%"\$PASSWORD" $t
done
-DATADIR=$samba4srcdir/../testdata
-
-plantest "js.samba3sam" none $samba4bindir/smbscript $SCRIPTDIR/samba3sam.js $CONFIGURATION `pwd` $DATADIR/samba3/
-
# Domain Member Tests
plantest "rpc.echo against member server with local creds" member $VALGRIND $smb4torture ncacn_np:"\$NETBIOSNAME" -U"\$NETBIOSNAME/\$USERNAME"%"\$PASSWORD" RPC-ECHO "$*"
@@ -298,6 +290,46 @@ plantest "rpc.samr.users against member server with local creds" member $VALGRIN
plantest "rpc.samr.passwords against member server with local creds" member $VALGRIND $smb4torture ncacn_np:"\$NETBIOSNAME" -U"\$NETBIOSNAME/\$USERNAME"%"\$PASSWORD" "RPC-SAMR-PASSWORDS" "$*"
plantest "blackbox.smbclient against member server with local creds" member $samba4srcdir/client/tests/test_smbclient.sh "\$NETBIOSNAME" "\$USERNAME" "\$PASSWORD" "\$NETBIOSNAME" "$PREFIX"
+# 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"
+ plantest "$name local-creds" member $VALGRIND $smb4torture //"\$NETBIOSNAME"/tmp $signoptions -U"\$NETBIOSNAME/\$USERNAME"%"\$PASSWORD" BASE-XCOPY "$*"
+done
+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 "$*"
+
NBT_TESTS=`$smb4torture --list | grep "^NBT-" | xargs`
for t in $NBT_TESTS; do
@@ -347,6 +379,7 @@ plantest "samdb.python" none $SUBUNITRUN samba.tests.samdb
plantest "events.python" none PYTHONPATH="$PYTHONPATH:lib/events" $SUBUNITRUN tests
plantest "messaging.python" none PYTHONPATH="$PYTHONPATH:lib/messaging/tests" $SUBUNITRUN bindings
plantest "samba3sam.python" none PYTHONPATH="$PYTHONPATH:dsdb/samdb/ldb_modules/tests" $SUBUNITRUN samba3sam
+plantest "subunit.python" none $SUBUNITRUN subunit
plantest "rpcecho.python" dc $SUBUNITRUN samba.tests.dcerpc.rpcecho
plantest "winreg.python" dc $SUBUNITRUN -U\$USERNAME%\$PASSWORD samba.tests.dcerpc.registry
plantest "ldap.python" dc $PYTHON $samba4srcdir/lib/ldb/tests/python/ldap.py $CONFIGURATION \$SERVER -U\$USERNAME%\$PASSWORD -W \$DOMAIN