]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Disable rrl check in slow environments
authorTom Krizek <tkrizek@isc.org>
Wed, 24 May 2023 11:58:01 +0000 (13:58 +0200)
committerTom Krizek <tkrizek@isc.org>
Fri, 26 May 2023 10:25:36 +0000 (12:25 +0200)
The check for 'would limit' log message is triggered by sending at least
three messages within one second. However, in extremely slow conditions
(currently when running with clang+TSAN in CI), the individual queries
might take too much time to send enough of them within one second.

Since this is a pretty rare condition, let's just silently skip this
test in environments where a single query takes more than 500 ms, since
there's no way to perform the check under such conditions.

Closes #4082

.gitlab-ci.yml
bin/tests/system/rrl/tests.sh

index 70f8d2227ffdb44101517203e96f642d0f7708ec..c29b8c8315e93abcf2a6662375ef81ac9e33c8fb 100644 (file)
@@ -1128,7 +1128,7 @@ system:clang:tsan:
   needs:
     - job: clang:tsan
       artifacts: true
-  allow_failure: true  # rrl (GL#4082), upforwd (GL#4072)
+  allow_failure: true  # upforwd (GL#4072), rpz, serve-stale, ... (GL#4081)
 
 unit:clang:tsan:
   variables:
index 897eed92252753bb2ba7bd2d72891c8eeb2375e5..2069a4246f3f434c2cf6d41d4ffaf5d7e82d0792 100644 (file)
@@ -252,29 +252,29 @@ $RNDCCMD $ns2 stats
 ckstats final dropped 56
 ckstats final truncated 23
 
+
 #########
 sec_start
 
+# check that "would limit" is emitted for "log-only yes;"
 DIGOPTS="+nocookie +nosearch +time=1 +tries=1 +ignore -p ${PORT}"
-$DIG $DIGOPTS @$ns4 A a7.tld4 > /dev/null 2>&1
-$DIG $DIGOPTS @$ns4 A a7.tld4 > /dev/null 2>&1
-$DIG $DIGOPTS @$ns4 A a7.tld4 > /dev/null 2>&1
-$DIG $DIGOPTS @$ns4 A a7.tld4 > /dev/null 2>&1
-$DIG $DIGOPTS @$ns4 A a7.tld4 > /dev/null 2>&1
-$DIG $DIGOPTS @$ns4 A a7.tld4 > /dev/null 2>&1
-$DIG $DIGOPTS @$ns4 A a7.tld4 > /dev/null 2>&1
-$DIG $DIGOPTS @$ns4 A a7.tld4 > /dev/null 2>&1
-$DIG $DIGOPTS @$ns4 A a7.tld4 > /dev/null 2>&1
-$DIG $DIGOPTS @$ns4 A a7.tld4 > /dev/null 2>&1
-$DIG $DIGOPTS @$ns4 A a7.tld4 > /dev/null 2>&1
+$DIG $DIGOPTS @$ns4 A a7.tld4 > dig.out.a7.tld 2> /dev/null
+# skip this check if query takes over 500ms
+if grep -E ';; Query time: [1-4]?[0-9]?[0-9] msec' dig.out.a7.tld > /dev/null 2>&1; then
+    for i in 1 2 3 4 5; do
+        $DIG $DIGOPTS @$ns4 A a7.tld4 > /dev/null 2>&1 &
+    done
+    wait
+    grep "would limit" ns4/named.run > /dev/null 2>&1 || setret "\"would limit\" not found in log file."
+fi
+
 
 # regression test for GL #2839
 DIGOPTS="+bufsize=4096 +ignore -p ${PORT}"
 $DIG $DIGOPTS @$ns4 TXT big.tld4 > /dev/null 2>&1
 
-grep "would limit" ns4/named.run >/dev/null 2>&1 ||
-setret "\"would limit\" not found in log file."
 
+# check named doesn't start with a broken config
 $NAMED -D rrl-ns5 -gc broken.conf > broken.out 2>&1 &
 sleep 2
 grep "min-table-size 1" broken.out > /dev/null || setret "min-table-size 0 was not changed to 1"
@@ -284,5 +284,6 @@ if [ -f named.pid ]; then
     setret "named should not have started, but did"
 fi
 
+
 echo_i "exit status: $ret"
 [ $ret -eq 0 ] || exit 1