[master] "rndc flushtree -all <name>"
3606. [func] "rndc flushtree -all" flushes matching records in the ADB and bad cache as well as the DNS cache. (Without the "-all" option, flushtree will still only flush records from the DNS cache.) [RT #33970]
This commit is contained in:
@@ -65,7 +65,7 @@ EOF
|
||||
|
||||
dump_cache () {
|
||||
rm -f ns2/named_dump.db
|
||||
$RNDC $RNDCOPTS dumpdb -cache
|
||||
$RNDC $RNDCOPTS dumpdb -cache _default
|
||||
sleep 1
|
||||
}
|
||||
|
||||
@@ -185,5 +185,16 @@ nrecords=`grep flushtest.example ns2/named_dump.db | grep -v '^;' | grep -Ew '(T
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo "I:check flushtree -all clears adb correctly"
|
||||
ret=0
|
||||
load_cache
|
||||
dump_cache
|
||||
awk '/Address database/ {getline; getline; if ($2 == "ns.flushtest.example") exit(0); exit(1); }' ns2/named_dump.db || ret=1
|
||||
$RNDC $RNDCOPTS flushtree -all flushtest.example || ret=1
|
||||
dump_cache
|
||||
awk '/Address database/ {getline; getline; if ($2 == "ns.flushtest.example") exit(1); exit(0); }' ns2/named_dump.db || ret=1
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo "I:exit status: $status"
|
||||
exit $status
|
||||
|
||||
Reference in New Issue
Block a user