diff options
| author | Russ Cox <rsc@golang.org> | 2016-01-08 15:31:09 +0000 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2016-01-08 15:31:15 +0000 |
| commit | 6da608206c222c280078264f02135ffaa4e1aa26 (patch) | |
| tree | 99bd0b58d508681fbe19c30e0de9427cb725a98b /src/runtime/proc_test.go | |
| parent | c5bafc828126c8fa057e1accaa448583c7ec145f (diff) | |
| download | go-6da608206c222c280078264f02135ffaa4e1aa26.tar.xz | |
Revert "runtime: make NumGoroutine and Stack agree not to include system goroutines"
This reverts commit c5bafc828126c8fa057e1accaa448583c7ec145f.
Change-Id: Ie7030c978c6263b9e996d5aa0e490086796df26d
Reviewed-on: https://go-review.googlesource.com/18431
Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/runtime/proc_test.go')
| -rw-r--r-- | src/runtime/proc_test.go | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/runtime/proc_test.go b/src/runtime/proc_test.go index f3e90bcbd7..30798f723d 100644 --- a/src/runtime/proc_test.go +++ b/src/runtime/proc_test.go @@ -9,7 +9,6 @@ import ( "net" "runtime" "runtime/debug" - "strings" "sync" "sync/atomic" "syscall" @@ -337,23 +336,6 @@ func TestGCFairness(t *testing.T) { } } -func TestNumGoroutine(t *testing.T) { - output := runTestProg(t, "testprog", "NumGoroutine") - want := "1\n" - if output != want { - t.Fatalf("want %q, got %q", want, output) - } - - buf := make([]byte, 1<<20) - buf = buf[:runtime.Stack(buf, true)] - - 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) - } -} - func TestPingPongHog(t *testing.T) { if testing.Short() { t.Skip("skipping in -short mode") |
