r4664: SPNEGO auth in our rpc server now works, so add it to the battery of
[samba.git] / source / script / tests / test_rpc.sh
1 #!/bin/sh
2
3 # add tests to this list as they start passing, so we test
4 # that they stay passing
5 ncacn_np_tests="RPC-SCHANNEL RPC-ECHO RPC-DSSETUP RPC-SAMLOGON RPC-ALTERCONTEXT"
6 ncalrpc_tests="RPC-SCHANNEL RPC-ECHO RPC-DSSETUP RPC-SAMLOGON RPC-ALTERCONTEXT"
7 ncacn_ip_tcp_tests="RPC-SCHANNEL RPC-ECHO RPC-SAMLOGON RPC-ALTERCONTEXT"
8
9 if [ $# -lt 4 ]; then
10 cat <<EOF
11 Usage: test_rpc.sh SERVER USERNAME PASSWORD DOMAIN
12 EOF
13 exit 1;
14 fi
15
16 server="$1"
17 username="$2"
18 password="$3"
19 domain="$4"
20 shift 4
21
22 testit() {
23    trap "rm -f test.$$" EXIT
24    cmdline="$*"
25    if ! $cmdline > test.$$ 2>&1; then
26        cat test.$$;
27        rm -f test.$$;
28        echo "TEST FAILED - $cmdline";
29        exit 1;
30    fi
31    rm -f test.$$;
32 }
33
34 for transport in ncalrpc ncacn_np ncacn_ip_tcp; do
35  for bindoptions in connect sign seal sign,seal spnego spnego,sign spnego,seal validate padcheck bigendian bigendian,seal; do
36      case $transport in
37          ncalrpc) tests=$ncalrpc_tests ;;
38          ncacn_np) tests=$ncacn_np_tests ;;
39          ncacn_ip_tcp) tests=$ncacn_ip_tcp_tests ;;
40      esac
41    for t in $tests; do
42     echo Testing $t on $transport with $bindoptions
43     testit bin/smbtorture $transport:"$server[$bindoptions]" -U"$username"%"$password" -W $domain $t "$*"
44    done
45  done
46 done
47
48 echo "ALL OK";