Skip to content

Commit 9a8fd85

Browse files
new
Change-Id: Id2efa3dc9cc5189fdd70e6851eff59d5f94e3419
1 parent 41fff08 commit 9a8fd85

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

src/runtime/proc_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@ func TestCgoToGoCallGoexit(t *testing.T) {
11641164
t.Skipf("no pthreads on %s", runtime.GOOS)
11651165
}
11661166
output := runTestProg(t, "testprogcgo", "CgoToGoCallGoexit")
1167-
if output != "OK\n" {
1168-
t.Fatalf("want OK\n, got %s", output)
1167+
if !strings.Contains(output, "runtime.Goexit called in a thread that was not created by the Go runtime") {
1168+
t.Fatalf("output should contain %s", "runtime.Goexit called in a thread that was not created by the Go runtime")
11691169
}
11701170
}

src/runtime/testdata/testprogcgo/callback.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,6 @@ func init() {
4242
}
4343

4444
func CgoToGoCallGoexit() {
45-
defer func() {
46-
if err := recover(); err != "runtime.Goexit called in a thread that was not created by the Go runtime" {
47-
panic("expect: runtime.Goexit called in a thread that was not created by the Go runtime")
48-
}
49-
fmt.Println("OK")
50-
}()
5145
goexit = true
5246
C.foo()
5347
}

0 commit comments

Comments
 (0)