[rt46602] Fix output from rndc reload

This commit is contained in:
Ondřej Surý
2017-10-18 14:34:27 +02:00
committed by Stephen Morris
parent bc276f6c05
commit 53bade5ece

View File

@@ -55,7 +55,12 @@ SYSTEMTESTTOP=..
. ../getopts.sh
DIGOPTS="+tcp +nosea +nostat +nocmd +norec +noques +noauth +noadd +nostats +dnssec -p ${port}"
RNDCCMD="$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p ${controlport}"
rndc_reload() {
RNDCOUT=`$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p ${controlport} reload 2>&1`
echo_i "ns2 $RNDCOUT"
}
status=0
n=0
@@ -72,7 +77,7 @@ status=`expr $status + $ret`
# Test 2 - explicit any, query allowed
n=`expr $n + 1`
sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named02.conf.in > ns2/named.conf
$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
rndc_reload
sleep 5
echo_i "test $n: explicit any - query allowed"
@@ -86,7 +91,7 @@ status=`expr $status + $ret`
# Test 3 - none, query refused
n=`expr $n + 1`
sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named03.conf.in > ns2/named.conf
$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
rndc_reload
sleep 5
echo_i "test $n: none - query refused"
@@ -100,7 +105,7 @@ status=`expr $status + $ret`
# Test 4 - address allowed, query allowed
n=`expr $n + 1`
sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named04.conf.in > ns2/named.conf
$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
rndc_reload
sleep 5
echo_i "test $n: address allowed - query allowed"
@@ -114,7 +119,7 @@ status=`expr $status + $ret`
# Test 5 - address not allowed, query refused
n=`expr $n + 1`
sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named05.conf.in > ns2/named.conf
$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
rndc_reload
sleep 5
echo_i "test $n: address not allowed - query refused"
@@ -128,7 +133,7 @@ status=`expr $status + $ret`
# Test 6 - address disallowed, query refused
n=`expr $n + 1`
sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named06.conf.in > ns2/named.conf
$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
rndc_reload
sleep 5
echo_i "test $n: address disallowed - query refused"
@@ -142,7 +147,7 @@ status=`expr $status + $ret`
# Test 7 - acl allowed, query allowed
n=`expr $n + 1`
sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named07.conf.in > ns2/named.conf
$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
rndc_reload
sleep 5
echo_i "test $n: acl allowed - query allowed"
@@ -156,7 +161,7 @@ status=`expr $status + $ret`
# Test 8 - acl not allowed, query refused
n=`expr $n + 1`
sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named08.conf.in > ns2/named.conf
$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
rndc_reload
sleep 5
echo_i "test $n: acl not allowed - query refused"
@@ -171,7 +176,7 @@ status=`expr $status + $ret`
# Test 9 - acl disallowed, query refused
n=`expr $n + 1`
sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named09.conf.in > ns2/named.conf
$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
rndc_reload
sleep 5
echo_i "test $n: acl disallowed - query refused"
@@ -185,7 +190,7 @@ status=`expr $status + $ret`
# Test 10 - key allowed, query allowed
n=`expr $n + 1`
sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named10.conf.in > ns2/named.conf
$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
rndc_reload
sleep 5
echo_i "test $n: key allowed - query allowed"
@@ -199,7 +204,7 @@ status=`expr $status + $ret`
# Test 11 - key not allowed, query refused
n=`expr $n + 1`
sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named11.conf.in > ns2/named.conf
$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
rndc_reload
sleep 5
echo_i "test $n: key not allowed - query refused"
@@ -213,7 +218,7 @@ status=`expr $status + $ret`
# Test 12 - key disallowed, query refused
n=`expr $n + 1`
sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named12.conf.in > ns2/named.conf
$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
rndc_reload
sleep 5
echo_i "test $n: key disallowed - query refused"
@@ -230,7 +235,7 @@ n=20
# Test 21 - views default, query allowed
n=`expr $n + 1`
sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named21.conf.in > ns2/named.conf
$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
rndc_reload
sleep 5
echo_i "test $n: views default - query allowed"
@@ -244,7 +249,7 @@ status=`expr $status + $ret`
# Test 22 - views explicit any, query allowed
n=`expr $n + 1`
sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named22.conf.in > ns2/named.conf
$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
rndc_reload
sleep 5
echo_i "test $n: views explicit any - query allowed"
@@ -258,7 +263,7 @@ status=`expr $status + $ret`
# Test 23 - views none, query refused
n=`expr $n + 1`
sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named23.conf.in > ns2/named.conf
$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
rndc_reload
sleep 5
echo_i "test $n: views none - query refused"
@@ -272,7 +277,7 @@ status=`expr $status + $ret`
# Test 24 - views address allowed, query allowed
n=`expr $n + 1`
sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named24.conf.in > ns2/named.conf
$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
rndc_reload
sleep 5
echo_i "test $n: views address allowed - query allowed"
@@ -286,7 +291,7 @@ status=`expr $status + $ret`
# Test 25 - views address not allowed, query refused
n=`expr $n + 1`
sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named25.conf.in > ns2/named.conf
$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
rndc_reload
sleep 5
echo_i "test $n: views address not allowed - query refused"
@@ -300,7 +305,7 @@ status=`expr $status + $ret`
# Test 26 - views address disallowed, query refused
n=`expr $n + 1`
sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named26.conf.in > ns2/named.conf
$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
rndc_reload
sleep 5
echo_i "test $n: views address disallowed - query refused"
@@ -314,7 +319,7 @@ status=`expr $status + $ret`
# Test 27 - views acl allowed, query allowed
n=`expr $n + 1`
sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named27.conf.in > ns2/named.conf
$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
rndc_reload
sleep 5
echo_i "test $n: views acl allowed - query allowed"
@@ -328,7 +333,7 @@ status=`expr $status + $ret`
# Test 28 - views acl not allowed, query refused
n=`expr $n + 1`
sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named28.conf.in > ns2/named.conf
$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
rndc_reload
sleep 5
echo_i "test $n: views acl not allowed - query refused"
@@ -342,7 +347,7 @@ status=`expr $status + $ret`
# Test 29 - views acl disallowed, query refused
n=`expr $n + 1`
sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named29.conf.in > ns2/named.conf
$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
rndc_reload
sleep 5
echo_i "test $n: views acl disallowed - query refused"
@@ -356,7 +361,7 @@ status=`expr $status + $ret`
# Test 30 - views key allowed, query allowed
n=`expr $n + 1`
sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named30.conf.in > ns2/named.conf
$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
rndc_reload
sleep 5
echo_i "test $n: views key allowed - query allowed"
@@ -370,7 +375,7 @@ status=`expr $status + $ret`
# Test 31 - views key not allowed, query refused
n=`expr $n + 1`
sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named31.conf.in > ns2/named.conf
$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
rndc_reload
sleep 5
echo_i "test $n: views key not allowed - query refused"
@@ -384,7 +389,7 @@ status=`expr $status + $ret`
# Test 32 - views key disallowed, query refused
n=`expr $n + 1`
sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named32.conf.in > ns2/named.conf
$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
rndc_reload
sleep 5
echo_i "test $n: views key disallowed - query refused"
@@ -398,7 +403,7 @@ status=`expr $status + $ret`
# Test 33 - views over options, views allow, query allowed
n=`expr $n + 1`
sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named33.conf.in > ns2/named.conf
$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
rndc_reload
sleep 5
echo_i "test $n: views over options, views allow - query allowed"
@@ -412,7 +417,7 @@ status=`expr $status + $ret`
# Test 34 - views over options, views disallow, query refused
n=`expr $n + 1`
sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named34.conf.in > ns2/named.conf
$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
rndc_reload
sleep 5
echo_i "test $n: views over options, views disallow - query refused"
@@ -430,7 +435,7 @@ n=40
# Test 41 - zone default, query allowed
n=`expr $n + 1`
sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named40.conf.in > ns2/named.conf
$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
rndc_reload
sleep 5
echo_i "test $n: zone default - query allowed"
@@ -554,7 +559,7 @@ status=`expr $status + $ret`
# Test 53 - zones over options, zones allow, query allowed
n=`expr $n + 1`
sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named53.conf.in > ns2/named.conf
$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
rndc_reload
sleep 5
echo_i "test $n: views over options, views allow - query allowed"
@@ -568,7 +573,7 @@ status=`expr $status + $ret`
# Test 54 - zones over options, zones disallow, query refused
n=`expr $n + 1`
sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named54.conf.in > ns2/named.conf
$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
rndc_reload
sleep 5
echo_i "test $n: views over options, views disallow - query refused"
@@ -582,7 +587,7 @@ status=`expr $status + $ret`
# Test 55 - zones over views, zones allow, query allowed
n=`expr $n + 1`
sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named55.conf.in > ns2/named.conf
$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
rndc_reload
sleep 5
echo_i "test $n: zones over views, views allow - query allowed"
@@ -596,7 +601,7 @@ status=`expr $status + $ret`
# Test 56 - zones over views, zones disallow, query refused
n=`expr $n + 1`
sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named56.conf.in > ns2/named.conf
$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
rndc_reload
sleep 5
echo_i "test $n: zones over views, views disallow - query refused"
@@ -610,7 +615,7 @@ status=`expr $status + $ret`
# Test 57 - zones over views, zones disallow, query refused (allow-query-on)
n=`expr $n + 1`
sed -e "s/@PORT@/${port}/g;s/@CONTROLPORT@/${controlport}/g;" < ns2/named57.conf.in > ns2/named.conf
$RNDCCMD reload 2>&1 | sed 's/^/I:ns2 /'
rndc_reload
sleep 5
echo_i "test $n: zones over views, allow-query-on"