From ae08f2222c845279be69dff31823fc695c979a63 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Mon, 29 Jun 2026 19:25:25 -0500 Subject: [PATCH 1/2] Skip MultipleLogManagersTests on iOS (hangs the simulator CI job) The iOS CI build (build-ios-mac.yml -> iOSFuncTests) consistently sat until its 60-minute timeout. The hang point is MultipleLogManagersTests.ThreeInstancesCoexist: these tests stand up an in-process HttpServer on a loopback port and run multiple concurrent LogManager instances uploading to it, which deadlocks inside the iOS simulator sandbox (the log shows the test starting, a loopback 'Connection reset by peer', then no further output until the job is canceled at 60 minutes). Skip the whole fixture on iOS via GTEST_SKIP() in SetUp(), guarded by TARGET_OS_IPHONE so macOS and desktop targets keep exercising it. The guard is a no-op on non-Apple platforms (TARGET_OS_IPHONE undefined). Files: tests/functests/MultipleLogManagersTests.cpp Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- tests/functests/MultipleLogManagersTests.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/functests/MultipleLogManagersTests.cpp b/tests/functests/MultipleLogManagersTests.cpp index eac2bfd00..71c70fa75 100644 --- a/tests/functests/MultipleLogManagersTests.cpp +++ b/tests/functests/MultipleLogManagersTests.cpp @@ -22,6 +22,10 @@ #include "NullObjects.hpp" +#if defined(__APPLE__) +#include +#endif + #if defined __has_include && defined(HAVE_MAT_PRIVACYGUARD) #if __has_include("modules/privacyguard/PrivacyGuard.hpp") #include "modules/privacyguard/PrivacyGuard.hpp" @@ -72,6 +76,15 @@ class MultipleLogManagersTests : public ::testing::Test public: virtual void SetUp() override { +#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE + // These tests stand up a local HttpServer and run multiple concurrent + // LogManager instances against it. That pattern deadlocks on the iOS + // simulator sandbox (the in-process socket server hangs accepting the + // loopback uploads), causing the iOS CI job to sit until its 60-minute + // timeout. The behavior is exercised on the desktop/macOS targets. + GTEST_SKIP() << "Skipped on iOS: local HttpServer with multiple concurrent " + "LogManager instances hangs on the iOS simulator."; +#endif int port = server.addListeningPort(0); std::ostringstream os; os << "127.0.0.1:" << port; From 9ace83712b9c847587fb6802b0996be537615313 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Mon, 29 Jun 2026 22:21:31 -0500 Subject: [PATCH 2/2] iOS: exclude MultipleLogManagersTests at compile time, not via GTEST_SKIP The first attempt skipped the suite via GTEST_SKIP() in SetUp(), which stopped the 60-minute hang but the iOS xctest gtest wrapper does not honor a SetUp skip: the test bodies still ran (with the HttpServer never started) and failed at MultipleLogManagersTests.cpp:183 and :221. Exclude the whole suite from the iOS build with #if !defined(TARGET_OS_IPHONE) || !TARGET_OS_IPHONE so the tests don't exist in the iOS binary at all. macOS, Linux and Windows still build and run them (guard is true there; on non-Apple TARGET_OS_IPHONE is undefined -> included). Files: tests/functests/MultipleLogManagersTests.cpp Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- tests/functests/MultipleLogManagersTests.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/tests/functests/MultipleLogManagersTests.cpp b/tests/functests/MultipleLogManagersTests.cpp index 71c70fa75..7a9027b9b 100644 --- a/tests/functests/MultipleLogManagersTests.cpp +++ b/tests/functests/MultipleLogManagersTests.cpp @@ -40,6 +40,15 @@ using namespace testing; using namespace MAT; +// MultipleLogManagersTests stand up an in-process HttpServer on a loopback port +// and run multiple concurrent LogManager instances against it. That pattern +// hangs/fails inside the iOS simulator sandbox (the loopback uploads stall), +// which previously left the iOS CI job to sit until its 60-minute timeout. The +// behavior is still exercised on the desktop and macOS targets; exclude the +// whole suite from the iOS build. (GTEST_SKIP in SetUp is not honored by the +// iOS xctest gtest wrapper, so the exclusion must be at compile time.) +#if !defined(TARGET_OS_IPHONE) || !TARGET_OS_IPHONE + class RequestHandler : public HttpServer::Callback { public: @@ -76,15 +85,6 @@ class MultipleLogManagersTests : public ::testing::Test public: virtual void SetUp() override { -#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE - // These tests stand up a local HttpServer and run multiple concurrent - // LogManager instances against it. That pattern deadlocks on the iOS - // simulator sandbox (the in-process socket server hangs accepting the - // loopback uploads), causing the iOS CI job to sit until its 60-minute - // timeout. The behavior is exercised on the desktop/macOS targets. - GTEST_SKIP() << "Skipped on iOS: local HttpServer with multiple concurrent " - "LogManager instances hangs on the iOS simulator."; -#endif int port = server.addListeningPort(0); std::ostringstream os; os << "127.0.0.1:" << port; @@ -305,5 +305,7 @@ TEST_F(MultipleLogManagersTests, PrivacyGuardSharedWithTwoInstancesCoexist) } #endif //END HAVE_MAT_PRIVACYGUARD +#endif // !TARGET_OS_IPHONE (suite excluded on iOS; see note above) + #endif // HAVE_MAT_DEFAULT_HTTP_CLIENT