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 <bcmills@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
Austin Clements 2022-10-14 15:31:42 -04:00
parent a81da928b4
commit 03272d14ed
4 changed files with 13 additions and 3 deletions

View File

@ -0,0 +1,5 @@
//go:build !unix
package goos
const IsUnix = false

View File

@ -0,0 +1,5 @@
//go:build unix
package goos
const IsUnix = true

View File

@ -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")

View File

@ -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