s4-smbtorture: Make test names lowercase and dot-separated.
[samba.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.base 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 raw.sfileinfo.end.of.file"
39
40 smb2="smb2.lock smb2.read smb2.compound smb2.connect smb2.scan smb2.scanfind"
41 smb2="$smb2 smb2.bench.oplock"
42
43 rpc="rpc.authcontext rpc.samba3.bind rpc.samba3.srvsvc rpc.samba3.sharesec"
44 rpc="$rpc rpc.samba3.spoolss rpc.samba3.wkssvc rpc.samba3.winreg"
45 rpc="$rpc rpc.samba3.getaliasmembership.0"
46 rpc="$rpc rpc.samba3.netlogon rpc.samba3.sessionkey rpc.samba3.getusername"
47 rpc="$rpc rpc.svcctl rpc.ntsvcs rpc.winreg rpc.eventlog"
48 rpc="$rpc rpc.spoolss.printserver rpc.spoolss.win rpc.spoolss.notify rpc.spoolss.printer"
49 rpc="$rpc rpc.spoolss.driver"
50 rpc="$rpc rpc.lsa.getuser rpc.lsa.lookupsids rpc.lsa.lookupnames"
51 rpc="$rpc rpc.lsa.privileges "
52 rpc="$rpc rpc.samr rpc.samr.users rpc.samr.users.privileges rpc.samr.passwords"
53 rpc="$rpc rpc.samr.passwords.pwdlastset rpc.samr.large.dc rpc.samr.machine.auth"
54 rpc="$rpc rpc.netlogon.s3 rpc.netlogon.admin"
55 rpc="$rpc rpc.schannel rpc.schannel2 rpc.bench.schannel1 rpc.join rpc.bind"
56
57 local="local.nss.wrapper local.ndr"
58
59 winbind="winbind.struct winbind.wbclient"
60
61 rap="rap.basic rap.rpc rap.printing rap.sam"
62
63 # note: to enable the unix-whoami test, we need to change the default share
64 # config to allow guest access. i'm not sure whether this would break other
65 # tests, so leaving it alone for now -- jpeach
66 unix="unix.info2"
67
68 tests="$base $raw $smb2 $rpc $unix $local $winbind $rap"
69
70 if test "x$POSIX_SUBTESTS" != "x" ; then
71         tests="$POSIX_SUBTESTS"
72 fi
73
74 skipped="base.charset base.tcondev"
75 skipped="$skipped raw.acls raw.composite raw.context"
76 skipped="$skipped raw.ioctl"
77 skipped="$skipped raw.qfileinfo raw.qfsinfo"
78 skipped="$skipped raw.sfileinfo.base"
79
80 echo "WARNING: Skipping tests $skipped"
81
82 ADDARGS="$ADDARGS --option=torture:sharedelay=100000"
83 #ADDARGS="$ADDARGS --option=torture:writetimeupdatedelay=500000"
84
85 failed=0
86 for t in $tests; do
87     if [ ! -z "$start" -a "$start" != $t ]; then
88         continue;
89     fi
90     skip=0
91     for s in $skipped; do
92         if [ x"$s" = x"$t" ]; then
93             skip=1;
94             break;
95         fi
96     done
97     if [ $skip = 1 ]; then
98         continue;
99     fi
100     start=""
101     name="$t"
102     if [ "$t" = "base.delaywrite" ]; then
103             testit "$name" $VALGRIND $SMBTORTURE4 $TORTURE4_OPTIONS --maximum-runtime=900 $ADDARGS $unc -U"$username"%"$password" $t || failed=`expr $failed + 1`
104     else
105             testit "$name" $VALGRIND $SMBTORTURE4 $TORTURE4_OPTIONS $ADDARGS $unc -U"$username"%"$password" $t || failed=`expr $failed + 1`
106     fi
107     if [ "$t" = "raw.chkpath" ]; then
108             echo "Testing with case sensitive"
109             testit "$name" $VALGRIND $SMBTORTURE4 $TORTURE4_OPTIONS $ADDARGS "$unc"case -U"$username"%"$password" $t || failed=`expr $failed + 1`
110     fi
111 done
112
113 testok $0 $failed