summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-02-21 09:10:33 +1100
committerAndrew Bartlett <abartlet@samba.org>2011-02-22 14:50:14 +1100
commit56c28d1cfb06688f77a87fb2af0609c72db829bc (patch)
treeb6a0d28a2f7a408a202c66765dbf75c011910988
parent1650da8a9964ba2ca3d389bdb39f65f7fa579ffc (diff)
downloadsamba-56c28d1cfb06688f77a87fb2af0609c72db829bc.tar.gz
samba-56c28d1cfb06688f77a87fb2af0609c72db829bc.tar.bz2
samba-56c28d1cfb06688f77a87fb2af0609c72db829bc.zip
s3-tests use $PREFIX to ensure tests don't work outside the test area
Andrew Bartlett
-rwxr-xr-xsource3/script/tests/test_smbclient_s3.sh11
-rwxr-xr-xsource3/selftest/tests.sh12
2 files changed, 12 insertions, 11 deletions
diff --git a/source3/script/tests/test_smbclient_s3.sh b/source3/script/tests/test_smbclient_s3.sh
index 075c6c548d..1335a37cef 100755
--- a/source3/script/tests/test_smbclient_s3.sh
+++ b/source3/script/tests/test_smbclient_s3.sh
@@ -2,9 +2,9 @@
# this runs the file serving tests that are expected to pass with samba3
-if [ $# -lt 6 ]; then
+if [ $# -lt 7 ]; then
cat <<EOF
-Usage: test_smbclient_s3.sh SERVER SERVER_IP USERNAME PASSWORD USERID LOCAL_PATH
+Usage: test_smbclient_s3.sh SERVER SERVER_IP USERNAME PASSWORD USERID LOCAL_PATH PREFIX
EOF
exit 1;
fi
@@ -15,9 +15,10 @@ USERNAME="$3"
PASSWORD="$4"
USERID="$5"
LOCAL_PATH="$6"
+PREFIX="$7"
SMBCLIENT="$VALGRIND ${SMBCLIENT:-$BINDIR/smbclient} $CONFIGURATION"
WBINFO="$VALGRIND ${WBINFO:-$BINDIR/wbinfo}"
-shift 6
+shift 7
ADDARGS="$*"
test x"$TEST_FUNCTIONS_SH" != x"INCLUDED" && {
@@ -58,7 +59,7 @@ test_noninteractive_no_prompt()
test_interactive_prompt_stdout()
{
prompt="smb"
- tmpfile=/tmp/smbclient.in.$$
+ tmpfile=$PREFIX/smbclient_interactive_prompt_commands
cat > $tmpfile <<EOF
du
@@ -93,7 +94,7 @@ EOF
test_bad_symlink()
{
prompt="posix_unlink deleted file /newname"
- tmpfile=/tmp/smbclient.in.$$
+ tmpfile=$PREFIX/smbclient_bad_symlinks_commands
cat > $tmpfile <<EOF
posix
diff --git a/source3/selftest/tests.sh b/source3/selftest/tests.sh
index 14d5805e32..202e842473 100755
--- a/source3/selftest/tests.sh
+++ b/source3/selftest/tests.sh
@@ -141,16 +141,16 @@ plantest "blackbox.smbclient_auth.plain" dc BINDIR="$BINDIR" script/tests/test_s
plantest "blackbox.smbclient_auth.plain sec share" secshare BINDIR="$BINDIR" script/tests/test_smbclient_auth.sh \$SERVER \$SERVER_IP \$SERVER\\\\\$USERNAME \$PASSWORD \$USERID
plantest "blackbox.smbclient_auth.plain member creds" member BINDIR="$BINDIR" script/tests/test_smbclient_auth.sh \$SERVER \$SERVER_IP \$SERVER\\\\\$USERNAME \$PASSWORD \$USERID
-plantest "blackbox.smbclient_s3.plain" dc BINDIR="$BINDIR" script/tests/test_smbclient_s3.sh \$SERVER \$SERVER_IP \$USERNAME \$PASSWORD \$USERID \$LOCAL_PATH
-plantest "blackbox.smbclient_s3.plain member creds" member BINDIR="$BINDIR" script/tests/test_smbclient_s3.sh \$SERVER \$SERVER_IP \$SERVER\\\\\$USERNAME \$PASSWORD \$USERID \$LOCAL_PATH
-#plantest "blackbox.smbclient_s3.plain domain creds" member BINDIR="$BINDIR" script/tests/test_smbclient_s3.sh \$SERVER \$SERVER_IP \$DOMAIN\\\\\$DC_USERNAME \$DC_PASSWORD \$USERID \$LOCAL_PATH
+plantest "blackbox.smbclient_s3.plain" dc BINDIR="$BINDIR" script/tests/test_smbclient_s3.sh \$SERVER \$SERVER_IP \$USERNAME \$PASSWORD \$USERID \$LOCAL_PATH \$PREFIX
+plantest "blackbox.smbclient_s3.plain member creds" member BINDIR="$BINDIR" script/tests/test_smbclient_s3.sh \$SERVER \$SERVER_IP \$SERVER\\\\\$USERNAME \$PASSWORD \$USERID \$LOCAL_PATH \$PREFIX
+#plantest "blackbox.smbclient_s3.plain domain creds" member BINDIR="$BINDIR" script/tests/test_smbclient_s3.sh \$SERVER \$SERVER_IP \$DOMAIN\\\\\$DC_USERNAME \$DC_PASSWORD \$USERID \$LOCAL_PATH \$PREFIX
# sign, only the member server allows signing
-plantest "blackbox.smbclient_s3.sign member creds" member BINDIR="$BINDIR" script/tests/test_smbclient_s3.sh \$SERVER \$SERVER_IP \$SERVER\\\\\$USERNAME \$PASSWORD \$USERID \$LOCAL_PATH "--signing=required"
-#plantest "blackbox.smbclient_s3.sign domain creds" member BINDIR="$BINDIR" script/tests/test_smbclient_s3.sh \$SERVER \$SERVER_IP \$DOMAIN\\\\\$DC_USERNAME \$DC_PASSWORD \$USERID \$LOCAL_PATH "--signing=required"
+plantest "blackbox.smbclient_s3.sign member creds" member BINDIR="$BINDIR" script/tests/test_smbclient_s3.sh \$SERVER \$SERVER_IP \$SERVER\\\\\$USERNAME \$PASSWORD \$USERID \$LOCAL_PATH \$PREFIX "--signing=required"
+#plantest "blackbox.smbclient_s3.sign domain creds" member BINDIR="$BINDIR" script/tests/test_smbclient_s3.sh \$SERVER \$SERVER_IP \$DOMAIN\\\\\$DC_USERNAME \$DC_PASSWORD \$USERID \$LOCAL_PATH \$PREFIX "--signing=required"
# encrypted
-plantest "blackbox.smbclient_s3.crypt" dc BINDIR="$BINDIR" script/tests/test_smbclient_s3.sh \$SERVER \$SERVER_IP \$USERNAME \$PASSWORD \$USERID \$LOCAL_PATH "-e"
+plantest "blackbox.smbclient_s3.crypt" dc BINDIR="$BINDIR" script/tests/test_smbclient_s3.sh \$SERVER \$SERVER_IP \$USERNAME \$PASSWORD \$USERID \$LOCAL_PATH \$PREFIX "-e"
# these don't work yet
#plantest "blackbox.smbclient_s3.crypt member creds" member BINDIR="$BINDIR" script/tests/test_smbclient_s3.sh \$SERVER \$SERVER_IP \$SERVER\\\\\$USERNAME \$PASSWORD "-e"