From 2af28c9d481f9da4f96283a5af9cb8879e566872 Mon Sep 17 00:00:00 2001 From: Martin Vogel Date: Thu, 23 Jul 2026 08:42:30 +0200 Subject: [PATCH] test: size the daemon-application wait budget for TSan's slowdown tail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The suite's observation waits shared a 2000 ms budget that is a hang detector, not a latency assertion — every waiter returns the moment its condition holds, so green runs never pay it. Under ThreadSanitizer's 5-20x slowdown on a loaded 3-core macOS CI runner the cancel-delivery wait lost the tail of that distribution once in seven otherwise-green TSan rounds (the cancel itself had succeeded; only the fake worker's counter observation timed out). The budget is now 10000 ms. Verified: nine consecutive daemon_application runs under native macOS TSan with the widened budget, all green, zero ThreadSanitizer warnings. Signed-off-by: Martin Vogel --- tests/test_daemon_application.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_daemon_application.c b/tests/test_daemon_application.c index 218ab13c3..167d5255f 100644 --- a/tests/test_daemon_application.c +++ b/tests/test_daemon_application.c @@ -27,7 +27,12 @@ #include #include -enum { APP_TEST_TIMEOUT_MS = 2000, APP_TEST_PATH_CAP = 1024 }; +/* Observation-wait budget. This is a HANG DETECTOR, not a latency + * assertion: every waiter returns the moment its condition holds, so green + * runs never pay it. It must absorb ThreadSanitizer's 5-20x slowdown on a + * loaded 3-core CI runner — at 2000 ms the cancel-delivery wait lost the + * tail of that distribution once in seven otherwise-green TSan rounds. */ +enum { APP_TEST_TIMEOUT_MS = 10000, APP_TEST_PATH_CAP = 1024 }; typedef struct { char runtime_parent[APP_TEST_PATH_CAP];