Skip to content

Commit 5508561

Browse files
committed
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 <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent f9feaff commit 5508561

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/runtime/pprof/internal/protopprof/protomemprofile_test.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ func TestSampledHeapAllocProfile(t *testing.T) {
3232
t.Fatalf("Cannot parse /proc/self/maps")
3333
}
3434
if len(mprof.Mapping) < 2 {
35-
t.Fatalf("Less than two mappings")
35+
// It is possible for a binary to only have 1 executable
36+
// region of memory.
37+
t.Skipf("need 2 or more mappings, got %v", len(mprof.Mapping))
3638
}
3739
address1 := mprof.Mapping[0].Start
3840
address2 := mprof.Mapping[1].Start

0 commit comments

Comments
 (0)