]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Test for the hard fetchlimit instead of soft fetchlimit
authorOndřej Surý <ondrej@isc.org>
Wed, 4 Dec 2019 23:02:43 +0000 (00:02 +0100)
committerOndřej Surý <ondrej@isc.org>
Thu, 5 Dec 2019 15:33:12 +0000 (16:33 +0100)
Previously, the fetchlimit tested the recursive-clients soft limit
that's defined as 90% of the hard limit (the actual configured value).
This worked previously because the reaping of the oldest recursive
client was put on the same event queue as the current TCP client, thus
the cleaning has happened before the new TCP client established a new
connection.

With the change in BIND 9.14 that added a multiple event queues the
cleaning of the oldests clients is no longer synchronous and could
happen stochastically making the soft limit testing fail often.  The
situation became even worse with the new networking manager, thus we
change the system test to fail only if the hard limit bound is not
honored.

Changing the accounting of the already reaped TCP clients so the soft
limit testing is possible again is out of the scope for this change.

bin/tests/system/fetchlimit/tests.sh

index 3065060d06f83cb48bd10712221948533d4fa672..6d928eebc4efcfd026e16d843439668a96e3811d 100644 (file)
@@ -154,7 +154,7 @@ status=`expr $status + $ret`
 copy_setports ns3/named3.conf.in ns3/named.conf
 rndc_reconfig ns3 10.53.0.3
 
-echo_i "checking lame server clients are dropped near the soft limit"
+echo_i "checking lame server clients are dropped below the hard limit"
 ret=0
 fail=0
 exceeded=0
@@ -163,7 +163,7 @@ touch ans4/norespond
 for try in 1 2 3 4 5; do
     burst b $try 400
     $DIGCMD a ${try}.example > dig.out.ns3.$try
-    stat 380 || exceeded=`expr $exceeded + 1`
+    stat 400 || exceeded=`expr $exceeded + 1`
     grep "status: NOERROR" dig.out.ns3.$try > /dev/null 2>&1 && \
             success=`expr $success + 1`
     grep "status: SERVFAIL" dig.out.ns3.$try > /dev/null 2>&1 && \
@@ -174,7 +174,7 @@ echo_i "$success successful valid queries (expected 5)"
 [ "$success" -eq 5 ] || { echo_i "failed"; ret=1; }
 echo_i "$fail SERVFAIL responses (expected 0)"
 [ "$fail" -eq 0 ] || { echo_i "failed"; ret=1; }
-echo_i "clients count exceeded 380 on $exceeded trials (expected 0)"
+echo_i "clients count exceeded 400 on $exceeded trials (expected 0)"
 [ "$exceeded" -eq 0 ] || { echo_i "failed"; ret=1; }
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`