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

bin/tests/system/rootkeysentinel/tests.sh

index 5842edd73f865d0b14b5a4ae7d161244297639de..1c9b65450df7d0d248e09963cb3e257345d14fdd 100644 (file)
@@ -50,13 +50,13 @@ if [ $ret != 0 ]; then echo_i "failed"; fi
 status=$(expr $status + $ret)
 
 newtest "check authoritative server (expect NOERROR)"
-$DIG $DIGOPTS @10.53.0.2 example SOA >dig.out.ns2.test$n
+$DIG $DIGOPTS @10.53.0.2 example SOA >dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n >/dev/null || ret=1
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=$(expr $status + $ret)
 
 newtest "check test zone resolves with 'root-key-sentinel yes;'" " (expect NOERROR)"
-$DIG $DIGOPTS @10.53.0.3 example SOA >dig.out.ns3.test$n
+$DIG $DIGOPTS @10.53.0.3 example SOA >dig.out.ns3.test$n || ret=1
 grep "status: NOERROR" dig.out.ns3.test$n >/dev/null || ret=1
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=$(expr $status + $ret)
@@ -185,7 +185,7 @@ if [ $ret != 0 ]; then echo_i "failed"; fi
 status=$(expr $status + $ret)
 
 newtest "check test zone resolves with 'root-key-sentinel no;'" " (expect NOERROR)"
-$DIG $DIGOPTS @10.53.0.4 example SOA >dig.out.ns4.test$n
+$DIG $DIGOPTS @10.53.0.4 example SOA >dig.out.ns4.test$n || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n >/dev/null || ret=1
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=$(expr $status + $ret)