From: Michał Kępień Date: Thu, 28 Mar 2024 17:56:35 +0000 (+0100) Subject: Fix check interaction in the "serve-stale" test X-Git-Tag: v9.18.26~5^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd64a3747b7c25a89a532e39a593fc823e78d5b7;p=thirdparty%2Fbind9.git Fix check interaction in the "serve-stale" test Commit 2eee1e176182657d6a8e147386b2fd187af823a8 modified the "serve-stale" system test by adding the ns3/named9.conf.in configuration file and making the ns3 named instance load that file near the end of the test. However, ns3/named9.conf.in changes the stale-answer-client-timeout setting to a very low value, which affects all subsequent checks in tests.sh (rather than just the check that needs the low value to be set) and may cause false positives. Fix by reloading configuration from ns3/named8.conf.in as soon as the check using a very low stale-answer-client-timeout value is finished. --- diff --git a/bin/tests/system/serve-stale/tests.sh b/bin/tests/system/serve-stale/tests.sh index a5e24018e7d..c001e7a071d 100755 --- a/bin/tests/system/serve-stale/tests.sh +++ b/bin/tests/system/serve-stale/tests.sh @@ -2680,6 +2680,9 @@ $RNDCCMD 10.53.0.3 serve-stale on >rndc.out.test$n.2 2>&1 || ret=1 $DIG -p ${PORT} @10.53.0.3 a-only-slow.example AAAA >dig.out.test$n || ret=1 grep "status: NOERROR" dig.out.test$n >/dev/null || ret=1 grep "2001:aaaa" dig.out.test$n >/dev/null || ret=1 +# revert configuration changes introduced by this check +copy_setports ns3/named8.conf.in ns3/named.conf +$RNDCCMD 10.53.0.3 reload >rndc.out.test$n.1 2>&1 || ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi status=$((status + ret))