From f76fa8ad35efd4585dcbd5a2f8878bd6ed9828d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicki=20K=C5=99=C3=AD=C5=BEek?= Date: Thu, 29 Jan 2026 11:37:43 +0100 Subject: [PATCH 1/2] Improve logging for isctest.run.retry_with_timeout Add more debug messages around the retry function to facilitate debugging in case of issues. (cherry picked from commit d237048de2493cc3f801017c44ea53eaf39cd140) --- bin/tests/system/isctest/run.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/tests/system/isctest/run.py b/bin/tests/system/isctest/run.py index 9b6ef31236..65fd5ec8df 100644 --- a/bin/tests/system/isctest/run.py +++ b/bin/tests/system/isctest/run.py @@ -142,13 +142,17 @@ def perl(script: str, args: Optional[List[str]] = None) -> None: def retry_with_timeout(func, timeout, delay=1, msg=None): start_time = time.monotonic() exc_msg = None + fname = f"{func.__module__}.{func.__qualname__}()" while time.monotonic() < start_time + timeout: exc_msg = None + isctest.log.debug(f"retry_with_timeout: {fname} called") try: if func(): + isctest.log.debug(f"retry_with_timeout: {fname} succeeded") return except AssertionError as exc: exc_msg = str(exc) + isctest.log.debug(f"retry_with_timeout: {fname} failed, sleep {delay}s") time.sleep(delay) if exc_msg is not None: isctest.log.error(exc_msg) @@ -156,7 +160,7 @@ def retry_with_timeout(func, timeout, delay=1, msg=None): if exc_msg is not None: msg = exc_msg else: - msg = f"{func.__module__}.{func.__qualname__} timed out after {timeout} s" + msg = f"{fname} timed out after {timeout} s" assert False, msg From aeb051823976f779a6e3c72b9c99d8e176c3dd8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicki=20K=C5=99=C3=AD=C5=BEek?= Date: Thu, 29 Jan 2026 11:42:37 +0100 Subject: [PATCH 2/2] Allow re-run of kasp test case on all FreeBSDs Previously, the issue when the kasp.test_kasp_case[secondary.kasp] fails due to a timeout has been only ocassionally observed on FreeBSD 13 in our CI. It seems to have come back on FreeBSD 15. (cherry picked from commit e4abb5bd070c040320cc23126c5cd9e4c726c72c) --- bin/tests/system/isctest/mark.py | 4 ++++ bin/tests/system/kasp/tests_kasp.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/tests/system/isctest/mark.py b/bin/tests/system/isctest/mark.py index 805371701d..4d7fcce147 100644 --- a/bin/tests/system/isctest/mark.py +++ b/bin/tests/system/isctest/mark.py @@ -43,6 +43,10 @@ def is_dnsrps_available(): return True +def is_host_freebsd(*_): + return platform.system() == "FreeBSD" + + def is_host_freebsd_13(*_): return platform.system() == "FreeBSD" and platform.release().startswith("13") diff --git a/bin/tests/system/kasp/tests_kasp.py b/bin/tests/system/kasp/tests_kasp.py index 1a836a230d..89f2696e56 100644 --- a/bin/tests/system/kasp/tests_kasp.py +++ b/bin/tests/system/kasp/tests_kasp.py @@ -596,7 +596,7 @@ def cb_remove_keyfiles(params, ksks=None, zsks=None): }, id="secondary.kasp", marks=pytest.mark.flaky( - max_runs=2, rerun_filter=isctest.mark.is_host_freebsd_13 + max_runs=2, rerun_filter=isctest.mark.is_host_freebsd ), ), pytest.param(