summaryrefslogtreecommitdiff
path: root/testprogs
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-02-15 15:33:10 +1100
committerAndrew Tridgell <tridge@samba.org>2008-02-15 15:33:10 +1100
commitc09f70608c97c5df87818f0c6297e85cf8827862 (patch)
tree9ee804daa71d71114b45b72f3dc7ca21af2e110a /testprogs
parentd48dc5b2e6e45b5a0daa96b32f0b45cdf35a80e5 (diff)
downloadsamba-c09f70608c97c5df87818f0c6297e85cf8827862.tar.gz
samba-c09f70608c97c5df87818f0c6297e85cf8827862.tar.bz2
samba-c09f70608c97c5df87818f0c6297e85cf8827862.zip
added a blackbox test for masktest
(This used to be commit 05a110123df2372418e2ef2fd8f269b92054069c)
Diffstat (limited to 'testprogs')
-rwxr-xr-xtestprogs/blackbox/test_masktest.sh41
1 files changed, 41 insertions, 0 deletions
diff --git a/testprogs/blackbox/test_masktest.sh b/testprogs/blackbox/test_masktest.sh
new file mode 100755
index 0000000000..ef429a1fb0
--- /dev/null
+++ b/testprogs/blackbox/test_masktest.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+# Blackbox tests for masktest
+# Copyright (C) 2008 Andrew Tridgell
+# based on test_smbclient.sh
+
+if [ $# -lt 5 ]; then
+cat <<EOF
+Usage: test_masktest.sh SERVER USERNAME PASSWORD DOMAIN PREFIX
+EOF
+exit 1;
+fi
+
+SERVER=$1
+USERNAME=$2
+PASSWORD=$3
+DOMAIN=$4
+PREFIX=$5
+shift 5
+failed=0
+
+samba4bindir=`dirname $0`/../../source/bin
+masktest=$samba4bindir/masktest
+
+testit() {
+ name="$1"
+ shift
+ cmdline="$*"
+ echo "test: $name"
+ $cmdline
+ status=$?
+ if [ x$status = x0 ]; then
+ echo "success: $name"
+ else
+ echo "failure: $name"
+ fi
+ return $status
+}
+
+testit "masktest" $VALGRIND $masktest //$SERVER/tmp --num-ops=200 --dieonerror -W "$DOMAIN" -U"$USERNAME%$PASSWORD" $@ || failed=`expr $failed + 1`
+
+exit $failed