From 4c4a376736fff47b08ab6053605c3b68d87552b5 Mon Sep 17 00:00:00 2001 From: Keith Randall Date: Fri, 18 Sep 2020 13:01:54 -0700 Subject: [PATCH] runtime/debug: skip fault address test on unsupported platforms Change-Id: I6a6fe616365fa542218fbc9ff61805ff70a1ef63 Reviewed-on: https://go-review.googlesource.com/c/go/+/255999 Run-TryBot: Keith Randall TryBot-Result: Go Bot Reviewed-by: Bryan C. Mills Trust: Keith Randall --- src/runtime/debug/panic_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/runtime/debug/panic_test.go b/src/runtime/debug/panic_test.go index 2aad418bae..4b7830e100 100644 --- a/src/runtime/debug/panic_test.go +++ b/src/runtime/debug/panic_test.go @@ -9,6 +9,7 @@ package debug_test import ( + "runtime" "runtime/debug" "syscall" "testing" @@ -16,6 +17,12 @@ import ( ) func TestPanicOnFault(t *testing.T) { + if runtime.GOARCH == "s390x" { + t.Skip("s390x fault addresses are missing the low order bits") + } + if runtime.GOOS == "darwin" && runtime.GOARCH == "arm64" { + t.Skip("darwin/arm64 doesn't provide fault addresses") + } m, err := syscall.Mmap(-1, 0, 0x1000, syscall.PROT_READ /* Note: no PROT_WRITE */, syscall.MAP_SHARED|syscall.MAP_ANON) if err != nil { t.Fatalf("can't map anonymous memory: %s", err) -- 2.50.0