From: Mark Andrews Date: Sun, 4 Dec 2022 22:18:51 +0000 (+1100) Subject: Check ANY lookup using nslookup X-Git-Tag: v9.19.8~19^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c367dd1b0b40709b03499e21b33ea381655ec6fc;p=thirdparty%2Fbind9.git Check ANY lookup using nslookup --- diff --git a/bin/tests/system/nslookup/tests.sh b/bin/tests/system/nslookup/tests.sh index e3dd0f52643..1978eb40f30 100644 --- a/bin/tests/system/nslookup/tests.sh +++ b/bin/tests/system/nslookup/tests.sh @@ -122,5 +122,20 @@ grep "2001::ffff" nslookup.out${n} > /dev/null || ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi status=$((status+ret)) +n=$((n+1)) +echo_i "Check ANY lookup ($n)" +ret=0 +$NSLOOKUP -port=${PORT} -type=ANY example.net 10.53.0.1 2> nslookup.err${n} > nslookup.out${n} || ret=1 +lines=$(grep -c 'Address:.10\.53\.0\.1#'"${PORT}" nslookup.out${n}) +test $lines -eq 1 || ret=1 +lines=$(grep -c 'origin = ns1\.example\.net' nslookup.out${n}) +test $lines -eq 1 || ret=1 +lines=$(grep -c 'mail addr = hostmaster\.example\.net' nslookup.out${n}) +test $lines -eq 1 || ret=1 +lines=$(grep -c 'nameserver = ns1\.example\.net.' nslookup.out${n}) +test $lines -eq 1 || ret=1 +if [ $ret != 0 ]; then echo_i "failed"; fi +status=$((status+ret)) + echo_i "exit status: $status" [ $status -eq 0 ] || exit 1