From: Mark Andrews Date: Wed, 2 Jul 2025 23:13:11 +0000 (+1000) Subject: rndc test: second 'rndc reconfig' happens too soon X-Git-Tag: v9.21.11~68^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b7bbda2f17d90abf0814f457e3837e648c6c9f8;p=thirdparty%2Fbind9.git rndc test: second 'rndc reconfig' happens too soon Rndc test "test 'rndc reconfig' with a broken config" was failing intermittently. Wait for 'running' to be logged rather than just using 'sleep 1' before calling 'rndc reconfig' a second time to get the expected error message rather than 'reconfig request ignored: already running'. --- diff --git a/bin/tests/system/rndc/tests.sh b/bin/tests/system/rndc/tests.sh index 81f05a8cc7e..9ce0cb03da4 100644 --- a/bin/tests/system/rndc/tests.sh +++ b/bin/tests/system/rndc/tests.sh @@ -562,8 +562,9 @@ status=$((status + ret)) n=$((n + 1)) echo_i "test 'rndc reconfig' with a broken config ($n)" ret=0 +nextpart ns4/named.run >/dev/null $RNDC -s 10.53.0.4 -p ${EXTRAPORT6} -c ns4/key6.conf reconfig >/dev/null || ret=1 -sleep 1 +wait_for_log 3 "running" ns4/named.run mv ns4/named.conf ns4/named.conf.save echo "error error error" >>ns4/named.conf $RNDC -s 10.53.0.4 -p ${EXTRAPORT6} -c ns4/key6.conf reconfig >rndc.out.1.test$n 2>&1 && ret=1 @@ -582,10 +583,11 @@ status=$((status + ret)) n=$((n + 1)) echo_i "restore working config ($n)" ret=0 +nextpart ns4/named.run >/dev/null mv ns4/named.conf.save ns4/named.conf sleep 1 $RNDC -s 10.53.0.4 -p ${EXTRAPORT6} -c ns4/key6.conf reconfig >/dev/null || ret=1 -sleep 1 +wait_for_log 3 "running" ns4/named.run if [ $ret != 0 ]; then echo_i "failed"; fi status=$((status + ret))