mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00: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:
@@ -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`
|
||||
|
||||
|
Reference in New Issue
Block a user