File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -1164,7 +1164,7 @@ func TestCgoToGoCallGoexit(t *testing.T) {
1164
1164
t .Skipf ("no pthreads on %s" , runtime .GOOS )
1165
1165
}
1166
1166
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" )
1169
1169
}
1170
1170
}
Original file line number Diff line number Diff line change @@ -42,12 +42,6 @@ func init() {
42
42
}
43
43
44
44
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
- }()
51
45
goexit = true
52
46
C .foo ()
53
47
}
You can’t perform that action at this time.
0 commit comments