diff --git a/src/runtime/crash_cgo_test.go b/src/runtime/crash_cgo_test.go index 023c89350f..9754b5a4d4 100644 --- a/src/runtime/crash_cgo_test.go +++ b/src/runtime/crash_cgo_test.go @@ -713,7 +713,10 @@ func TestCgoTracebackGoroutineProfile(t *testing.T) { func TestCgoTraceParser(t *testing.T) { // Test issue 29707. - testenv.MustHaveCGO(t) + switch runtime.GOOS { + case "plan9", "windows": + t.Skipf("no pthreads on %s", runtime.GOOS) + } output := runTestProg(t, "testprogcgo", "CgoTraceParser") want := "OK\n" if output != want { @@ -723,7 +726,10 @@ func TestCgoTraceParser(t *testing.T) { func TestCgoTraceParserWithOneProc(t *testing.T) { // Test issue 29707. - testenv.MustHaveCGO(t) + switch runtime.GOOS { + case "plan9", "windows": + t.Skipf("no pthreads on %s", runtime.GOOS) + } output := runTestProg(t, "testprogcgo", "CgoTraceParser", "GOMAXPROCS=1") want := "OK\n" if output != want { diff --git a/src/runtime/testdata/testprogcgo/issue29707.go b/src/runtime/testdata/testprogcgo/issue29707.go index 5d3e65eee4..95964b111b 100644 --- a/src/runtime/testdata/testprogcgo/issue29707.go +++ b/src/runtime/testdata/testprogcgo/issue29707.go @@ -2,7 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build unix +//go:build !plan9 && !windows +// +build !plan9,!windows // This is for issue #29707