]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
improve system tests
authorEvan Hunt <each@isc.org>
Fri, 22 Nov 2019 20:27:23 +0000 (12:27 -0800)
committerEvan Hunt <each@isc.org>
Sat, 23 Nov 2019 00:46:32 +0000 (16:46 -0800)
- increase prefetch test timing tolerance.
- remove five-second pause and explicit connection closing in tcp test
  as they are no longer necessary.

bin/tests/system/resolver/ns5/named.conf.in
bin/tests/system/resolver/tests.sh
bin/tests/system/tcp/tests.sh

index b1d431e703859c23219f6d4083645c31dcf7b990..a98290903b0c9695cef042a382c9d5f5c7a912cf 100644 (file)
@@ -22,6 +22,7 @@ options {
        recursion yes;
        dnssec-validation yes;
        querylog yes;
+       prefetch 3 9;
 };
 
 server 10.53.0.7 {
index b9e5180f25be7ba2f2b70b43c7f03a1e16ed4919..11a359be4d4a0bb0eb45c7bd0f5a1aa29f298388 100755 (executable)
@@ -452,7 +452,7 @@ n=`expr $n + 1`
 echo_i "check prefetch (${n})"
 ret=0
 $DIG $DIGOPTS @10.53.0.5 fetch.tld txt > dig.out.1.${n} || ret=1
-ttl1=`awk '/"A" "short" "ttl"/ { print $2 - 2 }' dig.out.1.${n}`
+ttl1=`awk '/"A" "short" "ttl"/ { print $2 - 3 }' dig.out.1.${n}`
 # sleep so we are in prefetch range
 sleep ${ttl1:-0}
 # trigger prefetch
@@ -470,7 +470,7 @@ n=`expr $n + 1`
 echo_i "check prefetch of validated DS's RRSIG TTL is updated (${n})"
 ret=0
 $DIG $DIGOPTS +dnssec @10.53.0.5 ds.example.net ds > dig.out.1.${n} || ret=1
-dsttl1=`awk '$4 == "DS" && $7 == "2" { print $2 - 2 }' dig.out.1.${n}`
+dsttl1=`awk '$4 == "DS" && $7 == "2" { print $2 - 3 }' dig.out.1.${n}`
 # sleep so we are in prefetch range
 sleep ${dsttl1:-0}
 # trigger prefetch
@@ -517,7 +517,7 @@ n=`expr $n + 1`
 echo_i "check prefetch qtype * (${n})"
 ret=0
 $DIG $DIGOPTS @10.53.0.5 fetchall.tld any > dig.out.1.${n} || ret=1
-ttl1=`awk '/"A" "short" "ttl"/ { print $2 - 2 }' dig.out.1.${n}`
+ttl1=`awk '/"A" "short" "ttl"/ { print $2 - 3 }' dig.out.1.${n}`
 # sleep so we are in prefetch range
 sleep ${ttl1:-0}
 # trigger prefetch
index 2190ec5f40cdcf5a9d6199c184371d5640092782..83191c2193e6a5192fa21ef22b2ed72901b1b852 100644 (file)
@@ -166,12 +166,8 @@ check_stats_limit() {
        assert_int_equal "${TCP_HIGH}" "${TCP_LIMIT}" "TCP high-water value" || return 1
 }
 retry 2 check_stats_limit || ret=1
-close_connections $((TCP_LIMIT + 1)) || :
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=$((status + ret))
 
-# wait for connections to close
-sleep 5
-
 echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1