]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Handle dig timing out gracefully in dnstap
authorTom Krizek <tkrizek@isc.org>
Fri, 5 Jan 2024 14:06:17 +0000 (15:06 +0100)
committerTom Krizek <tkrizek@isc.org>
Tue, 9 Jan 2024 12:43:24 +0000 (13:43 +0100)
(cherry picked from commit fcce010045640d1d183e14b8fdcacccc79eae256)

bin/tests/system/dnstap/tests.sh

index ab449227a85477c6205e6f0b40aa6d1d86b9ee3e..f634c203f63f4ea516a608798f22f00cb3012abe 100644 (file)
@@ -71,7 +71,7 @@ status=$(expr $status + $ret)
 # need tocomplete before reopening/rolling for the counts to
 # be correct.
 
-$DIG $DIGOPTS @10.53.0.3 a.example >dig.out
+$DIG $DIGOPTS @10.53.0.3 a.example >dig.out || ret=1
 wait_for_log 20 "(./NS): query_reset" ns1/named.run || true
 
 # check three different dnstap reopen/roll methods:
@@ -95,7 +95,7 @@ $RNDCCMD -s 10.53.0.2 dnstap -reopen | sed 's/^/ns2 /' | cat_i
 $RNDCCMD -s 10.53.0.3 dnstap -roll | sed 's/^/ns3 /' | cat_i
 $RNDCCMD -s 10.53.0.4 dnstap -reopen | sed 's/^/ns4 /' | cat_i
 
-$DIG $DIGOPTS @10.53.0.3 a.example >dig.out
+$DIG $DIGOPTS @10.53.0.3 a.example >dig.out || ret=1
 
 # send an UPDATE to ns2
 $NSUPDATE <<-EOF
@@ -558,7 +558,7 @@ if [ $ret != 0 ]; then echo_i "failed"; fi
 status=$(expr $status + $ret)
 
 if [ -n "$FSTRM_CAPTURE" ]; then
-  $DIG $DIGOPTS @10.53.0.4 a.example >dig.out
+  $DIG $DIGOPTS @10.53.0.4 a.example >dig.out || ret=1
 
   # send an UPDATE to ns4
   $NSUPDATE <<-EOF >nsupdate.out 2>&1
@@ -689,7 +689,7 @@ EOF
     ret=1
   }
   $RNDCCMD -s 10.53.0.4 dnstap -reopen | sed 's/^/ns4 /' | cat_i
-  $DIG $DIGOPTS @10.53.0.4 a.example >dig.out
+  $DIG $DIGOPTS @10.53.0.4 a.example >dig.out || ret=1
 
   echo_i "checking reopened unix socket message counts"
   sleep 2