From: Michał Kępień Date: Wed, 14 May 2025 07:50:33 +0000 (+0200) Subject: Mark test_idle_timeout as flaky on FreeBSD 13 X-Git-Tag: v9.18.38~40^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4646510fc9ad1d76849df8e542f4bc58f844891b;p=thirdparty%2Fbind9.git Mark test_idle_timeout as flaky on FreeBSD 13 The test_idle_timeout check in the "timeouts" system test has been failing often on FreeBSD 13 AWS hosts. Adding timestamped debug logging shows that the time.sleep() calls used in that check are returning significantly later than asked to on that platform (e.g. after 4 seconds when just 1 second is requested), breaking the test's timing assumptions and triggering false positives. These failures are not an indication of a bug in named and have not been observed on any other platform. Mark the problematic check as flaky, but only on FreeBSD 13, so that other failure modes are caught appropriately. (cherry picked from commit cb76b3729e082f6c1ac0fbf608cee9bcb879cefa) --- diff --git a/bin/tests/system/timeouts/tests_tcp_timeouts.py b/bin/tests/system/timeouts/tests_tcp_timeouts.py index cdee7a2e70a..1750715ce08 100644 --- a/bin/tests/system/timeouts/tests_tcp_timeouts.py +++ b/bin/tests/system/timeouts/tests_tcp_timeouts.py @@ -13,6 +13,7 @@ # pylint: disable=unused-variable +import platform import socket import time @@ -67,6 +68,11 @@ def test_initial_timeout(named_port): raise EOFError from e +def is_host_freebsd_13(*_): + return platform.system() == "FreeBSD" and platform.release().startswith("13") + + +@isctest.mark.flaky(max_runs=2, rerun_filter=is_host_freebsd_13) def test_idle_timeout(named_port): # # The idle timeout is 5 seconds, so the third message should fail