2004-10-30 11:53:36 +00:00
#!/bin/sh
# add tests to this list as they start passing, so we test
# that they stay passing
2005-01-11 20:52:04 +00:00
ncacn_np_tests = "RPC-SCHANNEL RPC-ECHO RPC-DSSETUP RPC-SAMLOGON RPC-ALTERCONTEXT RPC-MULTIBIND"
ncalrpc_tests = "RPC-SCHANNEL RPC-ECHO RPC-DSSETUP RPC-SAMLOGON RPC-ALTERCONTEXT RPC-MULTIBIND"
ncacn_ip_tcp_tests = "RPC-SCHANNEL RPC-ECHO RPC-SAMLOGON RPC-ALTERCONTEXT RPC-MULTIBIND"
2004-10-30 11:53:36 +00:00
if [ $# -lt 4 ] ; then
cat <<EOF
2005-01-06 09:26:14 +00:00
Usage: test_rpc.sh SERVER USERNAME PASSWORD DOMAIN
2004-10-30 11:53:36 +00:00
EOF
exit 1;
fi
2005-01-24 01:15:30 +00:00
if [ -z " $VALGRIND " ] ; then
export MALLOC_CHECK_ = 2
fi
2004-10-30 11:53:36 +00:00
server = " $1 "
username = " $2 "
password = " $3 "
domain = " $4 "
shift 4
testit( ) {
2004-11-07 10:02:27 +00:00
trap " rm -f test. $$ " EXIT
2004-10-30 11:53:36 +00:00
cmdline = " $* "
if ! $cmdline > test.$$ 2>& 1; then
cat test.$$ ;
rm -f test.$$ ;
echo " TEST FAILED - $cmdline " ;
exit 1;
fi
rm -f test.$$ ;
}
2005-03-23 22:15:48 +00:00
for bindoptions in connect sign seal sign,seal spnego spnego,sign spnego,seal validate padcheck bigendian bigendian,seal; do
for transport in ncalrpc ncacn_np ncacn_ip_tcp; do
2005-01-01 01:40:45 +00:00
case $transport in
ncalrpc) tests = $ncalrpc_tests ; ;
ncacn_np) tests = $ncacn_np_tests ; ;
ncacn_ip_tcp) tests = $ncacn_ip_tcp_tests ; ;
esac
2004-10-30 11:53:36 +00:00
for t in $tests ; do
echo Testing $t on $transport with $bindoptions
2005-01-24 01:15:30 +00:00
testit $VALGRIND bin/smbtorture $transport :" $server [ $bindoptions ] " -U" $username " %" $password " -W $domain $t " $* "
2004-10-30 11:53:36 +00:00
done
done
done
echo "ALL OK" ;