[SCM] Samba Shared Repository - branch master updated
Michael Adam
obnox at samba.org
Sat Feb 19 05:07:01 MST 2011
The branch, master has been updated
via 8ad127e s3:tests: fix the smbclient_s3 test for multiple users running it.
via 0749f7a s3:tests: remove unused script/tests/test_functions.sh
via 93ca1bc s3:tests: include subunit.sh instead of test_functions.sh in test_posix_s3.sh
via d03996a s3:tests: include subunit.sh instead of test_functions.sh in test_ntlm_auth_s3.sh
via 6af6241 s3:tests: include subunit.sh instead of test_functions.sh in test_smbtorture_s3.sh
via 4eb3da2 s3:tests: include subunit.sh instead of test_functions.sh in test_wbinfo_s3.sh
via ae9aa47 s3:tests: use the blackbox subunit output formatter for the testparm_s3 test.
via a1bec01 s3:tests: include subunit.sh instead of test_functions.sh in test_local_s3.sh
via 745354e s3:tests: use the blackbox subunit output formatter for the smbclient_s3 test.
from 9971061 s3: Pass logonHours through pdb_ads
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 8ad127e187abb8f9e8076a872e08faaf4fbc1367
Author: Michael Adam <obnox at samba.org>
Date: Sat Feb 19 11:49:43 2011 +0100
s3:tests: fix the smbclient_s3 test for multiple users running it.
The test created /tmp/log.smbclient, which lets the test fail if
two users are running the test simultaneously.
Now /tmp/log.test_smbclient_s3.$$ is used.
Autobuild-User: Michael Adam <obnox at samba.org>
Autobuild-Date: Sat Feb 19 13:06:57 CET 2011 on sn-devel-104
commit 0749f7a976fd1766bf076986f1b5e7eff323e5e0
Author: Michael Adam <obnox at samba.org>
Date: Sat Feb 19 02:29:54 2011 +0100
s3:tests: remove unused script/tests/test_functions.sh
This is not used any more now with selftest.
commit 93ca1bc410b25492f02045f77bcd8d7d5bbfafe6
Author: Michael Adam <obnox at samba.org>
Date: Sat Feb 19 01:14:54 2011 +0100
s3:tests: include subunit.sh instead of test_functions.sh in test_posix_s3.sh
It would actually not be necessary at all to include a script providing
testit() and so on, since this script snippet is currently only sourced
in tests.sh to plan the included test.
commit d03996afb50a22b24119cc4a6380c6923bcda997
Author: Michael Adam <obnox at samba.org>
Date: Sat Feb 19 01:14:54 2011 +0100
s3:tests: include subunit.sh instead of test_functions.sh in test_ntlm_auth_s3.sh
It would actually not be necessary at all to include a script providing
testit() and so on, since this script snippet is currently only sourced
in tests.sh to plan the included test.
commit 6af6241040d376315f47716b4df7ca843b918d2d
Author: Michael Adam <obnox at samba.org>
Date: Sat Feb 19 01:14:54 2011 +0100
s3:tests: include subunit.sh instead of test_functions.sh in test_smbtorture_s3.sh
It would actually not be necessary at all to include a script providing
testit() and so on, since this script snippet is currently only sourced
in tests.sh to plan the included test.
commit 4eb3da2b0ece1c4d33c679c39f2beff0f2a324da
Author: Michael Adam <obnox at samba.org>
Date: Sat Feb 19 01:14:54 2011 +0100
s3:tests: include subunit.sh instead of test_functions.sh in test_wbinfo_s3.sh
It would actually not be necessary at all to include a script providing
testit() and so on, since this script snippet is currently only sourced
in tests.sh to plan the included test.
commit ae9aa47d6bcfa4ececdc1c74695c4c9a6c045ab6
Author: Michael Adam <obnox at samba.org>
Date: Sat Feb 19 00:32:06 2011 +0100
s3:tests: use the blackbox subunit output formatter for the testparm_s3 test.
With the old output, failures would go unnoticed by selftest.
commit a1bec01eeb660e8ff00d77da185f81815be94c30
Author: Michael Adam <obnox at samba.org>
Date: Sat Feb 19 01:14:54 2011 +0100
s3:tests: include subunit.sh instead of test_functions.sh in test_local_s3.sh
It would actually not be necessary at all to include a script providing
testit() and so on, since this script snippet is currently only sourced
in tests.sh to plan the included test.
commit 745354eab801ab08d161b7c5ee0142c82c1061b2
Author: Michael Adam <obnox at samba.org>
Date: Sat Feb 19 00:32:06 2011 +0100
s3:tests: use the blackbox subunit output formatter for the smbclient_s3 test.
With the old output, failures would go unnoticed by selftest.
-----------------------------------------------------------------------
Summary of changes:
source3/script/tests/test_functions.sh | 202 ----------------------------
source3/script/tests/test_local_s3.sh | 4 +-
source3/script/tests/test_ntlm_auth_s3.sh | 4 +-
source3/script/tests/test_posix_s3.sh | 4 +-
source3/script/tests/test_smbclient_s3.sh | 22 +++-
source3/script/tests/test_smbtorture_s3.sh | 4 +-
source3/script/tests/test_testparm_s3.sh | 4 +-
source3/script/tests/test_wbinfo_s3.sh | 4 +-
8 files changed, 30 insertions(+), 218 deletions(-)
delete mode 100644 source3/script/tests/test_functions.sh
Changeset truncated at 500 lines:
diff --git a/source3/script/tests/test_functions.sh b/source3/script/tests/test_functions.sh
deleted file mode 100644
index 4e80266..0000000
--- a/source3/script/tests/test_functions.sh
+++ /dev/null
@@ -1,202 +0,0 @@
-TEST_FUNCTIONS_SH="INCLUDED"
-
-samba3_stop_sig_term() {
- RET=0
- kill -USR1 `cat $PIDDIR/timelimit.nmbd.pid` >/dev/null 2>&1 || \
- kill -ALRM `cat $PIDDIR/timelimit.nmbd.pid` || RET=$?
-
- kill -USR1 `cat $PIDDIR/timelimit.winbindd.pid` >/dev/null 2>&1 || \
- kill -ALRM `cat $PIDDIR/timelimit.winbindd.pid` || RET=$?
-
- kill -USR1 `cat $PIDDIR/timelimit.smbd.pid` >/dev/null 2>&1 || \
- kill -ALRM `cat $PIDDIR/timelimit.smbd.pid` || RET=$?
-
- return $RET;
-}
-
-samba3_stop_sig_kill() {
- kill -ALRM `cat $PIDDIR/timelimit.nmbd.pid` >/dev/null 2>&1
- kill -ALRM `cat $PIDDIR/timelimit.winbindd.pid` >/dev/null 2>&1
- kill -ALRM `cat $PIDDIR/timelimit.smbd.pid` >/dev/null 2>&1
- return 0;
-}
-
-samba3_nmbd_test_log() {
- if [ -n "$NMBD_TEST_LOG" ];then
- if [ -r "$NMBD_TEST_LOG" ];then
- return 0;
- fi
- fi
- return 1;
-}
-
-samba3_winbindd_test_log() {
- if [ -n "$WINBINDD_TEST_LOG" ];then
- if [ -r "$WINBINDD_TEST_LOG" ];then
- return 0;
- fi
- fi
- return 1;
-}
-
-samba3_smbd_test_log() {
- if [ -n "$SMBD_TEST_LOG" ];then
- if [ -r "$SMBD_TEST_LOG" ];then
- return 0;
- fi
- fi
- return 1;
-}
-
-samba3_check_only() {
- if [ -n "$SERVER_TEST_FIFO" ];then
- if [ -p "$SERVER_TEST_FIFO" ];then
- return 0;
- fi
- return 1;
- fi
- return 0;
-}
-
-testit() {
- if [ -z "$PREFIX" ]; then
- PREFIX=test_prefix
- mkdir -p $PREFIX
- fi
- name=$1
- shift 1
- binary=$1
- cmdline="$*"
-
- SERVERS_ARE_UP="no"
-
- shname=`echo $name | \
- sed -e 's%[^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\-]%_%g'`
-
- UNIQUE_PID=`/bin/sh -c 'echo $$'`
- TEST_LOG="$PREFIX/test_log.${UNIQUE_PID}"
- TEST_PCAP="$PREFIX/test_${shname}_${UNIQUE_PID}.pcap"
- trap "rm -f $TEST_LOG $TEST_PCAP" EXIT
-
- samba3_nmbd_test_log && if [ -z "$nmbd_log_size" ]; then
- nmbd_log_size=`wc -l < $NMBD_TEST_LOG`;
- fi
- samba3_winbindd_test_log && if [ -z "$winbindd_log_size" ]; then
- winbindd_log_size=`wc -l < $WINBINDD_TEST_LOG`;
- fi
- samba3_smbd_test_log && if [ -z "$smbd_log_size" ]; then
- smbd_log_size=`wc -l < $SMBD_TEST_LOG`;
- fi
-
- if [ x"$RUN_FROM_BUILD_FARM" = x"yes" ];then
- echo "--==--==--==--==--==--==--==--==--==--==--"
- echo "Running test $name (level 0 stdout)"
- echo "--==--==--==--==--==--==--==--==--==--==--"
- date
- echo "Testing $name"
- else
- echo "Testing $name ($failed)"
- fi
-
- samba3_check_only && SERVERS_ARE_UP="yes"
- if [ x"$SERVERS_ARE_UP" != x"yes" ];then
- if [ x"$RUN_FROM_BUILD_FARM" = x"yes" ];then
- echo "SERVERS are down! Skipping: $cmdline"
- echo "=========================================="
- echo "TEST SKIPPED: $name (reason SERVERS are down)"
- echo "=========================================="
- else
- echo "TEST SKIPPED: $name (reason SERVERS are down)"
- fi
- return 1
- fi
-
- if [ x"$MAKE_TEST_ENABLE_PCAP" = x"yes" ];then
- SOCKET_WRAPPER_PCAP_FILE=$TEST_PCAP
- export SOCKET_WRAPPER_PCAP_FILE
- fi
-
- MAKE_TEST_BINARY=$binary
- export MAKE_TEST_BINARY
- ( $cmdline > $TEST_LOG 2>&1 )
- status=$?
- MAKE_TEST_BINARY=
- # show any additional output from smbd that has happened in this test
- samba3_nmbd_test_log && {
- new_log_size=`wc -l < $NMBD_TEST_LOG`;
- test "$new_log_size" = "$nmbd_log_size" || {
- echo "NMBD OUTPUT:";
- incr_log_size=`expr $new_log_size - $nmbd_log_size`;
- tail -$incr_log_size $NMBD_TEST_LOG;
- nmbd_log_size=$new_log_size;
- }
- }
- samba3_winbindd_test_log && {
- new_log_size=`wc -l < $WINBINDD_TEST_LOG`;
- test "$new_log_size" = "$winbindd_log_size" || {
- echo "WINBINDD OUTPUT:";
- incr_log_size=`expr $new_log_size - $winbindd_log_size`;
- tail -$incr_log_size $WINBINDD_TEST_LOG;
- winbindd_log_size=$new_log_size;
- }
- }
- samba3_smbd_test_log && {
- new_log_size=`wc -l < $SMBD_TEST_LOG`;
- test "$new_log_size" = "$smbd_log_size" || {
- echo "SMBD OUTPUT:";
- incr_log_size=`expr $new_log_size - $smbd_log_size`;
- tail -$incr_log_size $SMBD_TEST_LOG;
- smbd_log_size=$new_log_size;
- }
- }
-
- if [ x"$status" != x"0" ]; then
- echo "TEST OUTPUT:"
- cat $TEST_LOG;
- rm -f $TEST_LOG;
- if [ x"$MAKE_TEST_ENABLE_PCAP" = x"yes" ];then
- echo "TEST PCAP: $TEST_PCAP"
- fi
- if [ x"$RUN_FROM_BUILD_FARM" = x"yes" ];then
- echo "=========================================="
- echo "TEST FAILED: $name (status $status)"
- echo "=========================================="
- else
- echo "TEST FAILED: $cmdline (status $status)"
- fi
- trap "" EXIT
- return 1;
- fi
- rm -f $TEST_LOG;
- if [ x"$MAKE_TEST_KEEP_PCAP" = x"yes" ];then
- echo "TEST PCAP: $TEST_PCAP"
- else
- rm -f $TEST_PCAP;
- fi
- if [ x"$RUN_FROM_BUILD_FARM" = x"yes" ];then
- echo "ALL OK: $cmdline"
- echo "=========================================="
- echo "TEST PASSED: $name"
- echo "=========================================="
- fi
- trap "" EXIT
- return 0;
-}
-
-testok() {
- name=`basename $1`
- failed=$2
-
- if [ x"$failed" = x"0" ];then
- :
- else
- echo "$failed TESTS FAILED or SKIPPED ($name)";
- fi
- exit $failed
-}
-
-if [ -z "$VALGRIND" ]; then
- MALLOC_CHECK_=2
- export MALLOC_CHECK_
-fi
-
diff --git a/source3/script/tests/test_local_s3.sh b/source3/script/tests/test_local_s3.sh
index 0c94871..de867c9 100755
--- a/source3/script/tests/test_local_s3.sh
+++ b/source3/script/tests/test_local_s3.sh
@@ -10,8 +10,8 @@ exit 1;
fi
test x"$TEST_FUNCTIONS_SH" != x"INCLUDED" && {
-incdir=`dirname $0`
-. $incdir/test_functions.sh
+incdir=`dirname $0`/../../../testprogs/blackbox
+. $incdir/subunit.sh
}
failed=0
diff --git a/source3/script/tests/test_ntlm_auth_s3.sh b/source3/script/tests/test_ntlm_auth_s3.sh
index c7ebc03..17aabef 100755
--- a/source3/script/tests/test_ntlm_auth_s3.sh
+++ b/source3/script/tests/test_ntlm_auth_s3.sh
@@ -1,8 +1,8 @@
#!/bin/sh
test x"$TEST_FUNCTIONS_SH" != x"INCLUDED" && {
-incdir=`dirname $0`
-. $incdir/test_functions.sh
+incdir=`dirname $0`/../../../testprogs/blackbox
+. $incdir/subunit.sh
}
failed=0
diff --git a/source3/script/tests/test_posix_s3.sh b/source3/script/tests/test_posix_s3.sh
index 8cdb1e2..904f9f1 100755
--- a/source3/script/tests/test_posix_s3.sh
+++ b/source3/script/tests/test_posix_s3.sh
@@ -17,8 +17,8 @@ shift 4
ADDARGS="$*"
test x"$TEST_FUNCTIONS_SH" != x"INCLUDED" && {
-incdir=`dirname $0`
-. $incdir/test_functions.sh
+incdir=`dirname $0`/../../../testprogs/blackbox
+. $incdir/subunit.sh
}
base="base.attr base.charset base.chkpath base.defer_open base.delaywrite base.delete"
diff --git a/source3/script/tests/test_smbclient_s3.sh b/source3/script/tests/test_smbclient_s3.sh
index a567274..08ed3b7 100755
--- a/source3/script/tests/test_smbclient_s3.sh
+++ b/source3/script/tests/test_smbclient_s3.sh
@@ -21,8 +21,8 @@ shift 6
ADDARGS="$*"
test x"$TEST_FUNCTIONS_SH" != x"INCLUDED" && {
-incdir=`dirname $0`
-. $incdir/test_functions.sh
+incdir=`dirname $0`/../../../testprogs/blackbox
+. $incdir/subunit.sh
}
failed=0
@@ -389,6 +389,16 @@ test_ccache_access()
$WBINFO --logoff
}
+LOGDIR=/tmp/log.test_smbclient_s3.$$
+
+testit "rm -rf $LOGDIR" \
+ rm -rf $LOGDIR || \
+ exit 1
+
+testit "mkdir -p $LOGDIR" \
+ mkdir -p $LOGDIR || \
+ exit 1
+
testit "smbclient -L $SERVER_IP" $SMBCLIENT $CONFIGURATION -L $SERVER_IP -N -p 139 || failed=`expr $failed + 1`
testit "smbclient -L $SERVER -I $SERVER_IP" $SMBCLIENT $CONFIGURATION -L $SERVER -I $SERVER_IP -N -p 139 || failed=`expr $failed + 1`
@@ -398,7 +408,7 @@ testit "noninteractive smbclient does not prompt" \
failed=`expr $failed + 1`
testit "noninteractive smbclient -l does not prompt" \
- test_noninteractive_no_prompt -l /tmp || \
+ test_noninteractive_no_prompt -l $LOGDIR || \
failed=`expr $failed + 1`
testit "interactive smbclient prompts on stdout" \
@@ -406,7 +416,7 @@ testit "interactive smbclient prompts on stdout" \
failed=`expr $failed + 1`
testit "interactive smbclient -l prompts on stdout" \
- test_interactive_prompt_stdout -l /tmp || \
+ test_interactive_prompt_stdout -l $LOGDIR || \
failed=`expr $failed + 1`
testit "creating a bad symlink and deleting it" \
@@ -433,4 +443,8 @@ testit "ccache access works for smbclient" \
test_ccache_access || \
failed=`expr $failed + 1`
+testit "rm -rf $LOGDIR" \
+ rm -rf $LOGDIR || \
+ failed=`expr $failed + 1`
+
testok $0 $failed
diff --git a/source3/script/tests/test_smbtorture_s3.sh b/source3/script/tests/test_smbtorture_s3.sh
index 77ffc0c..c9466e9 100755
--- a/source3/script/tests/test_smbtorture_s3.sh
+++ b/source3/script/tests/test_smbtorture_s3.sh
@@ -17,8 +17,8 @@ shift 4
ADDARGS="$*"
test x"$TEST_FUNCTIONS_SH" != x"INCLUDED" && {
-incdir=`dirname $0`
-. $incdir/test_functions.sh
+incdir=`dirname $0`/../../../testprogs/blackbox
+. $incdir/subunit.sh
}
SMB_CONF_PATH="$CONFFILE"
diff --git a/source3/script/tests/test_testparm_s3.sh b/source3/script/tests/test_testparm_s3.sh
index b9e4b81..0fd1a57 100755
--- a/source3/script/tests/test_testparm_s3.sh
+++ b/source3/script/tests/test_testparm_s3.sh
@@ -9,8 +9,8 @@ TEMP_CONFFILE=${LOCAL_PATH}/smb.conf.tmp
TESTPARM="$VALGRIND ${TESTPARM:-$BINDIR/testparm} --suppress-prompt --skip-logic-checks"
test x"$TEST_FUNCTIONS_SH" != x"INCLUDED" && {
-incdir=`dirname $0`
-. $incdir/test_functions.sh
+incdir=`dirname $0`/../../../testprogs/blackbox
+. $incdir/subunit.sh
}
failed=0
diff --git a/source3/script/tests/test_wbinfo_s3.sh b/source3/script/tests/test_wbinfo_s3.sh
index d501311..a63bcba 100755
--- a/source3/script/tests/test_wbinfo_s3.sh
+++ b/source3/script/tests/test_wbinfo_s3.sh
@@ -15,8 +15,8 @@ shift 4
ADDARGS="$*"
test x"$TEST_FUNCTIONS_SH" != x"INCLUDED" && {
-incdir=`dirname $0`
-. $incdir/test_functions.sh
+incdir=`dirname $0`/../../../testprogs/blackbox
+. $incdir/subunit.sh
}
OLDIFS=$IFS;
--
Samba Shared Repository
More information about the samba-cvs
mailing list