s3-selftest: enable RPC-LSA-PRIVILEGES against Samba 3.
[ira/wip.git] / source3 / 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 test x"$TEST_FUNCTIONS_SH" != x"INCLUDED" && {
20 incdir=`dirname $0`
21 . $incdir/test_functions.sh
22 }
23
24 base="BASE-ATTR BASE-CHARSET BASE-CHKPATH BASE-DEFER_OPEN BASE-DELAYWRITE BASE-DELETE"
25 base="$base BASE-DENY1 BASE-DENY2 BASE-DENY3 BASE-DENYDOS BASE-DIR1 BASE-DIR2"
26 base="$base BASE-DISCONNECT BASE-FDPASS BASE-LOCK"
27 base="$base BASE-MANGLE BASE-NEGNOWAIT BASE-NTDENY1"
28 base="$base BASE-NTDENY2 BASE-OPEN BASE-OPENATTR BASE-PROPERTIES BASE-RENAME BASE-RW1"
29 base="$base BASE-SECLEAK BASE-TCON BASE-TCONDEV BASE-TRANS2 BASE-UNLINK BASE-VUID"
30 base="$base BASE-XCOPY BASE-SAMBA3ERROR"
31
32 raw="RAW-ACLS RAW-CHKPATH RAW-CLOSE RAW-COMPOSITE RAW-CONTEXT RAW-EAS"
33 raw="$raw RAW-IOCTL RAW-LOCK RAW-MKDIR RAW-MUX RAW-NOTIFY RAW-OPEN RAW-OPLOCK"
34 raw="$raw RAW-QFILEINFO RAW-QFSINFO RAW-READ RAW-RENAME RAW-SEARCH RAW-SEEK"
35 raw="$raw RAW-SFILEINFO RAW-SFILEINFO-BUG RAW-STREAMS RAW-UNLINK RAW-WRITE"
36 raw="$raw RAW-SAMBA3HIDE RAW-SAMBA3BADPATH RAW-SFILEINFO-RENAME"
37 raw="$raw RAW-SAMBA3CASEINSENSITIVE RAW-SAMBA3POSIXTIMEDLOCK"
38 raw="$raw RAW-SAMBA3ROOTDIRFID"
39
40 rpc="RPC-AUTHCONTEXT RPC-BINDSAMBA3 RPC-SAMBA3-SRVSVC RPC-SAMBA3-SHARESEC"
41 rpc="$rpc RPC-SAMBA3-SPOOLSS RPC-SAMBA3-WKSSVC"
42 rpc="$rpc RPC-NETLOGSAMBA3 RPC-SAMBA3SESSIONKEY RPC-SAMBA3-GETUSERNAME"
43 rpc="$rpc RPC-SVCCTL RPC-SPOOLSS RPC-SPOOLSS-WIN RPC-NTSVCS"
44 rpc="$rpc RPC-LSA-GETUSER RPC-LSA-LOOKUPSIDS RPC-LSA-LOOKUPNAMES"
45 rpc="$rpc RPC-LSA-PRIVILEGES "
46 rpc="$rpc RPC-SAMR RPC-SAMR-USERS RPC-SAMR-USERS-PRIVILEGES RPC-SAMR-PASSWORDS"
47 rpc="$rpc RPC-SAMR-PASSWORDS-PWDLASTSET RPC-SAMR-LARGE-DC RPC-SAMR-MACHINE-AUTH"
48 rpc="$rpc RPC-NETLOGON-S3 RPC-SCHANNEL RPC-SCHANNEL2 RPC-BENCH-SCHANNEL1 RPC-JOIN"
49
50 local="LOCAL-NSS-WRAPPER"
51
52 winbind="WINBIND-WBCLIENT"
53
54 # NOTE: to enable the UNIX-WHOAMI test, we need to change the default share
55 # config to allow guest access. I'm not sure whether this would break other
56 # tests, so leaving it alone for now -- jpeach
57 unix="UNIX-INFO2"
58
59 tests="$base $raw $rpc $unix $local $winbind"
60
61 if test "x$POSIX_SUBTESTS" != "x" ; then
62         tests="$POSIX_SUBTESTS"
63 fi
64
65 skipped="BASE-CHARSET BASE-TCONDEV"
66 skipped="$skipped RAW-ACLS RAW-COMPOSITE RAW-CONTEXT"
67 skipped="$skipped RAW-IOCTL"
68 skipped="$skipped RAW-QFILEINFO RAW-QFSINFO"
69 skipped="$skipped RAW-SFILEINFO"
70
71 echo "WARNING: Skipping tests $skipped"
72
73 ADDARGS="$ADDARGS --option=torture:sharedelay=100000"
74 ADDARGS="$ADDARGS --option=torture:writetimeupdatedelay=500000"
75
76 failed=0
77 for t in $tests; do
78     if [ ! -z "$start" -a "$start" != $t ]; then
79         continue;
80     fi
81     skip=0
82     for s in $skipped; do
83         if [ x"$s" = x"$t" ]; then
84             skip=1;
85             break;
86         fi
87     done
88     if [ $skip = 1 ]; then
89         continue;
90     fi
91     start=""
92     name="$t"
93     testit "$name" $VALGRIND $SMBTORTURE4 $TORTURE4_OPTIONS $ADDARGS $unc -U"$username"%"$password" $t || failed=`expr $failed + 1`
94 done
95
96 testok $0 $failed