diff options
| author | Michael Munday <munday@ca.ibm.com> | 2016-11-22 15:39:51 -0500 |
|---|---|---|
| committer | Michael Munday <munday@ca.ibm.com> | 2016-11-22 20:57:16 +0000 |
| commit | 5508561180950534fd623fb61a8a8f357ad50e4c (patch) | |
| tree | 4eeec0ffc9fe97b8a28eb3a6dced5a8b4419a159 /src | |
| parent | f9feaffdf51967bc5cf3c9363db9ddee98c9b3a0 (diff) | |
| download | go-5508561180950534fd623fb61a8a8f357ad50e4c.tar.xz | |
runtime/pprof/internal/protopprof: fix test on s390x
Applies the fix from CL 32920 to the new test TestSampledHeapAllocProfile
introduced in CL 33422. The test should be skipped rather than fail if
there is only one executable region of memory.
Updates #17852.
Change-Id: Id8c47b1f17ead14f02a58a024c9a04ebb8ec0429
Reviewed-on: https://go-review.googlesource.com/33453
Run-TryBot: Michael Munday <munday@ca.ibm.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src')
| -rw-r--r-- | src/runtime/pprof/internal/protopprof/protomemprofile_test.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/runtime/pprof/internal/protopprof/protomemprofile_test.go b/src/runtime/pprof/internal/protopprof/protomemprofile_test.go index 65f93d6f1a..a10fe772cc 100644 --- a/src/runtime/pprof/internal/protopprof/protomemprofile_test.go +++ b/src/runtime/pprof/internal/protopprof/protomemprofile_test.go @@ -32,7 +32,9 @@ func TestSampledHeapAllocProfile(t *testing.T) { t.Fatalf("Cannot parse /proc/self/maps") } if len(mprof.Mapping) < 2 { - t.Fatalf("Less than two mappings") + // It is possible for a binary to only have 1 executable + // region of memory. + t.Skipf("need 2 or more mappings, got %v", len(mprof.Mapping)) } address1 := mprof.Mapping[0].Start address2 := mprof.Mapping[1].Start |
