]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Accept a clients-per-query spill range in the fetchlimit test
authorMichal Nowak <mnowak@isc.org>
Wed, 10 Jun 2026 17:22:50 +0000 (17:22 +0000)
committerMichal Nowak <mnowak@isc.org>
Wed, 10 Jun 2026 17:28:19 +0000 (17:28 +0000)
The clients-per-query spill steps required exactly 55 spills, but the
auto-tuning ramp-up lags under load and spills more.  Accept the 55..75
range; the ramp-up is already verified by the "clients-per-query
increased to 10" log wait.

Assisted-by: Claude:claude-opus-4-7
bin/tests/system/fetchlimit/tests.sh

index f994406249d98e8688d66f698bf187904e780a58..073f932a32e8fcfe21ba99aa3b4ad7d55d0bdd69 100644 (file)
@@ -309,12 +309,16 @@ zspill=$(grep 'spilled due to clients per query' ns5/named.stats | sed 's/ *\([0
 # ns5 configuration:
 #   clients-per-query 5
 #   max-clients-per-query 10
-# expected spills:
-#   15 (out of 20) spilled for the first burst, and 10 (out of 20) spilled for
-#   the next 4 bursts (because of auto-tuning): 15 + (4 * 10) == 55
+# Each burst of 20 spills (20 - clients-per-query): 15 for the first burst
+# (clients-per-query starts at 5) and 10..15 for the next 4 as auto-tuning
+# ramps it to 10, giving 55 (fast ramp) to 75 (no ramp).  The ramp is verified
+# above, so accept the range rather than an exact count.
 expected=55
-[ "$zspill" -eq "$expected" ] || ret=1
-echo_i "$zspill clients spilled (expected $expected)"
+expected_max=75
+echo_i "$zspill clients spilled (expected ${expected}..${expected_max})"
+if [ "$zspill" -lt "$expected" ] || [ "$zspill" -gt "$expected_max" ]; then
+  ret=1
+fi
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=$((status + ret))
 
@@ -352,12 +356,16 @@ zspill=$(grep 'spilled due to clients per query' ns5/named.stats | sed 's/ *\([0
 # ns5 configuration:
 #   clients-per-query 5
 #   max-clients-per-query 10
-# expected spills:
-#   15 (out of 20) spilled for the first burst, and 10 (out of 20) spilled for
-#   the next 4 bursts (because of auto-tuning): 15 + (4 * 10) == 55
+# Each burst of 20 spills (20 - clients-per-query): 15 for the first burst
+# (clients-per-query starts at 5) and 10..15 for the next 4 as auto-tuning
+# ramps it to 10, giving 55 (fast ramp) to 75 (no ramp).  The ramp is verified
+# above, so accept the range rather than an exact count.
 expected=55
-[ "$zspill" -eq "$expected" ] || ret=1
-echo_i "$zspill clients spilled (expected $expected)"
+expected_max=75
+echo_i "$zspill clients spilled (expected ${expected}..${expected_max})"
+if [ "$zspill" -lt "$expected" ] || [ "$zspill" -gt "$expected_max" ]; then
+  ret=1
+fi
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=$((status + ret))