runtime: add debugging to TestTimePprof

We've seen timeouts of TestTimePprof, but the tracebacks aren't useful
because goroutines are running on other threads. Add GOTRACEBACK=crash
to catch these in the future.

For #41120.

Change-Id: I97318172ef78d0cbab10df5e4ffcbfeadff579e3
Reviewed-on: https://go-review.googlesource.com/c/go/+/258802
Trust: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
This commit is contained in:
Austin Clements 2020-10-01 16:06:03 -04:00
parent 79dbdf2a4c
commit d888f1d5c0

View file

@ -667,7 +667,9 @@ func TestBadTraceback(t *testing.T) {
}
func TestTimePprof(t *testing.T) {
fn := runTestProg(t, "testprog", "TimeProf")
// Pass GOTRACEBACK for issue #41120 to try to get more
// information on timeout.
fn := runTestProg(t, "testprog", "TimeProf", "GOTRACEBACK=crash")
fn = strings.TrimSpace(fn)
defer os.Remove(fn)