]> Cypherpunks.ru repositories - gostls13.git/commitdiff
runtime: add debugging to TestTimePprof
authorAustin Clements <austin@google.com>
Thu, 1 Oct 2020 20:06:03 +0000 (16:06 -0400)
committerAustin Clements <austin@google.com>
Fri, 2 Oct 2020 18:57:36 +0000 (18:57 +0000)
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>
src/runtime/crash_test.go

index 34f30c9a372c94b36a476c75c15c3cd2c232a4d8..eae4f538c1c4206347160d62169d1e2982a59850 100644 (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)