aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2020-10-27 21:05:13 -0700
committerBryan C. Mills <bcmills@google.com>2020-10-28 04:20:39 +0000
commit02335cf4131f4eb1869f50f906e993676f7f414a (patch)
tree81f2dec0fc2d3a0fbbdd8dc239d2dab0c1795221
parent2414e1f17b2f82be10110513b17cdfa80c9937c6 (diff)
downloadgo-02335cf4131f4eb1869f50f906e993676f7f414a.tar.gz
go-02335cf4131f4eb1869f50f906e993676f7f414a.zip
runtime: move TestNeedmDeadlock to crash_cgo_test.go
It requires cgo. Also, skip the test on windows and plan9. For #42207 Change-Id: I8522773f93bc3f9826506a41a08b86a083262e31 Reviewed-on: https://go-review.googlesource.com/c/go/+/265778 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-rw-r--r--src/runtime/crash_cgo_test.go13
-rw-r--r--src/runtime/crash_unix_test.go9
2 files changed, 13 insertions, 9 deletions
diff --git a/src/runtime/crash_cgo_test.go b/src/runtime/crash_cgo_test.go
index b200984050..0680d07a32 100644
--- a/src/runtime/crash_cgo_test.go
+++ b/src/runtime/crash_cgo_test.go
@@ -600,3 +600,16 @@ func TestEINTR(t *testing.T) {
t.Fatalf("want %s, got %s\n", want, output)
}
}
+
+// Issue #42207.
+func TestNeedmDeadlock(t *testing.T) {
+ switch runtime.GOOS {
+ case "plan9", "windows":
+ t.Skipf("no signals on %s", runtime.GOOS)
+ }
+ output := runTestProg(t, "testprogcgo", "NeedmDeadlock")
+ want := "OK\n"
+ if output != want {
+ t.Fatalf("want %s, got %s\n", want, output)
+ }
+}
diff --git a/src/runtime/crash_unix_test.go b/src/runtime/crash_unix_test.go
index 7aba3d4846..fc87f37408 100644
--- a/src/runtime/crash_unix_test.go
+++ b/src/runtime/crash_unix_test.go
@@ -358,12 +358,3 @@ func TestSignalM(t *testing.T) {
t.Fatalf("signal sent to M %d, but received on M %d", want, got)
}
}
-
-// Issue #42207.
-func TestNeedmDeadlock(t *testing.T) {
- output := runTestProg(t, "testprogcgo", "NeedmDeadlock")
- want := "OK\n"
- if output != want {
- t.Fatalf("want %s, got %s\n", want, output)
- }
-}