]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
rndc test: second 'rndc reconfig' happens too soon
authorMark Andrews <marka@isc.org>
Wed, 2 Jul 2025 23:13:11 +0000 (09:13 +1000)
committerMark Andrews <marka@isc.org>
Mon, 7 Jul 2025 01:42:10 +0000 (11:42 +1000)
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'.

bin/tests/system/rndc/tests.sh

index 81f05a8cc7eac6032fecc7f46fef4c6b4232b588..9ce0cb03da41a3c10c36ea98527fb2d1988910a5 100644 (file)
@@ -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))