VERSION: Bump version up to Samba 4.17.6...
[Samba.git] / source4 / selftest / win / wintest_rpc.sh
blob03ac6a8755887ab294c6424ad5be9d6a48444eec
1 #!/bin/sh
3 . selftest/test_functions.sh
5 . selftest/win/wintest_functions.sh
7 # This variable is defined in the per-hosts .fns file.
8 . $WINTESTCONF
10 if [ $# -lt 4 ]; then
11 cat <<EOF
12 Usage: test_rpc.sh SERVER USERNAME PASSWORD DOMAIN
13 EOF
14 exit 1
17 server="$1"
18 username="$2"
19 password="$3"
20 domain="$4"
21 shift 4
23 ncacn_np_tests="RPC-SRVSVC RPC-UNIXINFO RPC-ECHO RPC-DSSETUP RPC-ALTERCONTEXT RPC-MULTIBIND"
24 # These tests fail on ncacn_np: RPC-SPOOLSS RPC-SCHANNEL RPC-JOIN RPC-LSA
25 # RPC-NETLOGON
27 ncalrpc_tests="RPC-UNIXINFO RPC-ECHO"
28 # These tests fail on ncalrpc: RPC-SCHANNEL RPC-JOIN RPC-LSA RPC-DSSETUP
29 # RPC-ALTERCONTEXT RPC-MULTIBIND RPC-NETLOGON
31 ncacn_ip_tcp_tests="RPC-UNIXINFO RPC-ECHO"
32 # These tests fail on ncacn_ip_tcp: RPC-SCHANNEL RPC-JOIN RPC-LSA RPC-DSSETUP
33 # RPC-ALTERCONTEXT RPC-MULTIBIND RPC-NETLOGON
35 bind_options="seal,padcheck bigendian"
37 test_type="ncalrpc ncacn_np ncacn_ip_tcp"
39 all_errs=0
41 on_error()
43 errstr=$1
44 all_errs=$(expr $all_errs + 1)
46 restore_snapshot "$errstr" "$VM_CFG_PATH"
49 for o in $bind_options; do
50 for transport in $test_type; do
51 case $transport in
52 ncalrpc) rpc_test=$ncalrpc_tests ;;
53 ncacn_np) rpc_test=$ncacn_np_tests ;;
54 ncacn_ip_tcp) rpc_test=$ncacn_ip_tcp_tests ;;
55 esac
57 for t in $rpc_test; do
58 test_name="$t on $transport with $o"
60 $SMBTORTURE_BIN_PATH -U $username%$password \
61 -W $domain $transport:$server[$o] \
62 $t || on_error "\n$test_name failed."
63 done
64 done
65 done
67 exit $all_errs