From b51c74f0bb436bf281de8aa92f73319a5244a35f Mon Sep 17 00:00:00 2001 From: Tom Krizek Date: Fri, 5 Jan 2024 15:12:30 +0100 Subject: [PATCH] Handle dig timing out gracefully in rootkeysentinel (cherry picked from commit de569ad97a7cf4875223eee8e1b21f1208b799ef) --- bin/tests/system/rootkeysentinel/tests.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/tests/system/rootkeysentinel/tests.sh b/bin/tests/system/rootkeysentinel/tests.sh index 3e0a487a9c..e5661f0d8d 100644 --- a/bin/tests/system/rootkeysentinel/tests.sh +++ b/bin/tests/system/rootkeysentinel/tests.sh @@ -49,13 +49,13 @@ if [ $ret != 0 ]; then echo_i "failed"; fi status=$((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=$((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=$((status + ret)) @@ -184,7 +184,7 @@ if [ $ret != 0 ]; then echo_i "failed"; fi status=$((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=$((status + ret))