Use rndc_reload in tests, make sure that reload is complete before continuing

This commit is contained in:
Witold Kręcicki
2018-12-11 12:59:11 +01:00
parent 517449e0e6
commit 6d50138405
32 changed files with 102 additions and 101 deletions

View File

@@ -33,7 +33,7 @@ $DIG $DIGOPTS tsigzone. \
grep "^;" dig.out.${t} > /dev/null 2>&1 && { echo_i "test $t failed" ; status=1; }
copy_setports ns2/named2.conf.in ns2/named.conf
$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i
rndc_reload ns2 10.53.0.2
sleep 5
# prefix 10/8 should fail
@@ -56,7 +56,7 @@ grep "^;" dig.out.${t} > /dev/null 2>&1 && { echo_i "test $t failed" ; status=1;
echo_i "testing nested ACL processing"
# all combinations of 10.53.0.{1|2} with key {one|two}, should succeed
copy_setports ns2/named3.conf.in ns2/named.conf
$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i
rndc_reload ns2 10.53.0.2
sleep 5
# should succeed
@@ -102,7 +102,7 @@ grep "^;" dig.out.${t} > /dev/null 2>&1 || { echo_i "test $t failed" ; status=1;
# now we only allow 10.53.0.1 *and* key one, or 10.53.0.2 *and* key two
copy_setports ns2/named4.conf.in ns2/named.conf
$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i
rndc_reload ns2 10.53.0.2
sleep 5
# should succeed
@@ -137,7 +137,7 @@ grep "^;" dig.out.${t} > /dev/null 2>&1 || { echo_i "test $t failed" ; status=1;
echo_i "testing allow-query-on ACL processing"
copy_setports ns2/named5.conf.in ns2/named.conf
$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i
rndc_reload ns2 10.53.0.2
sleep 5
t=`expr $t + 1`
$DIG -p ${PORT} +tcp soa example. \
@@ -161,7 +161,7 @@ grep "Transfer failed." dig.out.${t} >/dev/null 2>&1 || ret=1
status=`expr $status + $ret`
echo_i "calling rndc reconfig"
$RNDCCMD 10.53.0.3 reconfig 2>&1 | sed 's/^/ns3 /' | cat_i
rndc_reconfig ns3 10.53.0.3
sleep 1
@@ -190,7 +190,7 @@ grep "Transfer failed." dig.out.${t} >/dev/null 2>&1 || ret=1
status=`expr $status + $ret`
echo_i "calling rndc reconfig"
$RNDCCMD 10.53.0.4 reconfig 2>&1 | sed 's/^/ns4 /' | cat_i
rndc_reconfig ns4 10.53.0.4
sleep 1