4341. [bug] 'rndc flushtree' could fail to clean the tree if there

wasn't a node at the specified name. [RT #41846]
This commit is contained in:
Mark Andrews
2016-03-24 11:31:25 +11:00
parent a63461cc4b
commit 6214c3c93a
6 changed files with 31 additions and 19 deletions

View File

@@ -190,6 +190,22 @@ nrecords=`grep flushtest.example ns2/named_dump.db | grep -v '^;' | egrep '(TXT|
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I:check the check that flushname of a partial match works."
ret=0
in_cache txt second2.top1.flushtest.example || ret=1
$RNDC $RNDCOPTS flushtree example
in_cache txt second2.top1.flushtest.example && ret=1
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I:check the number of cached records remaining"
ret=0
dump_cache
nrecords=`grep flushtest.example ns2/named_dump.db | grep -v '^;' | egrep '(TXT|ANY)' | wc -l`
[ $nrecords -eq 1 ] || { ret=1; echo "I: found $nrecords records expected 1"; }
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I:check flushtree clears adb correctly"
ret=0
load_cache