diff options
author | Michael Pratt <mpratt@google.com> | 2021-06-17 15:23:53 -0400 |
---|---|---|
committer | Michael Pratt <mpratt@google.com> | 2021-06-17 21:58:54 +0000 |
commit | 45f251ad6cfe0a8fa1aeac0c2c8e42bfe3549c29 (patch) | |
tree | 882bf740566ee8187c69cde3bdfcd507e61dc0b8 /src/cmd/pprof | |
parent | ed834853ad8224611f44a3c467e00a22df341d91 (diff) | |
download | go-45f251ad6cfe0a8fa1aeac0c2c8e42bfe3549c29.tar.gz go-45f251ad6cfe0a8fa1aeac0c2c8e42bfe3549c29.zip |
cmd/pprof,runtime/pprof: disable test on more broken platforms
runtime/pprof has a more complete list of platforms with broken
profiling than I used in cmd/pprof in https://golang.org/cl/325809.
Duplicate that list in cmd/pprof and clean it up a bit in runtime/pprof
for easier reference.
Change-Id: I8f2580aac223de9b73cfff4355f49916f7b76493
Reviewed-on: https://go-review.googlesource.com/c/go/+/329149
Trust: Michael Pratt <mpratt@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Diffstat (limited to 'src/cmd/pprof')
-rw-r--r-- | src/cmd/pprof/pprof_test.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/cmd/pprof/pprof_test.go b/src/cmd/pprof/pprof_test.go index 170cdf3bb8..11e251bfde 100644 --- a/src/cmd/pprof/pprof_test.go +++ b/src/cmd/pprof/pprof_test.go @@ -54,6 +54,22 @@ func buildPprof() error { return nil } +// See also runtime/pprof.cpuProfilingBroken. +func mustHaveCPUProfiling(t *testing.T) { + switch runtime.GOOS { + case "plan9": + t.Skipf("skipping on %s, unimplemented", runtime.GOOS) + case "aix": + t.Skipf("skipping on %s, issue 45170", runtime.GOOS) + case "ios", "dragonfly", "netbsd", "illumos", "solaris": + t.Skipf("skipping on %s, issue 13841", runtime.GOOS) + case "openbsd": + if runtime.GOARCH == "arm" || runtime.GOARCH == "arm64" { + t.Skipf("skipping on %s/%s, issue 13841", runtime.GOOS, runtime.GOARCH) + } + } +} + func mustHaveDisasm(t *testing.T) { switch runtime.GOARCH { case "mips", "mipsle", "mips64", "mips64le": @@ -77,6 +93,7 @@ func mustHaveDisasm(t *testing.T) { // // This is a regression test for issue 46636. func TestDisasm(t *testing.T) { + mustHaveCPUProfiling(t) mustHaveDisasm(t) testenv.MustHaveGoBuild(t) |