From: Russ Cox Date: Fri, 11 Nov 2016 16:25:15 +0000 (-0500) Subject: runtime/pprof: delete new TestCPUProfileParse X-Git-Tag: go1.8beta1~201 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=c4099c7593fea9c594ad0e8969452a741acba4c7;p=gostls13.git runtime/pprof: delete new TestCPUProfileParse All the existing CPU profiler tests already parse the profile. That should be sufficient indication that profiles can be parsed. Fixes #17853. Change-Id: Ie8a190e2ae4eef125c8eb0d4e8b7adac420abbdb Reviewed-on: https://go-review.googlesource.com/33136 Run-TryBot: Russ Cox TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- diff --git a/src/runtime/pprof/pprof_test.go b/src/runtime/pprof/pprof_test.go index c19ea3507d..eb8fcc90db 100644 --- a/src/runtime/pprof/pprof_test.go +++ b/src/runtime/pprof/pprof_test.go @@ -651,23 +651,3 @@ func containsInOrder(s string, all ...string) bool { } return true } - -// Tests that the profiler outputs a parsable protobuf Profile profile. -func TestCPUProfileParse(t *testing.T) { - - var before, after runtime.MemStats - runtime.ReadMemStats(&before) - var buf bytes.Buffer - - if err := StartCPUProfile(&buf); err != nil { - t.Fatalf("Profile failed: Could not enable CPU profiling: %s\n", err) - } - time.Sleep(5 * time.Second) - StopCPUProfile() - - runtime.ReadMemStats(&after) - _, err := profile.Parse(&buf) - if err != nil { - t.Fatalf("Could not parse Profile profile: %v", err) - } -}