From cb76b3729e082f6c1ac0fbf608cee9bcb879cefa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Wed, 14 May 2025 09:50:33 +0200 Subject: [PATCH] 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. --- bin/tests/system/timeouts/tests_tcp_timeouts.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/tests/system/timeouts/tests_tcp_timeouts.py b/bin/tests/system/timeouts/tests_tcp_timeouts.py index cdee7a2e70..1750715ce0 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