mirror of
https://github.com/samba-team/samba.git
synced 2025-01-05 09:18:06 +03:00
c4c086ecc0
shfmt -f source4/utils/ | xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Pavel Filipenský <pfilipensky@samba.org> Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org> Autobuild-Date(master): Fri Jul 8 09:59:19 UTC 2022 on sn-devel-184
39 lines
894 B
Bash
Executable File
39 lines
894 B
Bash
Executable File
#!/bin/sh
|
|
# Blackbox tests for nmblookup
|
|
|
|
NETBIOSNAME=$1
|
|
NETBIOSALIAS=$2
|
|
SERVER=$3
|
|
SERVER_IP=$4
|
|
nmblookup=$5
|
|
shift 5
|
|
TORTURE_OPTIONS=$*
|
|
|
|
failed=0
|
|
|
|
testit()
|
|
{
|
|
name="$1"
|
|
shift
|
|
cmdline="$*"
|
|
echo "test: $name"
|
|
$cmdline
|
|
status=$?
|
|
if [ x$status = x0 ]; then
|
|
echo "success: $name"
|
|
else
|
|
echo "failure: $name"
|
|
failed=$(expr $failed + 1)
|
|
fi
|
|
return $status
|
|
}
|
|
|
|
testit "nmblookup -U \$SERVER_IP \$SERVER" $nmblookup $TORTURE_OPTIONS -U $SERVER_IP $SERVER
|
|
testit "nmblookup -U \$SERVER_IP \$NETBIOSNAME" $nmblookup $TORTURE_OPTIONS -U $SERVER_IP $NETBIOSNAME
|
|
testit "nmblookup -U \$SERVER_IP \$NETBIOSALIAS" $nmblookup $TORTURE_OPTIONS -U $SERVER_IP $NETBIOSALIAS
|
|
testit "nmblookup \$SERVER" $nmblookup $TORTURE_OPTIONS $SERVER
|
|
testit "nmblookup \$NETBIOSNAME" $nmblookup $TORTURE_OPTIONS $NETBIOSNAME
|
|
testit "nmblookup \$NETBIOSALIAS" $nmblookup $TORTURE_OPTIONS $NETBIOSALIAS
|
|
|
|
exit $failed
|