]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: move TestNeedmDeadlock to crash_cgo_test.go
authorIan Lance Taylor <iant@golang.org>
Wed, 28 Oct 2020 04:05:13 +0000 (21:05 -0700)
committerBryan C. Mills <bcmills@google.com>
Wed, 28 Oct 2020 04:20:39 +0000 (04:20 +0000)
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>
src/runtime/crash_cgo_test.go
src/runtime/crash_unix_test.go

index b2009840502c4d50b2f34541819eb07d6bb8b697..0680d07a326d11bc35741f7009bfa8e4e2e0d9d1 100644 (file)
@@ -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)
+       }
+}
index 7aba3d48462fdcebe9c6edec83cb99ccdabc3ac0..fc87f374088868a5728d467fa3fd660eb71869cb 100644 (file)
@@ -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)
-       }
-}