svn commit: samba r8525 - in branches/SAMBA_4_0/source:
build/smb_build script/tests
tridge at samba.org
tridge at samba.org
Sun Jul 17 12:23:40 GMT 2005
Author: tridge
Date: 2005-07-17 12:23:40 +0000 (Sun, 17 Jul 2005)
New Revision: 8525
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8525
Log:
added two more test targets:
- 'make quicktest' for running only quick tests. Finishes in 20
seconds or so.
- 'make valgrindtest' runs smbd under valgrind in a xterm window and
runs the quick tests. Also disables tls as that slows down valgrind
too much to be usable
Added:
branches/SAMBA_4_0/source/script/tests/test_rpc_quick.sh
branches/SAMBA_4_0/source/script/tests/tests_all.sh
branches/SAMBA_4_0/source/script/tests/tests_quick.sh
Modified:
branches/SAMBA_4_0/source/build/smb_build/makefile.pm
branches/SAMBA_4_0/source/script/tests/selftest.sh
branches/SAMBA_4_0/source/script/tests/test_functions.sh
branches/SAMBA_4_0/source/script/tests/test_ldap.sh
Changeset:
Modified: branches/SAMBA_4_0/source/build/smb_build/makefile.pm
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/makefile.pm 2005-07-17 12:14:27 UTC (rev 8524)
+++ branches/SAMBA_4_0/source/build/smb_build/makefile.pm 2005-07-17 12:23:40 UTC (rev 8525)
@@ -148,11 +148,18 @@
test: @DEFAULT_TEST_TARGET@
test-swrap: all
- ./script/tests/selftest.sh @selftest_prefix@/prefix-test SOCKET_WRAPPER
+ ./script/tests/selftest.sh @selftest_prefix@/prefix-test all SOCKET_WRAPPER
test-noswrap: all
- ./script/tests/selftest.sh @selftest_prefix@/prefix-test
+ ./script/tests/selftest.sh @selftest_prefix@/prefix-test all
+quicktest: all
+ ./script/tests/selftest.sh @selftest_prefix@/prefix-test quick SOCKET_WRAPPER
+
+valgrindtest: all
+ SMBD_VALGRIND="xterm -n smbd -e valgrind -q --db-attach=yes --num-callers=30" \
+ ./script/tests/selftest.sh @selftest_prefix@/prefix-test quick SOCKET_WRAPPER
+
__EOD__
}
Modified: branches/SAMBA_4_0/source/script/tests/selftest.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/selftest.sh 2005-07-17 12:14:27 UTC (rev 8524)
+++ branches/SAMBA_4_0/source/script/tests/selftest.sh 2005-07-17 12:23:40 UTC (rev 8525)
@@ -20,6 +20,15 @@
PREFIX=`echo $PREFIX | sed s+//+/+`
export PREFIX
+# allow selection of the test lists
+TESTS=$2
+
+if [ $TESTS = "all" ]; then
+ TLS_ENABLED="yes"
+else
+ TLS_ENABLED="no"
+fi
+
mkdir -p $PREFIX || exit $?
OLD_PWD=`pwd`
cd $PREFIX || exit $?
@@ -37,13 +46,14 @@
TLSDIR=$PRIVATEDIR/tls
CONFIGURATION="--configfile=$CONFFILE"
export CONFIGURATION
+export CONFFILE
SMBD_TEST_FIFO="$PREFIX/smbd_test.fifo"
export SMBD_TEST_FIFO
SMBD_TEST_LOG="$PREFIX/smbd_test.log"
export SMBD_TEST_LOG
-DO_SOCKET_WRAPPER=$2
+DO_SOCKET_WRAPPER=$3
if [ x"$DO_SOCKET_WRAPPER" = x"SOCKET_WRAPPER" ];then
SOCKET_WRAPPER_DIR="$PREFIX/socket_wrapper_dir"
export SOCKET_WRAPPER_DIR
@@ -76,6 +86,7 @@
js include = $SRCDIR/scripting/libjs
name resolve order = bcast
interfaces = lo*
+ tls enabled = $TLS_ENABLED
[tmp]
path = $TMPDIR
@@ -116,15 +127,8 @@
bin/nmblookup -U localhost localhost
failed=0
- $SRCDIR/script/tests/test_ejs.sh localhost $USERNAME $PASSWORD || failed=`expr $failed + $?`
- $SRCDIR/script/tests/test_ldap.sh localhost $USERNAME $PASSWORD || failed=`expr $failed + $?`
- $SRCDIR/script/tests/test_quick.sh //localhost/cifs $USERNAME $PASSWORD "" || failed=`expr $failed + $?`
- $SRCDIR/script/tests/test_rpc.sh localhost $USERNAME $PASSWORD $DOMAIN || failed=`expr $failed + $?`
- $SRCDIR/script/tests/test_session_key.sh localhost $USERNAME $PASSWORD $DOMAIN || failed=`expr $failed + $?`
- $SRCDIR/script/tests/test_binding_string.sh localhost $USERNAME $PASSWORD $DOMAIN || failed=`expr $failed + $?`
- $SRCDIR/script/tests/test_echo.sh localhost $USERNAME $PASSWORD $DOMAIN || failed=`expr $failed + $?`
- $SRCDIR/script/tests/test_posix.sh //localhost/tmp $USERNAME $PASSWORD "" || failed=`expr $failed + $?`
- $SRCDIR/script/tests/test_local.sh || failed=`expr $failed + $?`
+
+ . script/tests/tests_$TESTS.sh
exit $failed
) 9>$SMBD_TEST_FIFO
failed=$?
Modified: branches/SAMBA_4_0/source/script/tests/test_functions.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/test_functions.sh 2005-07-17 12:14:27 UTC (rev 8524)
+++ branches/SAMBA_4_0/source/script/tests/test_functions.sh 2005-07-17 12:23:40 UTC (rev 8525)
@@ -19,7 +19,7 @@
echo -n "STARTING SMBD..."
((
- $SRCDIR/bin/smbd --maximum-runtime=1800 -d1 -s $CONFFILE -M single -i < $SMBD_TEST_FIFO > $SMBD_TEST_LOG 2>&1;
+ $SMBD_VALGRIND $SRCDIR/bin/smbd --maximum-runtime=1800 -d1 -s $CONFFILE -M single -i < $SMBD_TEST_FIFO > $SMBD_TEST_LOG 2>&1;
ret=$?;
rm -f $SMBD_TEST_FIFO;
if [ -n "$SOCKET_WRAPPER_DIR" -a -d "$SOCKET_WRAPPER_DIR" ]; then
Modified: branches/SAMBA_4_0/source/script/tests/test_ldap.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/test_ldap.sh 2005-07-17 12:14:27 UTC (rev 8524)
+++ branches/SAMBA_4_0/source/script/tests/test_ldap.sh 2005-07-17 12:23:40 UTC (rev 8525)
@@ -9,7 +9,8 @@
fi
# see if we support ldaps
-if grep HAVE_LIBGNUTLS.1 include/config.h > /dev/null; then
+if grep HAVE_LIBGNUTLS.1 include/config.h > /dev/null &&
+ grep tls.enabled.=yes $CONFFILE > /dev/null; then
PROTOCOLS="ldap ldaps"
else
PROTOCOLS="ldap"
Added: branches/SAMBA_4_0/source/script/tests/test_rpc_quick.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/test_rpc_quick.sh 2005-07-17 12:14:27 UTC (rev 8524)
+++ branches/SAMBA_4_0/source/script/tests/test_rpc_quick.sh 2005-07-17 12:23:40 UTC (rev 8525)
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+# add tests to this list as they start passing, so we test
+# that they stay passing
+ncacn_np_tests="RPC-ECHO RPC-ALTERCONTEXT"
+ncalrpc_tests="RPC-ECHO RPC-ALTERCONTEXT"
+ncacn_ip_tcp_tests="RPC-ECHO RPC-ALTERCONTEXT"
+
+if [ $# -lt 4 ]; then
+cat <<EOF
+Usage: test_rpc_quick.sh SERVER USERNAME PASSWORD DOMAIN
+EOF
+exit 1;
+fi
+
+server="$1"
+username="$2"
+password="$3"
+domain="$4"
+shift 4
+
+incdir=`dirname $0`
+. $incdir/test_functions.sh
+
+failed=0
+for bindoptions in seal,validate,padcheck 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"
+ testit "$name" $VALGRIND bin/smbtorture $TORTURE_OPTIONS $transport:"$server[$bindoptions]" -U"$username"%"$password" -W $domain $t "$*" || failed=`expr $failed + 1`
+ done
+ done
+done
+
+testok $0 $failed
Added: branches/SAMBA_4_0/source/script/tests/tests_all.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/tests_all.sh 2005-07-17 12:14:27 UTC (rev 8524)
+++ branches/SAMBA_4_0/source/script/tests/tests_all.sh 2005-07-17 12:23:40 UTC (rev 8525)
@@ -0,0 +1,9 @@
+ $SRCDIR/script/tests/test_ejs.sh localhost $USERNAME $PASSWORD || failed=`expr $failed + $?`
+ $SRCDIR/script/tests/test_ldap.sh localhost $USERNAME $PASSWORD || failed=`expr $failed + $?`
+ $SRCDIR/script/tests/test_quick.sh //localhost/cifs $USERNAME $PASSWORD "" || failed=`expr $failed + $?`
+ $SRCDIR/script/tests/test_rpc.sh localhost $USERNAME $PASSWORD $DOMAIN || failed=`expr $failed + $?`
+ $SRCDIR/script/tests/test_session_key.sh localhost $USERNAME $PASSWORD $DOMAIN || failed=`expr $failed + $?`
+ $SRCDIR/script/tests/test_binding_string.sh localhost $USERNAME $PASSWORD $DOMAIN || failed=`expr $failed + $?`
+ $SRCDIR/script/tests/test_echo.sh localhost $USERNAME $PASSWORD $DOMAIN || failed=`expr $failed + $?`
+ $SRCDIR/script/tests/test_posix.sh //localhost/tmp $USERNAME $PASSWORD "" || failed=`expr $failed + $?`
+ $SRCDIR/script/tests/test_local.sh || failed=`expr $failed + $?`
Added: branches/SAMBA_4_0/source/script/tests/tests_quick.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/tests_quick.sh 2005-07-17 12:14:27 UTC (rev 8524)
+++ branches/SAMBA_4_0/source/script/tests/tests_quick.sh 2005-07-17 12:23:40 UTC (rev 8525)
@@ -0,0 +1,3 @@
+$SRCDIR/script/tests/test_ejs.sh localhost $USERNAME $PASSWORD || failed=`expr $failed + $?`
+$SRCDIR/script/tests/test_ldap.sh localhost $USERNAME $PASSWORD || failed=`expr $failed + $?`
+$SRCDIR/script/tests/test_quick.sh //localhost/cifs $USERNAME $PASSWORD "" || failed=`expr $failed + $?`
More information about the samba-cvs
mailing list