From: Austin Clements Date: Fri, 14 Oct 2022 19:31:42 +0000 (-0400) Subject: runtime: run TestCgoSigfwd on all Unix platforms X-Git-Tag: go1.20rc1~616 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=03272d14edc48783581058f06b6c17855cb5bd90;p=gostls13.git runtime: run TestCgoSigfwd on all Unix platforms This test was originally Linux-only, but there doesn't seem to be anything Linux-specific in it. Change-Id: I0f8519eff5dbed97f5e21e1c8e5ab0d747d51df3 Reviewed-on: https://go-review.googlesource.com/c/go/+/443073 Reviewed-by: Bryan Mills Run-TryBot: Austin Clements TryBot-Result: Gopher Robot --- diff --git a/src/internal/goos/nonunix.go b/src/internal/goos/nonunix.go new file mode 100644 index 0000000000..0f1373ff31 --- /dev/null +++ b/src/internal/goos/nonunix.go @@ -0,0 +1,5 @@ +//go:build !unix + +package goos + +const IsUnix = false diff --git a/src/internal/goos/unix.go b/src/internal/goos/unix.go new file mode 100644 index 0000000000..6ef2a2c7d1 --- /dev/null +++ b/src/internal/goos/unix.go @@ -0,0 +1,5 @@ +//go:build unix + +package goos + +const IsUnix = true diff --git a/src/runtime/crash_cgo_test.go b/src/runtime/crash_cgo_test.go index 441a704ebe..ba0e9f4ced 100644 --- a/src/runtime/crash_cgo_test.go +++ b/src/runtime/crash_cgo_test.go @@ -757,8 +757,8 @@ func TestCgoTraceParserWithOneProc(t *testing.T) { func TestCgoSigfwd(t *testing.T) { t.Parallel() - if goos.IsLinux == 0 { - t.Skipf("only supported on Linux") + if !goos.IsUnix { + t.Skipf("no signals on %s", runtime.GOOS) } got := runTestProg(t, "testprogcgo", "CgoSigfwd", "GO_TEST_CGOSIGFWD=1") diff --git a/src/runtime/testdata/testprogcgo/sigfwd.go b/src/runtime/testdata/testprogcgo/sigfwd.go index b27d436f82..b66616db36 100644 --- a/src/runtime/testdata/testprogcgo/sigfwd.go +++ b/src/runtime/testdata/testprogcgo/sigfwd.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build linux +//go:build unix package main