220261f3457779e3769d1f434db36899628e9497
[samba.git] / source4 / script / tests / test_posix.sh
1 #!/bin/sh
2
3 # this runs the file serving tests that are expected to pass with the
4 # current posix ntvfs backend
5
6 if [ $# -lt 3 ]; then
7 cat <<EOF
8 Usage: test_posix.sh UNC USERNAME PASSWORD <first> <smbtorture args>
9 EOF
10 exit 1;
11 fi
12
13 unc="$1"
14 username="$2"
15 password="$3"
16 start="$4"
17 shift 4
18 ADDARGS="$*"
19
20 incdir=`dirname $0`
21 . $incdir/test_functions.sh
22
23 smb2=`bin/smbtorture --list | grep "^SMB2-" | xargs`
24 raw=`bin/smbtorture --list | grep "^RAW-" | xargs`
25 base=`bin/smbtorture --list | grep "^BASE-" | xargs`
26 tests="$base $raw $smb2"
27
28 #
29 # please add tests you want to be skipped here!
30 #
31 skipped="BASE-CHARSET BASE-DEFER_OPEN BASE-DELAYWRITE RAW-COMPOSITE RAW-OPLOCK RAW-ACLS BASE-IOMETER"
32 skipped="$skipped BASE-SAMBA3ERROR BASE-CASETABLE BASE-NTTRANS BASE-BENCH-HOLDCON BASE-SCAN-MAXFID"
33 skipped="$skipped RAW-BENCH-OPLOCK RAW-SAMBA3HIDE RAW-SAMBA3CLOSEERR RAW-SAMBA3CHECKFSP RAW-SAMBA3BADPATH"
34 skipped="$skipped RAW-SCAN-EAMAX SMB2-LOCK SMB2-NOTIFY"
35
36 echo "WARNING: Skipping tests $skipped"
37
38 failed=0
39 for t in $tests; do
40     if [ ! -z "$start" -a "$start" != $t ]; then
41         continue;
42     fi
43     skip=0
44     for s in $skipped; do
45         if [ x"$s" = x"$t" ]; then
46             skip=1;
47             break;
48         fi
49     done
50     if [ $skip = 1 ]; then
51         continue;
52     fi
53     start=""
54     name="$t"
55     testit "$name" $VALGRIND bin/smbtorture $TORTURE_OPTIONS $ADDARGS $unc -U"$username"%"$password" $t
56 done
57
58 testok $0 $failed