mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-26 12:38:57 -04:00
Improve the way cache contents are searched for "ns.flushtest.example"
During the "check flushtree clears adb correctly" check, expecting "ns.flushtest.example" to always be the first name in the ADB dump is fragile, because in a certain corner case "a.root-servers.nil" will be the first name instead. As the purpose of the relevant check is to ensure "ns.flushtest.example" is removed from ADB by "rndc flushtree flushtest.example", search the entire list of names present in ADB instead of just the first entry when looking for "ns.flushtest.example".
This commit is contained in:
parent
2bbff06d36
commit
ca1049b2f3
1 changed files with 2 additions and 2 deletions
|
|
@ -221,11 +221,11 @@ ret=0
|
|||
load_cache
|
||||
dump_cache
|
||||
mv ns2/named_dump.db.$n ns2/named_dump.db.$n.a
|
||||
awk '/plain success\/timeout/ {getline; getline; if ($2 == "ns.flushtest.example") exit(0); exit(1); }' ns2/named_dump.db.$n.a || ret=1
|
||||
sed -n '/plain success\/timeout/,/Unassociated entries/p' ns2/named_dump.db.$n.a | grep 'ns.flushtest.example' > /dev/null 2>&1 || ret=1
|
||||
$RNDC $RNDCOPTS flushtree flushtest.example || ret=1
|
||||
dump_cache
|
||||
mv ns2/named_dump.db.$n ns2/named_dump.db.$n.b
|
||||
awk '/plain success\/timeout/ {getline; getline; if ($2 == "ns.flushtest.example") exit(1); exit(0); }' ns2/named_dump.db.$n.b || ret=1
|
||||
sed -n '/plain success\/timeout/,/Unassociated entries/p' ns2/named_dump.db.$n.b | grep 'ns.flushtest.example' > /dev/null 2>&1 && ret=1
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue