s4:param/tests: remove "security=server" test
[Samba/gebeck_regimport.git] / source4 / utils / tests / test_nmblookup.sh
blobc622db94c88e2dca961d41a8561ea1d8d9976933
1 #!/bin/sh
2 # Blackbox tests for nmblookup
4 NETBIOSNAME=$1
5 NETBIOSALIAS=$2
6 SERVER=$3
7 SERVER_IP=$4
8 shift 4
9 TORTURE_OPTIONS=$*
11 failed=0
13 testit() {
14 name="$1"
15 shift
16 cmdline="$*"
17 echo "test: $name"
18 $cmdline
19 status=$?
20 if [ x$status = x0 ]; then
21 echo "success: $name"
22 else
23 echo "failure: $name"
24 failed=`expr $failed + 1`
26 return $status
29 samba4bindir="$BINDIR"
30 nmblookup="$samba4bindir/nmblookup"
32 testit "nmblookup -U \$SERVER_IP \$SERVER" $nmblookup $TORTURE_OPTIONS -U $SERVER_IP $SERVER
33 testit "nmblookup -U \$SERVER_IP \$NETBIOSNAME" $nmblookup $TORTURE_OPTIONS -U $SERVER_IP $NETBIOSNAME
34 testit "nmblookup -U \$SERVER_IP \$NETBIOSALIAS" $nmblookup $TORTURE_OPTIONS -U $SERVER_IP $NETBIOSALIAS
35 testit "nmblookup \$SERVER" $nmblookup $TORTURE_OPTIONS $SERVER
36 testit "nmblookup \$NETBIOSNAME" $nmblookup $TORTURE_OPTIONS $NETBIOSNAME
37 testit "nmblookup \$NETBIOSALIAS" $nmblookup $TORTURE_OPTIONS $NETBIOSALIAS
39 exit $failed