]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Ignore the actual error code returned by getaddrinfo
authorMark Andrews <marka@isc.org>
Mon, 15 Mar 2021 22:49:52 +0000 (09:49 +1100)
committerMark Andrews <marka@isc.org>
Mon, 15 Mar 2021 23:20:28 +0000 (10:20 +1100)
when testing if interactive mode continues or not on
invalid hostname.  We only need to detect that getaddrinfo
failed and that we continued or not.

bin/tests/system/nsupdate/tests.sh

index 5d7399e328d09ff82e1268a1863800af296460ff..4274f86dd3fcbe9639439114c28b96f20528474f 100755 (executable)
@@ -1079,7 +1079,7 @@ echo_i "ensure unresolvable server name is fatal in non-interactive mode ($n)"
 $NSUPDATE <<END > nsupdate.out 2>&1 && ret=1
     server unresolvable..
 END
-grep "couldn't get address for 'unresolvable..': not found" nsupdate.out > /dev/null || ret=1
+grep "couldn't get address for 'unresolvable..':" nsupdate.out > /dev/null || ret=1
 grep "syntax error" nsupdate.out > /dev/null || ret=1
 [ $ret = 0 ] || { echo_i "failed"; status=1; }
 
@@ -1089,7 +1089,8 @@ echo_i "ensure unresolvable server name is not fatal in interactive mode ($n)"
 $NSUPDATE -i <<END > nsupdate.out 2>&1 || ret=1
     server unresolvable..
 END
-grep "couldn't get address for 'unresolvable..': not found" nsupdate.out > /dev/null || ret=1
+grep "couldn't get address for 'unresolvable..':" nsupdate.out > /dev/null || ret=1
+grep "syntax error" nsupdate.out > /dev/null && ret=1
 [ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 n=`expr $n + 1`