source: trunk/server/source4/selftest/win/wintest_rpc.sh

Last change on this file was 414, checked in by Herwig Bauernfeind, 16 years ago

Samba 3.5.0: Initial import

File size: 1.4 KB
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
10if [ $# -lt 4 ]; then
11cat <<EOF
12Usage: test_rpc.sh SERVER USERNAME PASSWORD DOMAIN
13EOF
14exit 1;
15fi
16
17server="$1"
18username="$2"
19password="$3"
20domain="$4"
21shift 4
22
23ncacn_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
26
27ncalrpc_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
30
31ncacn_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
34
35bind_options="seal,padcheck bigendian"
36
37test_type="ncalrpc ncacn_np ncacn_ip_tcp"
38
39all_errs=0
40
41on_error() {
42 errstr=$1
43 all_errs=`expr $all_errs + 1`
44
45 restore_snapshot "$errstr" "$VM_CFG_PATH"
46}
47
48for o in $bind_options; do
49 for transport in $test_type; do
50 case $transport in
51 ncalrpc) rpc_test=$ncalrpc_tests ;;
52 ncacn_np) rpc_test=$ncacn_np_tests ;;
53 ncacn_ip_tcp) rpc_test=$ncacn_ip_tcp_tests ;;
54 esac
55
56 for t in $rpc_test; do
57 test_name="$t on $transport with $o"
58
59 $SMBTORTURE_BIN_PATH -U $username%$password \
60 -W $domain $transport:$server[$o] \
61 $t || on_error "\n$test_name failed."
62 done
63 done
64done
65
66exit $all_errs
Note: See TracBrowser for help on using the repository browser.