From: Evan Hunt Date: Fri, 22 Nov 2019 20:27:23 +0000 (-0800) Subject: improve system tests X-Git-Tag: v9.15.7~75^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d484b66ae1355a20b1daf461989e26dac54b3124;p=thirdparty%2Fbind9.git improve system tests - increase prefetch test timing tolerance. - remove five-second pause and explicit connection closing in tcp test as they are no longer necessary. --- diff --git a/bin/tests/system/resolver/ns5/named.conf.in b/bin/tests/system/resolver/ns5/named.conf.in index b1d431e7038..a98290903b0 100644 --- a/bin/tests/system/resolver/ns5/named.conf.in +++ b/bin/tests/system/resolver/ns5/named.conf.in @@ -22,6 +22,7 @@ options { recursion yes; dnssec-validation yes; querylog yes; + prefetch 3 9; }; server 10.53.0.7 { diff --git a/bin/tests/system/resolver/tests.sh b/bin/tests/system/resolver/tests.sh index b9e5180f25b..11a359be4d4 100755 --- a/bin/tests/system/resolver/tests.sh +++ b/bin/tests/system/resolver/tests.sh @@ -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 diff --git a/bin/tests/system/tcp/tests.sh b/bin/tests/system/tcp/tests.sh index 2190ec5f40c..83191c2193e 100644 --- a/bin/tests/system/tcp/tests.sh +++ b/bin/tests/system/tcp/tests.sh @@ -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