Debian Codegraph @

source4/selftest/win/wintest_2k3_dc.sh

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2
3 if [scip-shell system . . `[`. $# -lt 1 ]; then
4 catscip-shell system . . cat. <<EOF
5 Usage: wintest_2k3_dc.sh TESTGROUP
6 EOF
7 exit 1
8 fi
9
10 TESTGROUP=$1
11
12 if [scip-shell system . . `[`. -z $WINTEST_DIR ]; then
13 echoscip-shell system . . echo. "Environment variable WINTEST_DIR not found."
14 exit 1
15 fi
16
17 # This variable is defined in the per-hosts .fns file for build-farm hosts that run windows tests.
18 if [scip-shell system . . `[`. -z $WINTESTCONF ]; then
19 echoscip-shell system . . echo. "Please point environment variable WINTESTCONF to your test_win.conf file."
20 exit 1
21 fi
22
23 . $WINTESTCONF
24 . $WINTEST_DIR/wintest_functions.sh
25
26 export WIN2K3_DC_REMOTE_HOST=$(perlscip-shell system . . perl. -I$WINTEST_DIR $WINTEST_DIR/vm_get_ip.pl WIN2K3_DC_VM_CFG_PATH)
27
28 if [scip-shell system . . `[`. -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
32 fi
33
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
39
40 OPTIONS="-U$username%$password -W $domain --option realm=$realm"
41
42 all_errs=0
43
44 on_errorscip-shell shell samba 2:4.24.3+dfsg-1 on_error().()
45 {
46 name=$1
47
48 all_errs=$(exprscip-shell system . . expr. $all_errs + 1)
49 restore_snapshot "$name test failed." "$WIN2K3_DC_VM_CFG_PATH"
50 }
51
52 drsuapi_testsscip-shell shell samba 2:4.24.3+dfsg-1 drsuapi_tests().()
53 {
54
55 name="RPC-DRSUAPI on ncacn_ip_tcp with seal"
56 bin/smbtorture \
57 ncacn_ip_tcp:${server}[seal] $OPTIONS \
58 RPC-DRSUAPI || on_errorscip-shell shell samba 2:4.24.3+dfsg-1 on_error(). "$name"
59
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_errorscip-shell shell samba 2:4.24.3+dfsg-1 on_error(). "$name"
64 }
65
66 spoolss_testsscip-shell shell samba 2:4.24.3+dfsg-1 spoolss_tests().()
67 {
68
69 name="RPC-SPOOLSS on ncacn_np"
70 bin/smbtorture \
71 ncacn_np:$server $OPTIONS \
72 RPC-SPOOLSS || on_errorscip-shell shell samba 2:4.24.3+dfsg-1 on_error(). "$name"
73 }
74
75 ncacn_ip_tcp_testsscip-shell shell samba 2:4.24.3+dfsg-1 ncacn_ip_tcp_tests().()
76 {
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"
80
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_errorscip-shell shell samba 2:4.24.3+dfsg-1 on_error(). "$name"
87 done
88 done
89 }
90
91 ncacn_np_testsscip-shell shell samba 2:4.24.3+dfsg-1 ncacn_np_tests().()
92 {
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"
96
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_errorscip-shell shell samba 2:4.24.3+dfsg-1 on_error(). "$name"
103 done
104 done
105 }
106
107 bindoptions="padcheck connect sign seal ntlm,sign ntml,seal $VALIDATE bigendian"
108
109 case $TESTGROUP in
110 RPC-DRSUAPI) drsuapi_testsscip-shell shell samba 2:4.24.3+dfsg-1 drsuapi_tests(). ;;
111 RPC-SPOOLSS) spoolss_testsscip-shell shell samba 2:4.24.3+dfsg-1 spoolss_tests(). ;;
112 ncacn_ip_tcp) ncacn_ip_tcp_testsscip-shell shell samba 2:4.24.3+dfsg-1 ncacn_ip_tcp_tests(). $bindoptions ;;
113 ncacn_np) ncacn_np_testsscip-shell shell samba 2:4.24.3+dfsg-1 ncacn_np_tests(). $bindoptions ;;
114 *)
115 echoscip-shell system . . echo. "$TESTGROUP is not a known set of tests."
116 exit 1
117 ;;
118 esac
119
120 exit $all_errs