From: Mark Andrews Date: Mon, 15 Mar 2021 22:49:52 +0000 (+1100) Subject: Ignore the actual error code returned by getaddrinfo X-Git-Tag: v9.17.12~44^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=25d12761706df45565295511634a614fb4dc2c2e;p=thirdparty%2Fbind9.git Ignore the actual error code returned by getaddrinfo 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. --- diff --git a/bin/tests/system/nsupdate/tests.sh b/bin/tests/system/nsupdate/tests.sh index 5d7399e328d..4274f86dd3f 100755 --- a/bin/tests/system/nsupdate/tests.sh +++ b/bin/tests/system/nsupdate/tests.sh @@ -1079,7 +1079,7 @@ echo_i "ensure unresolvable server name is fatal in non-interactive mode ($n)" $NSUPDATE < 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 < 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`