From 43824ccb337201225226cb879d00693daf9b116c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 20 Jul 2026 00:24:17 +0200 Subject: [PATCH] Don't use separate timeout for sanitizer builds in IPC tests Keep the code simpler, we shouldn't need to wait for 2 minutes anyhow. --- tests/net/ipc.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/tests/net/ipc.cpp b/tests/net/ipc.cpp index 836ee92949..26c16dd4ac 100644 --- a/tests/net/ipc.cpp +++ b/tests/net/ipc.cpp @@ -459,15 +459,6 @@ private: // connect attempt is time-bounded (wxIPCTimeout, see wxTCPClient::MakeConnection) // so a not-yet-ready server fails the attempt promptly and the readiness poll // below retries, rather than blocking on the socket's long default timeout.) -// The re-exec'd server process is much slower to become ready under -// sanitizers (instrumented startup plus full toolkit init), so use a longer -// readiness bound there to avoid a spurious REQUIRE(serverReady) failure. -#if defined(__SANITIZE_ADDRESS__) || defined(__SANITIZE_THREAD__) || \ - WX_HAS_CLANG_FEATURE(address_sanitizer) || WX_HAS_CLANG_FEATURE(thread_sanitizer) -static constexpr int gs_serverReadyTimeoutMs = 120000; -#else -static constexpr int gs_serverReadyTimeoutMs = 30000; -#endif class IPCFixture { @@ -536,7 +527,10 @@ public: // not-yet-ready server fails promptly and we retry rather than blocking. bool serverReady = false; wxStopWatch sw; - while ( !serverReady && sw.Time() < gs_serverReadyTimeoutMs ) + + // Make the timeout big enough to give the server the time to start up + // even when sanitizers are enabled (which makes startup much slower). + while ( !serverReady && sw.Time() < 120000 ) { if ( gs_client->Connect("localhost", IPC_TEST_PORT, IPC_TEST_TOPIC) ) {