From: Brad Fitzpatrick Date: Wed, 27 Jan 2016 00:09:50 +0000 (+0000) Subject: runtime: add more debug info to flaky TestNumGoroutine X-Git-Tag: go1.6rc1~23 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=9202e9e1b81d1c6d07b516eae2d1da28951c7a76;p=gostls13.git 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 TryBot-Result: Gobot Gobot Reviewed-by: Matthew Dempsky --- 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) } }