mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 13:38:26 +00:00
add test counter
This commit is contained in:
parent
9852ad2408
commit
9e14bf1f86
@ -24,8 +24,10 @@ DIGCMD="$DIG $DIGOPTS @10.53.0.2 -p 5300"
|
|||||||
RNDCCMD="$RNDC -s 10.53.0.2 -p 9953 -c ../common/rndc.conf"
|
RNDCCMD="$RNDC -s 10.53.0.2 -p 9953 -c ../common/rndc.conf"
|
||||||
|
|
||||||
status=0
|
status=0
|
||||||
|
n=0
|
||||||
|
|
||||||
echo "I:preparing"
|
n=`expr $n + 1`
|
||||||
|
echo "I:preparing ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
$NSUPDATE -p 5300 -k ns2/session.key > /dev/null 2>&1 <<END || ret=1
|
$NSUPDATE -p 5300 -k ns2/session.key > /dev/null 2>&1 <<END || ret=1
|
||||||
server 10.53.0.2
|
server 10.53.0.2
|
||||||
@ -44,19 +46,22 @@ status=`expr $status + $ret`
|
|||||||
echo "I:rndc freeze"
|
echo "I:rndc freeze"
|
||||||
$RNDCCMD freeze | sed 's/^/I:ns2 /'
|
$RNDCCMD freeze | sed 's/^/I:ns2 /'
|
||||||
|
|
||||||
echo "I:checking zone was dumped"
|
n=`expr $n + 1`
|
||||||
|
echo "I:checking zone was dumped ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
grep "addition 1" ns2/nil.db > /dev/null 2>&1 || ret=1
|
grep "addition 1" ns2/nil.db > /dev/null 2>&1 || ret=1
|
||||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo "I:checking journal file is still present"
|
n=`expr $n + 1`
|
||||||
|
echo "I:checking journal file is still present ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
[ -s ns2/nil.db.jnl ] || ret=1
|
[ -s ns2/nil.db.jnl ] || ret=1
|
||||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo "I:checking zone not writable"
|
n=`expr $n + 1`
|
||||||
|
echo "I:checking zone not writable ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
$NSUPDATE -p 5300 -k ns2/session.key > /dev/null 2>&1 <<END && ret=1
|
$NSUPDATE -p 5300 -k ns2/session.key > /dev/null 2>&1 <<END && ret=1
|
||||||
server 10.53.0.2
|
server 10.53.0.2
|
||||||
@ -72,7 +77,8 @@ status=`expr $status + $ret`
|
|||||||
echo "I:rndc thaw"
|
echo "I:rndc thaw"
|
||||||
$RNDCCMD thaw | sed 's/^/I:ns2 /'
|
$RNDCCMD thaw | sed 's/^/I:ns2 /'
|
||||||
|
|
||||||
echo "I:checking zone now writable"
|
n=`expr $n + 1`
|
||||||
|
echo "I:checking zone now writable ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
$NSUPDATE -p 5300 -k ns2/session.key > /dev/null 2>&1 <<END || ret=1
|
$NSUPDATE -p 5300 -k ns2/session.key > /dev/null 2>&1 <<END || ret=1
|
||||||
server 10.53.0.2
|
server 10.53.0.2
|
||||||
@ -88,19 +94,22 @@ echo "I:rndc sync"
|
|||||||
ret=0
|
ret=0
|
||||||
$RNDCCMD sync nil | sed 's/^/I:ns2 /'
|
$RNDCCMD sync nil | sed 's/^/I:ns2 /'
|
||||||
|
|
||||||
echo "I:checking zone was dumped"
|
n=`expr $n + 1`
|
||||||
|
echo "I:checking zone was dumped ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
grep "addition 3" ns2/nil.db > /dev/null 2>&1 || ret=1
|
grep "addition 3" ns2/nil.db > /dev/null 2>&1 || ret=1
|
||||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo "I:checking journal file is still present"
|
n=`expr $n + 1`
|
||||||
|
echo "I:checking journal file is still present ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
[ -s ns2/nil.db.jnl ] || ret=1
|
[ -s ns2/nil.db.jnl ] || ret=1
|
||||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo "I:checking zone is still writable"
|
n=`expr $n + 1`
|
||||||
|
echo "I:checking zone is still writable ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
$NSUPDATE -p 5300 -k ns2/session.key > /dev/null 2>&1 <<END || ret=1
|
$NSUPDATE -p 5300 -k ns2/session.key > /dev/null 2>&1 <<END || ret=1
|
||||||
server 10.53.0.2
|
server 10.53.0.2
|
||||||
@ -117,19 +126,22 @@ echo "I:rndc sync -clean"
|
|||||||
ret=0
|
ret=0
|
||||||
$RNDCCMD sync -clean nil | sed 's/^/I:ns2 /'
|
$RNDCCMD sync -clean nil | sed 's/^/I:ns2 /'
|
||||||
|
|
||||||
echo "I:checking zone was dumped"
|
n=`expr $n + 1`
|
||||||
|
echo "I:checking zone was dumped ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
grep "addition 4" ns2/nil.db > /dev/null 2>&1 || ret=1
|
grep "addition 4" ns2/nil.db > /dev/null 2>&1 || ret=1
|
||||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo "I:checking journal file is deleted"
|
n=`expr $n + 1`
|
||||||
|
echo "I:checking journal file is deleted ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
[ -s ns2/nil.db.jnl ] && ret=1
|
[ -s ns2/nil.db.jnl ] && ret=1
|
||||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo "I:checking zone is still writable"
|
n=`expr $n + 1`
|
||||||
|
echo "I:checking zone is still writable ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
$NSUPDATE -p 5300 -k ns2/session.key > /dev/null 2>&1 <<END || ret=1
|
$NSUPDATE -p 5300 -k ns2/session.key > /dev/null 2>&1 <<END || ret=1
|
||||||
server 10.53.0.2
|
server 10.53.0.2
|
||||||
@ -142,29 +154,33 @@ $DIGCMD text4.nil. TXT | grep 'addition 4' >/dev/null || ret=1
|
|||||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo "I:checking other journal files not removed"
|
n=`expr $n + 1`
|
||||||
|
echo "I:checking other journal files not removed ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
[ -s ns2/other.db.jnl ] || ret=1
|
[ -s ns2/other.db.jnl ] || ret=1
|
||||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo "I:cleaning all zones"
|
echo "I:cleaning all zones ($n)"
|
||||||
$RNDCCMD sync -clean | sed 's/^/I:ns2 /'
|
$RNDCCMD sync -clean | sed 's/^/I:ns2 /'
|
||||||
|
|
||||||
echo "I:checking all journals removed"
|
n=`expr $n + 1`
|
||||||
|
echo "I:checking all journals removed ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
[ -s ns2/nil.db.jnl ] && ret=1
|
[ -s ns2/nil.db.jnl ] && ret=1
|
||||||
[ -s ns2/other.db.jnl ] && ret=1
|
[ -s ns2/other.db.jnl ] && ret=1
|
||||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo "I:checking that freezing static zones is not allowed"
|
n=`expr $n + 1`
|
||||||
|
echo "I:checking that freezing static zones is not allowed ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
$RNDCCMD freeze static 2>&1 | grep 'not dynamic' > /dev/null || ret=1
|
$RNDCCMD freeze static 2>&1 | grep 'not dynamic' > /dev/null || ret=1
|
||||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo "I:checking that journal is removed when serial is changed before thaw"
|
n=`expr $n + 1`
|
||||||
|
echo "I:checking that journal is removed when serial is changed before thaw ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
sleep 1
|
sleep 1
|
||||||
$NSUPDATE -p 5300 -k ns2/session.key > /dev/null 2>&1 <<END || ret=1
|
$NSUPDATE -p 5300 -k ns2/session.key > /dev/null 2>&1 <<END || ret=1
|
||||||
@ -195,7 +211,8 @@ $DIGCMD frozen.other. TXT | grep 'frozen addition' >/dev/null || ret=1
|
|||||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo "I:checking that journal is kept when ixfr-from-differences is in use"
|
n=`expr $n + 1`
|
||||||
|
echo "I:checking that journal is kept when ixfr-from-differences is in use ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
$NSUPDATE -p 5300 -k ns2/session.key > /dev/null 2>&1 <<END || ret=1
|
$NSUPDATE -p 5300 -k ns2/session.key > /dev/null 2>&1 <<END || ret=1
|
||||||
server 10.53.0.2
|
server 10.53.0.2
|
||||||
@ -226,20 +243,23 @@ if [ $ret != 0 ]; then echo "I:failed"; fi
|
|||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
# temp test
|
# temp test
|
||||||
echo "I:dumping stats"
|
echo "I:dumping stats ($n)"
|
||||||
$RNDCCMD stats
|
$RNDCCMD stats
|
||||||
echo "I: verifying adb records in named.stats"
|
n=`expr $n + 1`
|
||||||
|
echo "I: verifying adb records in named.stats ($n)"
|
||||||
grep "ADB stats" ns2/named.stats > /dev/null || ret=1
|
grep "ADB stats" ns2/named.stats > /dev/null || ret=1
|
||||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo "I:test using second key"
|
n=`expr $n + 1`
|
||||||
|
echo "I:test using second key ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
$RNDC -s 10.53.0.2 -p 9953 -c ns2/secondkey.conf status > /dev/null || ret=1
|
$RNDC -s 10.53.0.2 -p 9953 -c ns2/secondkey.conf status > /dev/null || ret=1
|
||||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo "I:test 'rndc dumpdb' on a empty cache"
|
n=`expr $n + 1`
|
||||||
|
echo "I:test 'rndc dumpdb' on a empty cache ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
$RNDC -s 10.53.0.3 -p 9953 -c ../common/rndc.conf dumpdb > /dev/null || ret=1
|
$RNDC -s 10.53.0.3 -p 9953 -c ../common/rndc.conf dumpdb > /dev/null || ret=1
|
||||||
for i in 1 2 3 4 5 6 7 8 9
|
for i in 1 2 3 4 5 6 7 8 9
|
||||||
@ -253,7 +273,8 @@ done
|
|||||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo "I:test 'rndc reload' on a zone with include files"
|
n=`expr $n + 1`
|
||||||
|
echo "I:test 'rndc reload' on a zone with include files ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
grep "incl/IN: skipping load" ns2/named.run > /dev/null && ret=1
|
grep "incl/IN: skipping load" ns2/named.run > /dev/null && ret=1
|
||||||
loads=`grep "incl/IN: starting load" ns2/named.run | wc -l`
|
loads=`grep "incl/IN: starting load" ns2/named.run | wc -l`
|
||||||
@ -281,7 +302,8 @@ done
|
|||||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo "I:testing rndc with hmac-md5"
|
n=`expr $n + 1`
|
||||||
|
echo "I:testing rndc with hmac-md5 ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
$RNDC -s 10.53.0.4 -p 9951 -c ns4/key1.conf status > /dev/null 2>&1 || ret=1
|
$RNDC -s 10.53.0.4 -p 9951 -c ns4/key1.conf status > /dev/null 2>&1 || ret=1
|
||||||
for i in 2 3 4 5 6
|
for i in 2 3 4 5 6
|
||||||
@ -291,7 +313,8 @@ done
|
|||||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo "I:testing rndc with hmac-sha1"
|
n=`expr $n + 1`
|
||||||
|
echo "I:testing rndc with hmac-sha1 ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
$RNDC -s 10.53.0.4 -p 9952 -c ns4/key2.conf status > /dev/null 2>&1 || ret=1
|
$RNDC -s 10.53.0.4 -p 9952 -c ns4/key2.conf status > /dev/null 2>&1 || ret=1
|
||||||
for i in 1 3 4 5 6
|
for i in 1 3 4 5 6
|
||||||
@ -301,7 +324,8 @@ done
|
|||||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo "I:testing rndc with hmac-sha224"
|
n=`expr $n + 1`
|
||||||
|
echo "I:testing rndc with hmac-sha224 ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
$RNDC -s 10.53.0.4 -p 9953 -c ns4/key3.conf status > /dev/null 2>&1 || ret=1
|
$RNDC -s 10.53.0.4 -p 9953 -c ns4/key3.conf status > /dev/null 2>&1 || ret=1
|
||||||
for i in 1 2 4 5 6
|
for i in 1 2 4 5 6
|
||||||
@ -311,7 +335,8 @@ done
|
|||||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo "I:testing rndc with hmac-sha256"
|
n=`expr $n + 1`
|
||||||
|
echo "I:testing rndc with hmac-sha256 ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
$RNDC -s 10.53.0.4 -p 9954 -c ns4/key4.conf status > /dev/null 2>&1 || ret=1
|
$RNDC -s 10.53.0.4 -p 9954 -c ns4/key4.conf status > /dev/null 2>&1 || ret=1
|
||||||
for i in 1 2 3 5 6
|
for i in 1 2 3 5 6
|
||||||
@ -321,7 +346,8 @@ done
|
|||||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo "I:testing rndc with hmac-sha384"
|
n=`expr $n + 1`
|
||||||
|
echo "I:testing rndc with hmac-sha384 ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
$RNDC -s 10.53.0.4 -p 9955 -c ns4/key5.conf status > /dev/null 2>&1 || ret=1
|
$RNDC -s 10.53.0.4 -p 9955 -c ns4/key5.conf status > /dev/null 2>&1 || ret=1
|
||||||
for i in 1 2 3 4 6
|
for i in 1 2 3 4 6
|
||||||
@ -331,7 +357,8 @@ done
|
|||||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo "I:testing rndc with hmac-sha512"
|
n=`expr $n + 1`
|
||||||
|
echo "I:testing rndc with hmac-sha512 ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
$RNDC -s 10.53.0.4 -p 9956 -c ns4/key6.conf status > /dev/null 2>&1 || ret=1
|
$RNDC -s 10.53.0.4 -p 9956 -c ns4/key6.conf status > /dev/null 2>&1 || ret=1
|
||||||
for i in 1 2 3 4 5
|
for i in 1 2 3 4 5
|
||||||
@ -341,27 +368,31 @@ done
|
|||||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo "I:testing automatic zones are reported"
|
n=`expr $n + 1`
|
||||||
|
echo "I:testing automatic zones are reported ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
$RNDC -s 10.53.0.4 -p 9956 -c ns4/key6.conf status > rndc.status || ret=1
|
$RNDC -s 10.53.0.4 -p 9956 -c ns4/key6.conf status > rndc.status || ret=1
|
||||||
grep "number of zones: 198 (196 automatic)" rndc.status > /dev/null || ret=1
|
grep "number of zones: 198 (196 automatic)" rndc.status > /dev/null || ret=1
|
||||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo "I:testing rndc with null command"
|
n=`expr $n + 1`
|
||||||
|
echo "I:testing rndc with null command ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
$RNDC -s 10.53.0.4 -p 9956 -c ns4/key6.conf null || ret=1
|
$RNDC -s 10.53.0.4 -p 9956 -c ns4/key6.conf null || ret=1
|
||||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo "I:testing rndc with unknown control channel command"
|
n=`expr $n + 1`
|
||||||
|
echo "I:testing rndc with unknown control channel command ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
$RNDC -s 10.53.0.4 -p 9956 -c ns4/key6.conf obviouslynotacommand >/dev/null 2>&1 && ret=1
|
$RNDC -s 10.53.0.4 -p 9956 -c ns4/key6.conf obviouslynotacommand >/dev/null 2>&1 && ret=1
|
||||||
# rndc: 'obviouslynotacommand' failed: unknown command
|
# rndc: 'obviouslynotacommand' failed: unknown command
|
||||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo "I:testing rndc with querylog command"
|
n=`expr $n + 1`
|
||||||
|
echo "I:testing rndc with querylog command ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
# first enable it with querylog on option
|
# first enable it with querylog on option
|
||||||
$RNDC -s 10.53.0.4 -p 9956 -c ns4/key6.conf querylog on >/dev/null 2>&1 || ret=1
|
$RNDC -s 10.53.0.4 -p 9956 -c ns4/key6.conf querylog on >/dev/null 2>&1 || ret=1
|
||||||
@ -378,7 +409,8 @@ grep "query: foo9876.bind CH TXT" ns4/named.run > /dev/null && ret=1
|
|||||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo "I:testing rndc nta time limits"
|
n=`expr $n + 1`
|
||||||
|
echo "I:testing rndc nta time limits ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
$RNDC -s 10.53.0.4 -p 9956 -c ns4/key6.conf nta -l 2h nta1.example 2>&1 | grep "Negative trust anchor added" > /dev/null || ret=1
|
$RNDC -s 10.53.0.4 -p 9956 -c ns4/key6.conf nta -l 2h nta1.example 2>&1 | grep "Negative trust anchor added" > /dev/null || ret=1
|
||||||
$RNDC -s 10.53.0.4 -p 9956 -c ns4/key6.conf nta -l 1d nta2.example 2>&1 | grep "Negative trust anchor added" > /dev/null || ret=1
|
$RNDC -s 10.53.0.4 -p 9956 -c ns4/key6.conf nta -l 1d nta2.example 2>&1 | grep "Negative trust anchor added" > /dev/null || ret=1
|
||||||
@ -389,7 +421,8 @@ status=`expr $status + $ret`
|
|||||||
|
|
||||||
for i in 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288
|
for i in 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288
|
||||||
do
|
do
|
||||||
echo "I:testing rndc buffer size limits (size=${i})"
|
n=`expr $n + 1`
|
||||||
|
echo "I:testing rndc buffer size limits (size=${i}) ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
$RNDC -s 10.53.0.4 -p 9956 -c ns4/key6.conf testgen ${i} 2>&1 > rndc.output || ret=1
|
$RNDC -s 10.53.0.4 -p 9956 -c ns4/key6.conf testgen ${i} 2>&1 > rndc.output || ret=1
|
||||||
actual_size=`./gencheck rndc.output`
|
actual_size=`./gencheck rndc.output`
|
||||||
@ -404,21 +437,24 @@ do
|
|||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "I:testing rndc -r (show result)"
|
n=`expr $n + 1`
|
||||||
|
echo "I:testing rndc -r (show result) ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
$RNDC -s 10.53.0.4 -p 9956 -c ns4/key6.conf -r testgen 0 2>&1 > rndc.output || ret=1
|
$RNDC -s 10.53.0.4 -p 9956 -c ns4/key6.conf -r testgen 0 2>&1 > rndc.output || ret=1
|
||||||
grep "ISC_R_SUCCESS 0" rndc.output > /dev/null || ret=1
|
grep "ISC_R_SUCCESS 0" rndc.output > /dev/null || ret=1
|
||||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo "I:testing rndc with a token containing a space"
|
n=`expr $n + 1`
|
||||||
|
echo "I:testing rndc with a token containing a space ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
$RNDC -s 10.53.0.4 -p 9956 -c ns4/key6.conf -r flush '"view with a space"' 2>&1 > rndc.output || ret=1
|
$RNDC -s 10.53.0.4 -p 9956 -c ns4/key6.conf -r flush '"view with a space"' 2>&1 > rndc.output || ret=1
|
||||||
grep "not found" rndc.output > /dev/null && ret=1
|
grep "not found" rndc.output > /dev/null && ret=1
|
||||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo "I:test 'rndc reconfig' with a broken config"
|
n=`expr $n + 1`
|
||||||
|
echo "I:test 'rndc reconfig' with a broken config ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
$RNDC -s 10.53.0.4 -p 9956 -c ns4/key6.conf reconfig > /dev/null || ret=1
|
$RNDC -s 10.53.0.4 -p 9956 -c ns4/key6.conf reconfig > /dev/null || ret=1
|
||||||
sleep 1
|
sleep 1
|
||||||
@ -433,7 +469,8 @@ sleep 1
|
|||||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo "I:test read-only control channel access"
|
n=`expr $n + 1`
|
||||||
|
echo "I:test read-only control channel access ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
$RNDC -s 10.53.0.5 -p 9953 -c ../common/rndc.conf status > /dev/null 2>&1 || ret=1
|
$RNDC -s 10.53.0.5 -p 9953 -c ../common/rndc.conf status > /dev/null 2>&1 || ret=1
|
||||||
$RNDC -s 10.53.0.5 -p 9953 -c ../common/rndc.conf nta -dump > /dev/null 2>&1 || ret=1
|
$RNDC -s 10.53.0.5 -p 9953 -c ../common/rndc.conf nta -dump > /dev/null 2>&1 || ret=1
|
||||||
@ -441,14 +478,16 @@ $RNDC -s 10.53.0.5 -p 9953 -c ../common/rndc.conf reconfig > /dev/null 2>&1 && r
|
|||||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo "I:test rndc status shows running on"
|
n=`expr $n + 1`
|
||||||
|
echo "I:test rndc status shows running on ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
$RNDC -s 10.53.0.5 -p 9953 -c ../common/rndc.conf status > rndc.output /dev/null 2>&1 || ret=1
|
$RNDC -s 10.53.0.5 -p 9953 -c ../common/rndc.conf status > rndc.output /dev/null 2>&1 || ret=1
|
||||||
grep "^running on " rndc.output > /dev/null || ret=1
|
grep "^running on " rndc.output > /dev/null || ret=1
|
||||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo "I:test 'rndc reconfig' with loading of a large zone"
|
n=`expr $n + 1`
|
||||||
|
echo "I:test 'rndc reconfig' with loading of a large zone ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
cur=`awk 'BEGIN {l=0} /^/ {l++} END { print l }' ns6/named.run`
|
cur=`awk 'BEGIN {l=0} /^/ {l++} END { print l }' ns6/named.run`
|
||||||
cp ns6/named.conf ns6/named.conf.save
|
cp ns6/named.conf ns6/named.conf.save
|
||||||
@ -458,18 +497,21 @@ $RNDC -s 10.53.0.6 -p 9953 -c ../common/rndc.conf reconfig > rndc.output 2>&1 ||
|
|||||||
if [ $ret != 0 ]; then echo " I:failed"; fi
|
if [ $ret != 0 ]; then echo " I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
sleep 1
|
sleep 1
|
||||||
echo " I:check if zone load was scheduled"
|
n=`expr $n + 1`
|
||||||
|
echo " I:check if zone load was scheduled ($n)"
|
||||||
grep "scheduled loading new zones" ns6/named.run > /dev/null || ret=1
|
grep "scheduled loading new zones" ns6/named.run > /dev/null || ret=1
|
||||||
if [ $ret != 0 ]; then echo " I:failed"; fi
|
if [ $ret != 0 ]; then echo " I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo " I:check if query for the zone returns SERVFAIL"
|
n=`expr $n + 1`
|
||||||
|
echo " I:check if query for the zone returns SERVFAIL ($n)"
|
||||||
$DIG @10.53.0.6 -p 5300 -t soa huge.zone > dig.out
|
$DIG @10.53.0.6 -p 5300 -t soa huge.zone > dig.out
|
||||||
grep "SERVFAIL" dig.out > /dev/null || ret=1
|
grep "SERVFAIL" dig.out > /dev/null || ret=1
|
||||||
if [ $ret != 0 ]; then echo " I:failed"; fi
|
if [ $ret != 0 ]; then echo " I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo " I:wait for the zones to be loaded"
|
n=`expr $n + 1`
|
||||||
|
echo " I:wait for the zones to be loaded ($n)"
|
||||||
ret=1
|
ret=1
|
||||||
try=0
|
try=0
|
||||||
while test $try -lt 45
|
while test $try -lt 45
|
||||||
@ -484,7 +526,8 @@ done
|
|||||||
if [ $ret != 0 ]; then echo " I:failed"; fi
|
if [ $ret != 0 ]; then echo " I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
echo " I:check if query for the zone returns NOERROR"
|
n=`expr $n + 1`
|
||||||
|
echo " I:check if query for the zone returns NOERROR ($n)"
|
||||||
$DIG @10.53.0.6 -p 5300 -t soa huge.zone > dig.out
|
$DIG @10.53.0.6 -p 5300 -t soa huge.zone > dig.out
|
||||||
grep "NOERROR" dig.out > /dev/null || ret=1
|
grep "NOERROR" dig.out > /dev/null || ret=1
|
||||||
if [ $ret != 0 ]; then echo " I:failed"; fi
|
if [ $ret != 0 ]; then echo " I:failed"; fi
|
||||||
@ -498,7 +541,8 @@ if [ $ret != 0 ]; then echo "I:failed"; fi
|
|||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
if [ -x "$PYTHON" ]; then
|
if [ -x "$PYTHON" ]; then
|
||||||
echo "I:test rndc python bindings"
|
n=`expr $n + 1`
|
||||||
|
echo "I:test rndc python bindings ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
$PYTHON > rndc.output << EOF
|
$PYTHON > rndc.output << EOF
|
||||||
import sys
|
import sys
|
||||||
|
Loading…
x
Reference in New Issue
Block a user