c9466e921d8de2767841e83ca2e63178d4e15a78
[ira/wip.git] / source3 / script / tests / test_smbtorture_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_smbtorture_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`/../../../testprogs/blackbox
21 . $incdir/subunit.sh
22 }
23
24 SMB_CONF_PATH="$CONFFILE"
25 export SMB_CONF_PATH
26
27 tests="FDPASS LOCK1 LOCK2 LOCK3 LOCK4 LOCK5 LOCK6 LOCK7 LOCK9"
28 #tests="$tests UNLINK BROWSE ATTR TRANS2 MAXFID TORTURE "
29 tests="$tests UNLINK BROWSE ATTR TRANS2 TORTURE "
30 tests="$tests OPLOCK1 OPLOCK2 OPLOCK3 OPLOCK4 STREAMERROR"
31 tests="$tests DIR DIR1 DIR-CREATETIME TCON TCONDEV RW1 RW2 RW3 RW-SIGNING"
32 tests="$tests OPEN XCOPY RENAME DELETE DELETE-LN PROPERTIES W2K"
33 tests="$tests TCON2 IOCTL CHKPATH FDSESS LOCAL-SUBSTITUTE CHAIN1"
34 tests="$tests GETADDRINFO POSIX UID-REGRESSION-TEST SHORTNAME-TEST"
35 tests="$tests LOCAL-BASE64 LOCAL-GENCACHE POSIX-APPEND"
36 tests="$tests LOCAL-string_to_sid"
37
38 if test "x$SMBTORTURE_S3_SUBTESTS" != "x" ; then
39     tests="$SMBTORTURE_S3_SUBTESTS"
40 fi
41
42 failed=0
43 for t in $tests; do
44     if [ ! -z "$start" -a "$start" != $t ]; then
45         continue;
46     fi
47     start=""
48     name="$t"
49     testit "$name" $VALGRIND $BINDIR/smbtorture $unc -U"$username"%"$password" $ADDARGS $t || failed=`expr $failed + 1`
50 done
51
52 testok $0 $failed