From 8dc5d63e1dc9dbbf7d1ced13002af7a9906b4e34 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. (cherry picked from commit 25d12761706df45565295511634a614fb4dc2c2e) --- 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 b35d79769e..d1d72e4459 100755 --- a/bin/tests/system/nsupdate/tests.sh +++ b/bin/tests/system/nsupdate/tests.sh @@ -1080,7 +1080,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; } @@ -1090,7 +1090,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`