mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Match UQ and UR stats to domain name
The upforwd test for forwarding updates to a dead primary can continue running a little bit past its end, causing update replies to be recorded during a subsequent test case. Correct this by only looking for update requests and replies for the specific domain name being tested at any given time.
This commit is contained in:
@@ -41,7 +41,9 @@ capture_dnstap() {
|
||||
}
|
||||
|
||||
uq_equals_ur() {
|
||||
zonename="$1"
|
||||
"$DNSTAPREAD" dnstap.out.$n |
|
||||
awk '$9 ~ /^'$zonename'\// { print }' |
|
||||
awk '$3 == "UQ" { UQ+=1 } $3 == "UR" { UR += 1 } END { print UQ+0, UR+0 }' > dnstapread.out$n
|
||||
read UQ UR < dnstapread.out$n
|
||||
echo_i "UQ=$UQ UR=$UR"
|
||||
@@ -185,7 +187,7 @@ then
|
||||
echo_i "checking DNSTAP logging of UPDATE forwarded update replies ($n)"
|
||||
ret=0
|
||||
capture_dnstap
|
||||
uq_equals_ur || ret=1
|
||||
uq_equals_ur example || ret=1
|
||||
if [ $ret != 0 ] ; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
n=`expr $n + 1`
|
||||
@@ -304,7 +306,7 @@ then
|
||||
echo_i "checking DNSTAP logging of UPDATE forwarded update replies ($n)"
|
||||
ret=0
|
||||
capture_dnstap
|
||||
uq_equals_ur || ret=1
|
||||
uq_equals_ur example3 || ret=1
|
||||
if [ $ret != 0 ] ; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
n=`expr $n + 1`
|
||||
@@ -342,7 +344,7 @@ then
|
||||
echo_i "checking DNSTAP logging of UPDATE forwarded update replies ($n)"
|
||||
ret=0
|
||||
capture_dnstap
|
||||
uq_equals_ur && ret=1
|
||||
uq_equals_ur noprimary && ret=1
|
||||
if [ $ret != 0 ] ; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
n=`expr $n + 1`
|
||||
@@ -377,7 +379,7 @@ EOF
|
||||
echo_i "checking DNSTAP logging of UPDATE forwarded update replies ($n)"
|
||||
ret=0
|
||||
capture_dnstap
|
||||
uq_equals_ur || ret=1
|
||||
uq_equals_ur example2 || ret=1
|
||||
if [ $ret != 0 ] ; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
n=`expr $n + 1`
|
||||
@@ -410,7 +412,7 @@ EOF
|
||||
echo_i "checking DNSTAP logging of UPDATE forwarded update replies ($n)"
|
||||
ret=0
|
||||
capture_dnstap
|
||||
uq_equals_ur || ret=1
|
||||
uq_equals_ur example2 || ret=1
|
||||
if [ $ret != 0 ] ; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
n=`expr $n + 1`
|
||||
|
Reference in New Issue
Block a user