From 7dab4b60cce8295b5447b1ffba0935e729a1659a Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Mon, 28 Sep 2026 09:49:10 -0700 Subject: [PATCH] make: skip oversized synctest stress test on macOS The threads scheduler uses an OS thread per goroutine. This test can run 10,000 goroutines at once, above the macOS per-process thread limit, so it fails intermittently under load. Keep it enabled on other platforms. --- make/test.mk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/make/test.mk b/make/test.mk index 312d78022f..c9df82b492 100644 --- a/make/test.mk +++ b/make/test.mk @@ -223,6 +223,12 @@ TEST_PACKAGES_ALLOCS_HOST := $(filter slices strings,$(TEST_PACKAGES_HOST)) TEST_ALLOCS_SKIP_FLAG := -skip='^(TestBuilderAllocs|TestBuilderGrow|TestGrow)$$' TEST_PACKAGES_NETIP_HOST := $(filter net/netip,$(TEST_PACKAGES_HOST)) +# https://go.dev/src/internal/synctest/synctest_test.go creates 100 x 100 +# goroutines, which can exceed macOS's thread limit with the threads scheduler. +ifeq ($(uname),Darwin) +TEST_SYNCTEST_THREAD_LIMIT_SKIP := |TestWaitGroupManyBubbles +endif + # Test known-working standard library packages. # TODO: parallelize, and only show failing tests (no implied -v flag). .PHONY: tinygo-test @@ -243,7 +249,7 @@ endif ifneq ($(TEST_PACKAGES_NETIP_HOST),) $(TINYGO) test $(TEST_ADDITIONAL_FLAGS) -skip='^TestAddrStringAllocs$$' $(TEST_PACKAGES_NETIP_HOST) endif - $(TINYGO) test $(TEST_ADDITIONAL_FLAGS) -skip='^(TestReflectFuncOf|TestChannelMovedOutOfBubble|TestTimerFromInsideBubble|TestWaitGroupMovedIntoBubble|TestWaitGroupMovedOutOfBubble|TestWaitGroupMovedBetweenBubblesWithNonZeroCount)$$' internal/synctest + $(TINYGO) test $(TEST_ADDITIONAL_FLAGS) -skip='^(TestReflectFuncOf|TestChannelMovedOutOfBubble|TestTimerFromInsideBubble|TestWaitGroupMovedIntoBubble|TestWaitGroupMovedOutOfBubble|TestWaitGroupMovedBetweenBubblesWithNonZeroCount$(TEST_SYNCTEST_THREAD_LIMIT_SKIP))$$' internal/synctest $(TINYGO) test $(TEST_ADDITIONAL_FLAGS) -skip='^(TestFatal|TestError|TestVerboseError|TestSkip|TestVerboseSkip|TestHelper|TestHTTPTransport100Continue)$$' testing/synctest $(TINYGO) test $(TEST_ADDITIONAL_FLAGS) -run='^TestSynctestMarshal$$' encoding/json ifeq ($(TEST_ENCODING_XML),true)