From: Tom Krizek Date: Fri, 5 Jan 2024 14:08:05 +0000 (+0100) Subject: Handle dig timing out gracefully in logfileconfig X-Git-Tag: v9.16.50~38^2~10 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=895bd490aff6e22c809558ccc3a72f20764a788b;p=thirdparty%2Fbind9.git Handle dig timing out gracefully in logfileconfig (cherry picked from commit 8ece026848ceee4d728f97fbeb01bb15c99029d2) --- diff --git a/bin/tests/system/logfileconfig/tests.sh b/bin/tests/system/logfileconfig/tests.sh index 395666d5bda..e500a9e82d3 100644 --- a/bin/tests/system/logfileconfig/tests.sh +++ b/bin/tests/system/logfileconfig/tests.sh @@ -177,7 +177,7 @@ copy_setports ns1/named.versconf.in ns1/named.conf # a seconds since epoch version number touch ns1/named_vers.1480039317 rndc_reconfig ns1 10.53.0.1 >rndc.out.test$n -$DIG version.bind txt ch @10.53.0.1 -p ${PORT} >dig.out.test$n +$DIG version.bind txt ch @10.53.0.1 -p ${PORT} >dig.out.test$n || ret=1 grep "status: NOERROR" dig.out.test$n >/dev/null || ret=1 # we are configured to retain five logfiles (a current file # and 4 backups). so files with version number 5 or higher @@ -198,8 +198,8 @@ touch ns1/named_ts.1480039317 touch ns1/named_ts.20150101120000120 rndc_reconfig ns1 10.53.0.1 >rndc.out.test$n _found2() ( - $DIG version.bind txt ch @10.53.0.1 -p ${PORT} >dig.out.test$n - grep "status: NOERROR" dig.out.test$n >/dev/null || ret=1 + $DIG version.bind txt ch @10.53.0.1 -p ${PORT} >dig.out.test$n || return 1 + grep "status: NOERROR" dig.out.test$n >/dev/null || return 1 # we are configured to keep three versions, so the oldest # timestamped versions should be gone, and there should @@ -220,7 +220,7 @@ copy_setports ns1/named.unlimited.in ns1/named.conf # a seconds since epoch version number touch ns1/named_unlimited.1480039317 rndc_reconfig ns1 10.53.0.1 >rndc.out.test$n -$DIG version.bind txt ch @10.53.0.1 -p ${PORT} >dig.out.test$n +$DIG version.bind txt ch @10.53.0.1 -p ${PORT} >dig.out.test$n || ret=1 grep "status: NOERROR" dig.out.test$n >/dev/null || ret=1 test_with_retry -f ns1/named_unlimited.1480039317 || ret=1 test_with_retry -f ns1/named_unlimited.4 || ret=1