mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
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'.
This commit is contained in:
parent
7dcc654f2c
commit
8b7bbda2f1
1 changed files with 4 additions and 2 deletions
|
|
@ -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))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue