ctdb-scripts: Move connection tracking to 10.interface
[samba4-gss.git] / source4 / selftest / win / wintest_2k3_dc.sh
blobe77c2e222292c6b0121d49dd44a7b54243d8fced
1 #!/bin/sh
3 if [ $# -lt 1 ]; then
4 cat <<EOF
5 Usage: wintest_2k3_dc.sh TESTGROUP
6 EOF
7 exit 1
8 fi
10 TESTGROUP=$1
12 if [ -z $WINTEST_DIR ]; then
13 echo "Environment variable WINTEST_DIR not found."
14 exit 1
17 # This variable is defined in the per-hosts .fns file for build-farm hosts that run windows tests.
18 if [ -z $WINTESTCONF ]; then
19 echo "Please point environment variable WINTESTCONF to your test_win.conf file."
20 exit 1
23 . $WINTESTCONF
24 . $WINTEST_DIR/wintest_functions.sh
26 export WIN2K3_DC_REMOTE_HOST=$(perl -I$WINTEST_DIR $WINTEST_DIR/vm_get_ip.pl WIN2K3_DC_VM_CFG_PATH)
28 if [ -z $WIN2K3_DC_REMOTE_HOST ]; then
29 # Restore snapshot to ensure VM is in a known state, then exit.
30 restore_snapshot "Test failed to get the IP address of the windows 2003 DC." "$WIN2K3_DC_VM_CFG_PATH"
31 exit 1
34 server=$WIN2K3_DC_REMOTE_HOST
35 username=$WIN2K3_DC_USERNAME
36 password=$WIN2K3_DC_PASSWORD
37 domain=$WIN2K3_DC_DOMAIN
38 realm=$WIN2K3_DC_REALM
40 OPTIONS="-U$username%$password -W $domain --option realm=$realm"
42 all_errs=0
44 on_error()
46 name=$1
48 all_errs=$(expr $all_errs + 1)
49 restore_snapshot "$name test failed." "$WIN2K3_DC_VM_CFG_PATH"
52 drsuapi_tests()
55 name="RPC-DRSUAPI on ncacn_ip_tcp with seal"
56 bin/smbtorture \
57 ncacn_ip_tcp:${server}[seal] $OPTIONS \
58 RPC-DRSUAPI || on_error "$name"
60 name="RPC-DRSUAPI on ncacn_ip_tcp with seal,bigendian"
61 bin/smbtorture \
62 ncacn_ip_tcp:${server}[seal,bigendian] $OPTIONS \
63 RPC-DRSUAPI || on_error "$name"
66 spoolss_tests()
69 name="RPC-SPOOLSS on ncacn_np"
70 bin/smbtorture \
71 ncacn_np:$server $OPTIONS \
72 RPC-SPOOLSS || on_error "$name"
75 ncacn_ip_tcp_tests()
77 bindopt=$1
78 transport="ncacn_ip_tcp"
79 tests="RPC-SCHANNEL RPC-EPMAPPER RPC-SAMR RPC-NETLOGON RPC-LSA RPC-SAMLOGON RPC-SAMSYNC RPC-MULTIBIND"
81 for bindoptions in $bindopt; do
82 for t in $tests; do
83 name="$t on $transport with $bindoptions"
84 bin/smbtorture $TORTURE_OPTIONS \
85 $transport:${server}[$bindoptions] \
86 $OPTIONS $t || on_error "$name"
87 done
88 done
91 ncacn_np_tests()
93 bindopt=$1
94 transport="ncacn_np"
95 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"
97 for bindoptions in $bindopt; do
98 for t in $tests; do
99 name="$t on $transport with $bindoptions"
100 bin/smbtorture $TORTURE_OPTIONS \
101 $transport:${server}[$bindoptions] \
102 $OPTIONS $t || on_error "$name"
103 done
104 done
107 bindoptions="padcheck connect sign seal ntlm,sign ntml,seal $VALIDATE bigendian"
109 case $TESTGROUP in
110 RPC-DRSUAPI) drsuapi_tests ;;
111 RPC-SPOOLSS) spoolss_tests ;;
112 ncacn_ip_tcp) ncacn_ip_tcp_tests $bindoptions ;;
113 ncacn_np) ncacn_np_tests $bindoptions ;;
115 echo "$TESTGROUP is not a known set of tests."
116 exit 1
118 esac
120 exit $all_errs