Skip to content

Commit 03272d1

Browse files
committed
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 <[email protected]> Run-TryBot: Austin Clements <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1 parent a81da92 commit 03272d1

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

src/internal/goos/nonunix.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
//go:build !unix
2+
3+
package goos
4+
5+
const IsUnix = false

src/internal/goos/unix.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
//go:build unix
2+
3+
package goos
4+
5+
const IsUnix = true

src/runtime/crash_cgo_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -757,8 +757,8 @@ func TestCgoTraceParserWithOneProc(t *testing.T) {
757757

758758
func TestCgoSigfwd(t *testing.T) {
759759
t.Parallel()
760-
if goos.IsLinux == 0 {
761-
t.Skipf("only supported on Linux")
760+
if !goos.IsUnix {
761+
t.Skipf("no signals on %s", runtime.GOOS)
762762
}
763763

764764
got := runTestProg(t, "testprogcgo", "CgoSigfwd", "GO_TEST_CGOSIGFWD=1")

src/runtime/testdata/testprogcgo/sigfwd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build linux
5+
//go:build unix
66

77
package main
88

0 commit comments

Comments
 (0)