From: Mark Andrews Date: Fri, 25 Sep 2020 07:42:41 +0000 (+1000) Subject: Wait for 'rpz: policy: reload done' to signalled before proceeding. X-Git-Tag: v9.17.6~32^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bdf8194af8855b0c5199ca49f3296e1160069a88;p=thirdparty%2Fbind9.git Wait for 'rpz: policy: reload done' to signalled before proceeding. RPZ rules cannot be fully relied upon until the summary RPZ database is updated after an "rndc reload". Wait until the relevant message is logged after an "rndc reload" to prevent false positives in the "rpzrecurse" system test caused by the RPZ rules not yet being in effect by the time ns3 is queried. --- diff --git a/bin/tests/system/rpzrecurse/tests.sh b/bin/tests/system/rpzrecurse/tests.sh index ee79f3fe7c6..320ee08314b 100644 --- a/bin/tests/system/rpzrecurse/tests.sh +++ b/bin/tests/system/rpzrecurse/tests.sh @@ -513,7 +513,9 @@ for mode in native dnsrps; do $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p ${CONTROLPORT} flush copy_setports ns3/named2.conf.in ns3/named.conf + nextpart ns3/named.run > /dev/null $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p ${CONTROLPORT} reload > /dev/null + wait_for_log 20 "rpz: policy: reload done" ns3/named.run || ret=1 echo_i "timing 'nsip-wait-recurse no'" t3=`$PERL -e 'print time()."\n";'` @@ -529,7 +531,9 @@ for mode in native dnsrps; do $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p ${CONTROLPORT} flush # restore original named.conf copy_setports ns3/named1.conf.in ns3/named.conf + nextpart ns3/named.run > /dev/null $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p ${CONTROLPORT} reload > /dev/null + wait_for_log 20 "rpz: policy: reload done" ns3/named.run || ret=1 t=`expr $t + 1` echo_i "checking 'nsdname-wait-recurse no' is faster than 'nsdname-wait-recurse yes' ($t)" @@ -544,7 +548,9 @@ for mode in native dnsrps; do $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p ${CONTROLPORT} flush copy_setports ns3/named3.conf.in ns3/named.conf + nextpart ns3/named.run > /dev/null $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p ${CONTROLPORT} reload > /dev/null + wait_for_log 20 "rpz: policy: reload done" ns3/named.run || ret=1 echo_i "timing 'nsdname-wait-recurse no'" t3=`$PERL -e 'print time()."\n";'`