r7421: - move test* functions to a seperate file
[jra/samba/.git] / source4 / script / tests / test_w2k3.sh
1 #!/bin/sh
2
3 # tests that should pass against a w2k3 DC, as administrator
4
5 # add tests to this list as they start passing, so we test
6 # that they stay passing
7 ncacn_np_tests="RPC-SCHANNEL RPC-DSSETUP RPC-EPMAPPER RPC-SAMR RPC-WKSSVC RPC-SRVSVC RPC-EVENTLOG RPC-NETLOGON RPC-LSA RPC-SAMLOGON RPC-SAMSYNC RPC-MULTIBIND RPC-WINREG"
8 ncacn_ip_tcp_tests="RPC-SCHANNEL RPC-EPMAPPER RPC-SAMR RPC-NETLOGON RPC-LSA RPC-SAMLOGON RPC-SAMSYNC RPC-MULTIBIND"
9
10 if [ $# -lt 4 ]; then
11 cat <<EOF
12 Usage: test_w2k3.sh SERVER USERNAME PASSWORD DOMAIN REALM
13 EOF
14 exit 1;
15 fi
16
17 if [ -z "$VALGRIND" ]; then
18     export MALLOC_CHECK_=2
19 fi
20
21 server="$1"
22 username="$2"
23 password="$3"
24 domain="$4"
25 realm="$5"
26 shift 5
27
28 incdir=`dirname $0`
29 . $incdir/test_functions.sh
30
31 OPTIONS="-U$username%$password -W $domain --option realm=$realm"
32
33 failed=0
34
35 name="RPC-SPOOLSS on ncacn_np"
36 testit "$name" bin/smbtorture ncacn_np:"$server" $OPTIONS RPC-SPOOLSS "$*" || failed=`expr $failed + 1`
37
38 for bindoptions in padcheck connect sign seal spnego,sign spnego,seal validate bigendian; do
39    for transport in ncacn_ip_tcp ncacn_np; do
40      case $transport in
41          ncacn_np) tests=$ncacn_np_tests ;;
42          ncacn_ip_tcp) tests=$ncacn_ip_tcp_tests ;;
43      esac
44    for t in $tests; do
45     name="$t on $transport with $bindoptions"
46     testit "$name" bin/smbtorture $transport:"$server[$bindoptions]" $OPTIONS $t "$*" || failed=`expr $failed + 1`
47    done
48  done
49 done
50
51 name="RPC-DRSUAPI on ncacn_ip_tcp with seal"
52 testit "$name" bin/smbtorture ncacn_ip_tcp:"$server[seal]" $OPTIONS RPC-DRSUAPI "$*" || failed=`expr $failed + 1`
53 name="RPC-DRSUAPI on ncacn_ip_tcp with seal,bigendian"
54 testit "$name" bin/smbtorture ncacn_ip_tcp:"$server[seal,bigendian]" $OPTIONS RPC-DRSUAPI "$*" || failed=`expr $failed + 1`
55
56 testok $0 $failed