]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Use multiple fixed expressions for portable grep usage
authorMark Andrews <marka@isc.org>
Wed, 23 Mar 2022 00:53:00 +0000 (11:53 +1100)
committerMark Andrews <marka@isc.org>
Tue, 5 Apr 2022 03:55:13 +0000 (03:55 +0000)
Additionally add "network unreachable" as an expected error message.

bin/tests/system/digdelv/tests.sh

index 05ee71052210f9ccd0b980a2625e075ec088e51d..6c28ac7bca4e5447f36e21c1da3ec3c7e88025fd 100644 (file)
@@ -1047,7 +1047,7 @@ if [ -x "$DIG" ] ; then
   echo_i "check that dig tries the next server after a TCP socket connection error/timeout ($n)"
   ret=0
   dig_with_opts +tcp @10.53.0.99 @10.53.0.3 a.example > dig.out.test$n 2>&1 || ret=1
-  test $(grep "connection refused\|timed out" dig.out.test$n | wc -l) -eq 3 || ret=1
+  test $(grep -F -e "connection refused" -e "timed out" -e "network unreachable" dig.out.test$n | wc -l) -eq 3 || ret=1
   grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
   if [ $ret -ne 0 ]; then echo_i "failed"; fi
   status=$((status+ret))