mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
use test specific shell variables
This commit is contained in:
@@ -470,19 +470,19 @@ n=`expr $n + 1`
|
|||||||
echo_i "check prefetch of validated DS's RRSIG TTL is updated (${n})"
|
echo_i "check prefetch of validated DS's RRSIG TTL is updated (${n})"
|
||||||
ret=0
|
ret=0
|
||||||
$DIG $DIGOPTS +dnssec @10.53.0.5 ds.example.net ds > dig.out.1.${n} || ret=1
|
$DIG $DIGOPTS +dnssec @10.53.0.5 ds.example.net ds > dig.out.1.${n} || ret=1
|
||||||
ttl1=`awk '$4 == "DS" && $7 == "2" { print $2 - 2 }' dig.out.1.${n}`
|
dsttl1=`awk '$4 == "DS" && $7 == "2" { print $2 - 2 }' dig.out.1.${n}`
|
||||||
# sleep so we are in prefetch range
|
# sleep so we are in prefetch range
|
||||||
sleep ${ttl1:-0}
|
sleep ${dsttl1:-0}
|
||||||
# trigger prefetch
|
# trigger prefetch
|
||||||
$DIG $DIGOPTS @10.53.0.5 ds.example.net ds > dig.out.2.${n} || ret=1
|
$DIG $DIGOPTS @10.53.0.5 ds.example.net ds > dig.out.2.${n} || ret=1
|
||||||
ttl1=`awk '$4 == "DS" && $7 == "2" { print $2 }' dig.out.2.${n}`
|
dsttl2=`awk '$4 == "DS" && $7 == "2" { print $2 }' dig.out.2.${n}`
|
||||||
sleep 1
|
sleep 1
|
||||||
# check that prefetch occured
|
# check that prefetch occured
|
||||||
$DIG $DIGOPTS @10.53.0.5 ds.example.net ds +dnssec > dig.out.3.${n} || ret=1
|
$DIG $DIGOPTS @10.53.0.5 ds.example.net ds +dnssec > dig.out.3.${n} || ret=1
|
||||||
dsttl=`awk '$4 == "DS" && $7 == "2" { print $2 }' dig.out.3.${n}`
|
dsttl=`awk '$4 == "DS" && $7 == "2" { print $2 }' dig.out.3.${n}`
|
||||||
sigttl=`awk '$4 == "RRSIG" && $5 == "DS" { print $2 }' dig.out.3.${n}`
|
sigttl=`awk '$4 == "RRSIG" && $5 == "DS" { print $2 }' dig.out.3.${n}`
|
||||||
test ${dsttl:-0} -gt ${ttl2:-1} || ret=1
|
test ${dsttl:-0} -gt ${dsttl2:-1} || ret=1
|
||||||
test ${sigttl:-0} -gt ${ttl2:-1} || ret=1
|
test ${sigttl:-0} -gt ${dsttl2:-1} || ret=1
|
||||||
test ${dsttl:-0} -eq ${sigttl:-1} || ret=1
|
test ${dsttl:-0} -eq ${sigttl:-1} || ret=1
|
||||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
Reference in New Issue
Block a user