Better way of testing enc.
authorJeremy Allison <jra@samba.org>
Sat, 5 Jan 2008 00:58:23 +0000 (16:58 -0800)
committerJeremy Allison <jra@samba.org>
Sat, 5 Jan 2008 00:58:23 +0000 (16:58 -0800)
Jeremy.

source/script/tests/test_smbclient_s3.sh
source/script/tests/test_smbtorture_s3.sh
source/script/tests/tests_all.sh

index fdade5a61739df3a8fa7fdb50d16e4ee397d643a..8bf9cd1ec425c38134e338334818e83edf26dffe 100755 (executable)
@@ -2,7 +2,7 @@
 
 # this runs the file serving tests that are expected to pass with samba3
 
-if [ $# != 2 ]; then
+if [ $# -lt 2 ]; then
 cat <<EOF
 Usage: test_smbclient_s3.sh SERVER SERVER_IP
 EOF
@@ -12,6 +12,8 @@ fi
 SERVER="$1"
 SERVER_IP="$2"
 SMBCLIENT="$VALGRIND ${SMBCLIENT:-$BINDIR/smbclient} $CONFIGURATION"
+shift 3
+ADDARGS="$*"
 
 incdir=`dirname $0`
 . $incdir/test_functions.sh
@@ -24,7 +26,7 @@ test_noninteractive_no_prompt()
     prompt="smb"
 
     echo du | \
-       $SMBCLIENT $CONFIGURATION "$@" -U$USERNAME%$PASSWORD //$SERVER/tmp -I SERVER_IP 2>&1 | \
+       $SMBCLIENT $CONFIGURATION "$@" -U$USERNAME%$PASSWORD //$SERVER/tmp -I SERVER_IP $ADDARGS 2>&1 | \
     grep $prompt
 
     if [ $? = 0 ] ; then
@@ -49,7 +51,7 @@ EOF
 
     CLI_FORCE_INTERACTIVE=yes \
     $SMBCLIENT $CONFIGURATION "$@" -U$USERNAME%$PASSWORD //$SERVER/tmp -I $SERVER_IP \
-       < $tmpfile 2>/dev/null | \
+       $ADDARGS < $tmpfile 2>/dev/null | \
     grep $prompt
 
     if [ $? = 0 ] ; then
index e655381160ba2758f2727b2e5edf3b7523fd8fa9..acb641b9fbac8d56dc4c256009841b6c0b1537f8 100755 (executable)
@@ -42,9 +42,7 @@ for t in $tests; do
     fi
     start=""
     name="$t"
-    testit "$name" $VALGRIND $BINDIR/smbtorture $ADDARGS $unc -U"$username"%"$password" $t || failed=`expr $failed + 1`
-    echo "testing encrypted connection"
-    testit "$name" $VALGRIND $BINDIR/smbtorture $ADDARGS $unc -U"$username"%"$password" -e $t || failed=`expr $failed + 1`
+    testit "$name" $VALGRIND $BINDIR/smbtorture $unc -U"$username"%"$password" $ADDARGS $t || failed=`expr $failed + 1`
 done
 
 testok $0 $failed
index 109e9c292090e657997c5d7ed7595e5c179459a7..c9fd748296ce9c409f5925fa620e036c8ea7f94c 100755 (executable)
@@ -1,7 +1,11 @@
 
 $SCRIPTDIR/test_local_s3.sh || failed=`expr $failed + $?`
 $SCRIPTDIR/test_smbtorture_s3.sh //$SERVER_IP/tmp $USERNAME $PASSWORD "" || failed=`expr $failed + $?`
+echo testing encrypted
+$SCRIPTDIR/test_smbtorture_s3.sh //$SERVER_IP/tmp $USERNAME $PASSWORD "" -e || failed=`expr $failed + $?`
 $SCRIPTDIR/test_smbclient_s3.sh $SERVER $SERVER_IP || failed=`expr $failed + $?`
+echo testing encrypted
+$SCRIPTDIR/test_smbclient_s3.sh $SERVER $SERVER_IP -e || failed=`expr $failed + $?`
 $SCRIPTDIR/test_wbinfo_s3.sh $WORKGROUP $SERVER $USERNAME $PASSWORD || failed=`expr $failed + $?`
 
 LD_LIBRARY_PATH="$SAMBA4SHAREDDIR:$LD_LIBRARY_PATH"