diff options
author | Brad Fitzpatrick <bradfitz@golang.org> | 2016-01-27 00:09:50 +0000 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2016-01-27 02:51:01 +0000 |
commit | 9202e9e1b81d1c6d07b516eae2d1da28951c7a76 (patch) | |
tree | f69dd03c4ed94ed0be729c11a83c7018d34824a3 | |
parent | 09940b92a08203aa3d2baa90fc29b80ccfcb32c5 (diff) | |
download | go-9202e9e1b81d1c6d07b516eae2d1da28951c7a76.tar.gz go-9202e9e1b81d1c6d07b516eae2d1da28951c7a76.zip |
runtime: add more debug info to flaky TestNumGoroutine
This has been flaking on the new OpenBSD 5.8 builders lately:
https://storage.googleapis.com/go-build-log/808270e7/openbsd-amd64-gce58_61ce2663.log
(as one example)
Add more debug info when it fails.
Updates #14107
Change-Id: Ie30bc0c703d2e9ee993d1e232ffc5f2d17e65c97
Reviewed-on: https://go-review.googlesource.com/18938
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-rw-r--r-- | src/runtime/proc_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/proc_test.go b/src/runtime/proc_test.go index f3e90bcbd7..34d90a1c9b 100644 --- a/src/runtime/proc_test.go +++ b/src/runtime/proc_test.go @@ -350,7 +350,7 @@ func TestNumGoroutine(t *testing.T) { n := runtime.NumGoroutine() if nstk := strings.Count(string(buf), "goroutine "); n != nstk { - t.Fatalf("NumGoroutine=%d, but found %d goroutines in stack dump", n, nstk) + t.Fatalf("NumGoroutine=%d, but found %d goroutines in stack dump: %s", n, nstk, buf) } } |