Line | |
---|
1 | #!/bin/sh
|
---|
2 |
|
---|
3 | . selftest/test_functions.sh
|
---|
4 |
|
---|
5 | . selftest/win/wintest_functions.sh
|
---|
6 |
|
---|
7 | # This variable is defined in the per-hosts .fns file.
|
---|
8 | . $WINTESTCONF
|
---|
9 |
|
---|
10 | if [ $# -lt 4 ]; then
|
---|
11 | cat <<EOF
|
---|
12 | Usage: test_net.sh SERVER USERNAME PASSWORD DOMAIN
|
---|
13 | EOF
|
---|
14 | exit 1;
|
---|
15 | fi
|
---|
16 |
|
---|
17 | server="$1"
|
---|
18 | username="$2"
|
---|
19 | password="$3"
|
---|
20 | domain="$4"
|
---|
21 | shift 4
|
---|
22 |
|
---|
23 | ncacn_np_tests="NET-API-LOOKUP NET-API-LOOKUPHOST NET-API-RPCCONN-BIND NET-API-RPCCONN-SRV NET-API-RPCCONN-DC NET-API-RPCCONN-DCINFO NET-API-LISTSHARES"
|
---|
24 | #These tests fail on ncacn_np: NET-API-LOOKUPPDC NET-API-CREATEUSER NET-API-DELETEUSER
|
---|
25 |
|
---|
26 | ncalrpc_tests="NET-API-RPCCONN-SRV NET-API-RPCCONN-DC NET-API-RPCCONN-DCINFO NET-API-LISTSHARES"
|
---|
27 | #These tests fail on ncalrpc: NET-API-CREATEUSER NET-API-DELETEUSER
|
---|
28 |
|
---|
29 | ncacn_ip_tcp_tests="NET-API-LOOKUP NET-API-LOOKUPHOST NET-API-RPCCONN-SRV NET-API-RPCCONN-DC NET-API-RPCCONN-DCINFO NET-API-LISTSHARES"
|
---|
30 | #These tests fail on ncacn_ip_tcp: NET-API-LOOKUPPDC NET-API-CREATEUSER NET-API-DELETEUSER
|
---|
31 |
|
---|
32 | bind_options="seal,padcheck bigendian"
|
---|
33 |
|
---|
34 | test_type="ncalrpc ncacn_np ncacn_ip_tcp"
|
---|
35 |
|
---|
36 | all_errs=0
|
---|
37 |
|
---|
38 | on_error() {
|
---|
39 | errstr=$1
|
---|
40 |
|
---|
41 | all_errs=`expr $all_errs + 1`
|
---|
42 | restore_snapshot "$errstr" "$VM_CFG_PATH"
|
---|
43 | }
|
---|
44 |
|
---|
45 | for o in $bind_options; do
|
---|
46 | for transport in $test_type; do
|
---|
47 | case $transport in
|
---|
48 | ncalrpc) net_test=$ncalrpc_tests ;;
|
---|
49 | ncacn_np) net_test=$ncacn_np_tests ;;
|
---|
50 | ncacn_ip_tcp) net_test=$ncacn_ip_tcp_tests ;;
|
---|
51 | esac
|
---|
52 |
|
---|
53 | for t in $net_test; do
|
---|
54 | test_name="$t on $transport with $o"
|
---|
55 | $SMBTORTURE_BIN_PATH -U $username%$password \
|
---|
56 | -W $domain $transport:$server[$o] \
|
---|
57 | $t || on_error "\n$test_name failed."
|
---|
58 | done
|
---|
59 | done
|
---|
60 | done
|
---|
61 |
|
---|
62 | exit $all_errs
|
---|
Note:
See
TracBrowser
for help on using the repository browser.