From: Ian Lance Taylor Date: Sat, 20 Dec 2014 02:17:02 +0000 (-0800) Subject: misc/cgo/test: skip test7978 when using gccgo X-Git-Tag: go1.5beta1~2581 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=421c01706fbcb4519d0a00215120e8ebd591d9e8;p=gostls13.git misc/cgo/test: skip test7978 when using gccgo Gccgo can only get a backtrace for the currently running thread, which means that it can only get a backtrace for goroutines currently running Go code. When a goroutine is running C code, gccgo has no way to stop it and get the backtrace. This test is all about getting a backtrace of goroutines running C code, so it can't work for gccgo. Change-Id: I2dff4403841fb544da7396562ab1193875fc14c3 Reviewed-on: https://go-review.googlesource.com/1904 Reviewed-by: Minux Ma --- diff --git a/misc/cgo/test/issue7978.go b/misc/cgo/test/issue7978.go index 5feed07b95..9e2afcf8d4 100644 --- a/misc/cgo/test/issue7978.go +++ b/misc/cgo/test/issue7978.go @@ -82,6 +82,9 @@ func issue7978go() { } func test7978(t *testing.T) { + if runtime.Compiler == "gccgo" { + t.Skip("gccgo can not do stack traces of C code") + } if os.Getenv("GOTRACEBACK") != "2" { t.Fatalf("GOTRACEBACK must be 2") }