r23500: Two changes to survive the now activated test for rename_internals_fsp:
[sfrench/samba-autobuild/.git] / source / script / tests / test_posix_s3.sh
1 #!/bin/sh
2
3 # this runs the file serving tests that are expected to pass with samba3
4
5 if [ $# -lt 3 ]; then
6 cat <<EOF
7 Usage: test_posix_s3.sh UNC USERNAME PASSWORD <first> <smbtorture args>
8 EOF
9 exit 1;
10 fi
11
12 unc="$1"
13 username="$2"
14 password="$3"
15 start="$4"
16 shift 4
17 ADDARGS="$*"
18
19 incdir=`dirname $0`
20 . $incdir/test_functions.sh
21
22 base="BASE-ATTR BASE-CHARSET BASE-CHKPATH BASE-DEFER_OPEN BASE-DELAYWRITE BASE-DELETE"
23 base="$base BASE-DENY1 BASE-DENY2 BASE-DENY3 BASE-DENYDOS BASE-DIR1 BASE-DIR2"
24 base="$base BASE-DISCONNECT BASE-FDPASS BASE-LOCK"
25 base="$base BASE-MANGLE BASE-NEGNOWAIT BASE-NTDENY1"
26 base="$base BASE-NTDENY2 BASE-OPEN BASE-OPENATTR BASE-PROPERTIES BASE-RENAME BASE-RW1"
27 base="$base BASE-SECLEAK BASE-TCON BASE-TCONDEV BASE-TRANS2 BASE-UNLINK BASE-VUID"
28 base="$base BASE-XCOPY BASE-SAMBA3ERROR"
29
30 raw="RAW-ACLS RAW-CHKPATH RAW-CLOSE RAW-COMPOSITE RAW-CONTEXT RAW-EAS"
31 raw="$raw RAW-IOCTL RAW-LOCK RAW-MKDIR RAW-MUX RAW-NOTIFY RAW-OPEN RAW-OPLOCK"
32 raw="$raw RAW-QFILEINFO RAW-QFSINFO RAW-READ RAW-RENAME RAW-SEARCH RAW-SEEK"
33 raw="$raw RAW-SFILEINFO RAW-SFILEINFO-BUG RAW-STREAMS RAW-UNLINK RAW-WRITE"
34 raw="$raw RAW-SAMBA3HIDE RAW-SAMBA3BADPATH RAW-SFILEINFO-RENAME"
35
36 rpc="RPC-AUTHCONTEXT RPC-BINDSAMBA3 RPC-SAMBA3-SRVSVC RPC-SAMBA3-SHARESEC"
37 rpc="$rpc RPC-UNIXINFO RPC-SAMBA3-SPOOLSS RPC-SAMBA3-WKSSVC"
38
39 # NOTE: to enable the UNIX-WHOAMI test, we need to change the default share
40 # config to allow guest access. I'm not sure whether this would break other
41 # tests, so leaving it alone for now -- jpeach
42 unix="UNIX-INFO2"
43
44 if test x$RUN_FROM_BUILD_FARM = xyes; then
45         rpc="$rpc RPC-NETLOGSAMBA3 RPC-SAMBA3SESSIONKEY RPC-SAMBA3-GETUSERNAME"
46 fi
47
48 tests="$base $raw $rpc $unix"
49
50 skipped="BASE-CHARSET BASE-DEFER_OPEN BASE-DELAYWRITE BASE-OPENATTR BASE-TCONDEV"
51 skipped="$skipped RAW-ACLS RAW-COMPOSITE RAW-CONTEXT RAW-EAS"
52 skipped="$skipped RAW-IOCTL RAW-MUX"
53 skipped="$skipped RAW-QFILEINFO RAW-QFSINFO RAW-SEARCH"
54 skipped="$skipped RAW-SFILEINFO RAW-STREAMS RAW-WRITE"
55
56 echo "WARNING: Skipping tests $skipped"
57
58 failed=0
59 for t in $tests; do
60     if [ ! -z "$start" -a "$start" != $t ]; then
61         continue;
62     fi
63     skip=0
64     for s in $skipped; do
65         if [ x"$s" = x"$t" ]; then
66             skip=1;
67             break;
68         fi
69     done
70     if [ $skip = 1 ]; then
71         continue;
72     fi
73     start=""
74     name="$t"
75     testit "$name" $VALGRIND $SMBTORTURE4 $TORTURE4_OPTIONS $ADDARGS $unc -U"$username"%"$password" $t || failed=`expr $failed + 1`
76 done
77
78 testok $0 $failed