From f3840de0cb3c5f1fa55b6c823e7922d399a51d00 Mon Sep 17 00:00:00 2001 From: Tom Krizek Date: Fri, 5 Jan 2024 15:06:17 +0100 Subject: [PATCH] Handle dig timing out gracefully in dnstap (cherry picked from commit fcce010045640d1d183e14b8fdcacccc79eae256) --- bin/tests/system/dnstap/tests.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/tests/system/dnstap/tests.sh b/bin/tests/system/dnstap/tests.sh index ab449227a8..f634c203f6 100644 --- a/bin/tests/system/dnstap/tests.sh +++ b/bin/tests/system/dnstap/tests.sh @@ -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