From 422b2fa0d064f2afeeec400223bb8a47deecc4a5 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 24 Apr 2011 10:36:56 +0200 Subject: s3: Run pthreadpooltest in make test Autobuild-User: Volker Lendecke Autobuild-Date: Mon Apr 25 10:39:12 CEST 2011 on sn-devel-104 --- source3/script/tests/test_pthreadpool.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 source3/script/tests/test_pthreadpool.sh (limited to 'source3/script/tests') diff --git a/source3/script/tests/test_pthreadpool.sh b/source3/script/tests/test_pthreadpool.sh new file mode 100755 index 0000000000..79e578effa --- /dev/null +++ b/source3/script/tests/test_pthreadpool.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +incdir=`dirname $0`/../../../testprogs/blackbox +. $incdir/subunit.sh + +TESTPROG=$BINDIR/pthreadpooltest + +if [ ! -x $BINDIR/pthreadpooltest ] ; then + TESTPROG=/bin/true +fi + +failed=0 + +testit "pthreadpool" $VALGRIND $TESTPROG || + failed=`expr $failed + 1` + +testok $0 $failed -- cgit From 40e0079bae731f691a620a280b74ada951018458 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 25 Apr 2011 13:40:15 +0200 Subject: s3: Some build farm machines do not have /bin/true Autobuild-User: Volker Lendecke Autobuild-Date: Mon Apr 25 14:35:42 CEST 2011 on sn-devel-104 --- source3/script/tests/test_pthreadpool.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'source3/script/tests') diff --git a/source3/script/tests/test_pthreadpool.sh b/source3/script/tests/test_pthreadpool.sh index 79e578effa..b1c7c6da11 100755 --- a/source3/script/tests/test_pthreadpool.sh +++ b/source3/script/tests/test_pthreadpool.sh @@ -3,15 +3,18 @@ incdir=`dirname $0`/../../../testprogs/blackbox . $incdir/subunit.sh -TESTPROG=$BINDIR/pthreadpooltest - if [ ! -x $BINDIR/pthreadpooltest ] ; then - TESTPROG=/bin/true + # Some machines don't have /bin/true, simulate it + cat >$BINDIR/pthreadpooltest < Date: Wed, 27 Apr 2011 20:29:16 +1000 Subject: s3-test Make samba3.blackbox.net.local.registry.roundtrip reliable Looking for smb.conf files with find -name \*.conf would find and not find all sorts of things that were just not valid inputs. When restricted to under source3 it then finds no inputs in the top level build, as it only worked on the generated smb.conf files from 'make test' environments. Instead, just run it on the one file we know is valid, and if we want to run it on more files, then we can make this test run against more environments, or specific target files. Andrew Bartlett --- source3/script/tests/test_net_registry_roundtrip.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/script/tests') diff --git a/source3/script/tests/test_net_registry_roundtrip.sh b/source3/script/tests/test_net_registry_roundtrip.sh index f35a752428..33114ccd4c 100755 --- a/source3/script/tests/test_net_registry_roundtrip.sh +++ b/source3/script/tests/test_net_registry_roundtrip.sh @@ -7,7 +7,7 @@ if [ $# -lt 3 ]; then cat < Date: Thu, 9 Jun 2011 15:22:19 +1000 Subject: s3-selftest Add a test for 'message command' This also provides us a way to test that the -n option to smbclient works, as that becomes part of the filename. Andrew Bartlett --- source3/script/tests/test_smbclient_s3.sh | 48 +++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'source3/script/tests') diff --git a/source3/script/tests/test_smbclient_s3.sh b/source3/script/tests/test_smbclient_s3.sh index 0395f3e12c..60c3610ee8 100755 --- a/source3/script/tests/test_smbclient_s3.sh +++ b/source3/script/tests/test_smbclient_s3.sh @@ -218,6 +218,7 @@ EOF if [ $ret != 0 ] ; then echo "$out" echo "failed writing into read-only directory with error $ret" + false return fi @@ -235,6 +236,49 @@ EOF fi } + +# Test sending a message +test_message() +{ + tmpfile=$PREFIX/message_in.$$ + + cat > $tmpfile < Date: Thu, 9 Jun 2011 16:20:15 +1000 Subject: s3-selftest Add test for smbclient --authentication-file Autobuild-User: Andrew Bartlett Autobuild-Date: Thu Jun 9 13:49:59 CEST 2011 on sn-devel-104 --- source3/script/tests/test_smbclient_s3.sh | 58 ++++++++++++++++++++++++++----- 1 file changed, 50 insertions(+), 8 deletions(-) (limited to 'source3/script/tests') diff --git a/source3/script/tests/test_smbclient_s3.sh b/source3/script/tests/test_smbclient_s3.sh index 60c3610ee8..8937c97bbe 100755 --- a/source3/script/tests/test_smbclient_s3.sh +++ b/source3/script/tests/test_smbclient_s3.sh @@ -4,22 +4,23 @@ if [ $# -lt 7 ]; then cat < $tmpfile <&1 + ret=$? + rm $tmpfile + + if [ $ret != 0 ] ; then + echo "smbclient failed to use auth file" + false + return + fi + + cat > $tmpfile <&1 + ret=$? + rm $tmpfile + + if [ $ret -eq 0 ] ; then + echo "smbclient succeeded with wrong auth file credentials" + false + return + fi +} + LOGDIR_PREFIX=test_smbclient_s3 # possibly remove old logdirs: @@ -492,6 +530,10 @@ testit "sending a message to the remote server" \ test_message || \ failed=`expr $failed + 1` +testit "using an authentication file" \ + test_auth_file || \ + failed=`expr $failed + 1` + testit "rm -rf $LOGDIR" \ rm -rf $LOGDIR || \ failed=`expr $failed + 1` -- cgit