summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-09-15 21:05:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:18:48 -0500
commitdc70a6b4e7d4ada5b9aa32712aead93262b360b2 (patch)
treeeb6cb977e71b94dd5db6c2a93a9b9dfb71269702
parentee1d645881b085ab011c6cb2816a8bc926b905c5 (diff)
downloadsamba-dc70a6b4e7d4ada5b9aa32712aead93262b360b2.tar.gz
samba-dc70a6b4e7d4ada5b9aa32712aead93262b360b2.tar.bz2
samba-dc70a6b4e7d4ada5b9aa32712aead93262b360b2.zip
r18569: add really simple testing of the 'simple' ntvfs backend, so we know
when it breaks. It isn't much good as a template for developers to use unless it works :-) (This used to be commit 262bee07dcb140b413d5ae5a8a754b3e57235323)
-rwxr-xr-xsource4/script/tests/mktestsetup.sh5
-rwxr-xr-xsource4/script/tests/test_simple.sh34
-rwxr-xr-xsource4/script/tests/tests_all.sh1
3 files changed, 40 insertions, 0 deletions
diff --git a/source4/script/tests/mktestsetup.sh b/source4/script/tests/mktestsetup.sh
index 181959aa5b..ea52eaf1cb 100755
--- a/source4/script/tests/mktestsetup.sh
+++ b/source4/script/tests/mktestsetup.sh
@@ -119,6 +119,11 @@ system:anonymous = true
cifs:domain = $DOMAIN
cifs:share = tmp
+[simple]
+ path = $TMPDIR
+ read only = no
+ ntvfs handler = simple
+
[cifsposixtestshare]
read only = no
ntvfs handler = cifsposix
diff --git a/source4/script/tests/test_simple.sh b/source4/script/tests/test_simple.sh
new file mode 100755
index 0000000000..fd63c28a79
--- /dev/null
+++ b/source4/script/tests/test_simple.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+# run a quick set of filesystem tests
+
+if [ $# -lt 3 ]; then
+cat <<EOF
+Usage: test_simple.sh UNC USERNAME PASSWORD <first> <smbtorture args>
+EOF
+exit 1;
+fi
+
+unc="$1"
+username="$2"
+password="$3"
+start="$4"
+shift 4
+ADDARGS="$*"
+
+incdir=`dirname $0`
+. $incdir/test_functions.sh
+
+tests="BASE-RW1"
+
+failed=0
+for t in $tests; do
+ if [ ! -z "$start" -a "$start" != $t ]; then
+ continue;
+ fi
+ start=""
+ name="$t"
+ testit "$name" $VALGRIND bin/smbtorture $TORTURE_OPTIONS $ADDARGS $unc -U"$username"%"$password" $t || failed=`expr $failed + 1`
+done
+
+testok $0 $failed
+
diff --git a/source4/script/tests/tests_all.sh b/source4/script/tests/tests_all.sh
index f25c9d0b93..b7227acc0c 100755
--- a/source4/script/tests/tests_all.sh
+++ b/source4/script/tests/tests_all.sh
@@ -13,3 +13,4 @@
$SRCDIR/script/tests/test_pidl.sh || failed=`expr $failed + $?`
$SRCDIR/script/tests/test_smbclient.sh $SERVER $USERNAME $PASSWORD $DOMAIN $PREFIX || failed=`expr $failed + $?`
$SRCDIR/script/tests/test_cifsdd.sh $SERVER $USERNAME $PASSWORD $DOMAIN || failed=`expr $failed + $?`
+ $SRCDIR/script/tests/test_simple.sh //$SERVER/simple $USERNAME $PASSWORD "" || failed=`expr $failed + $?`