From: Russ Cox Date: Fri, 17 Oct 2014 15:23:15 +0000 (-0400) Subject: runtime/pprof: fix test X-Git-Tag: go1.4beta1~95 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=fb173c41850c9ad049098be657c923589329fab8;p=gostls13.git runtime/pprof: fix test gogo called from GC is okay for the same reasons that gogo called from System or ExternalCode is okay. All three are fake stack traces. Fixes #8408. LGTM=dvyukov, r R=r, dvyukov CC=golang-codereviews https://golang.org/cl/152580043 --- diff --git a/src/runtime/pprof/pprof_test.go b/src/runtime/pprof/pprof_test.go index edd471a0c9..8677cb30c5 100644 --- a/src/runtime/pprof/pprof_test.go +++ b/src/runtime/pprof/pprof_test.go @@ -249,7 +249,7 @@ func TestGoroutineSwitch(t *testing.T) { // exists to record a PC without a traceback. Those are okay. if len(stk) == 2 { f := runtime.FuncForPC(stk[1]) - if f != nil && (f.Name() == "System" || f.Name() == "ExternalCode") { + if f != nil && (f.Name() == "System" || f.Name() == "ExternalCode" || f.Name() == "GC") { return } }