Skip to content

Commit 02335cf

Browse files
ianlancetaylorBryan C. Mills
authored and
Bryan C. Mills
committed
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 <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent 2414e1f commit 02335cf

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

src/runtime/crash_cgo_test.go

+13
Original file line numberDiff line numberDiff line change
@@ -600,3 +600,16 @@ func TestEINTR(t *testing.T) {
600600
t.Fatalf("want %s, got %s\n", want, output)
601601
}
602602
}
603+
604+
// Issue #42207.
605+
func TestNeedmDeadlock(t *testing.T) {
606+
switch runtime.GOOS {
607+
case "plan9", "windows":
608+
t.Skipf("no signals on %s", runtime.GOOS)
609+
}
610+
output := runTestProg(t, "testprogcgo", "NeedmDeadlock")
611+
want := "OK\n"
612+
if output != want {
613+
t.Fatalf("want %s, got %s\n", want, output)
614+
}
615+
}

src/runtime/crash_unix_test.go

-9
Original file line numberDiff line numberDiff line change
@@ -358,12 +358,3 @@ func TestSignalM(t *testing.T) {
358358
t.Fatalf("signal sent to M %d, but received on M %d", want, got)
359359
}
360360
}
361-
362-
// Issue #42207.
363-
func TestNeedmDeadlock(t *testing.T) {
364-
output := runTestProg(t, "testprogcgo", "NeedmDeadlock")
365-
want := "OK\n"
366-
if output != want {
367-
t.Fatalf("want %s, got %s\n", want, output)
368-
}
369-
}

0 commit comments

Comments
 (0)