diff options
Diffstat (limited to 'src/cmd/vendor/github.com/google/pprof')
| -rw-r--r-- | src/cmd/vendor/github.com/google/pprof/internal/driver/fetch_test.go | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/cmd/vendor/github.com/google/pprof/internal/driver/fetch_test.go b/src/cmd/vendor/github.com/google/pprof/internal/driver/fetch_test.go index b300aa6641..5bcd40daa7 100644 --- a/src/cmd/vendor/github.com/google/pprof/internal/driver/fetch_test.go +++ b/src/cmd/vendor/github.com/google/pprof/internal/driver/fetch_test.go @@ -411,9 +411,14 @@ func TestHttpsInsecure(t *testing.T) { Timeout: 10, Symbolize: "remote", } + rx := "Saved profile in" + if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") { + // On iOS, $HOME points to the app root directory and is not writable. + rx += "|Could not use temp dir" + } o := &plugin.Options{ Obj: &binutils.Binutils{}, - UI: &proftest.TestUI{T: t, AllowRx: "Saved profile in"}, + UI: &proftest.TestUI{T: t, AllowRx: rx}, } o.Sym = &symbolizer.Symbolizer{Obj: o.Obj, UI: o.UI} p, err := fetchProfiles(s, o) @@ -423,9 +428,15 @@ func TestHttpsInsecure(t *testing.T) { if len(p.SampleType) == 0 { t.Fatalf("fetchProfiles(%s) got empty profile: len(p.SampleType)==0", address) } - if runtime.GOOS == "plan9" { + switch runtime.GOOS { + case "plan9": // CPU profiling is not supported on Plan9; see golang.org/issues/22564. return + case "darwin": + if runtime.GOARCH == "arm" || runtime.GOARCH == "arm64" { + // CPU profiling on iOS os not symbolized; see golang.org/issues/22612. + return + } } if len(p.Function) == 0 { t.Fatalf("fetchProfiles(%s) got non-symbolized profile: len(p.Function)==0", address) |
