From 25d12761706df45565295511634a614fb4dc2c2e Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 16 Mar 2021 09:49:52 +1100 Subject: [PATCH] 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. --- bin/tests/system/nsupdate/tests.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/tests/system/nsupdate/tests.sh b/bin/tests/system/nsupdate/tests.sh index 5d7399e328..4274f86dd3 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`