From: Keith Randall Date: Fri, 18 Sep 2020 20:01:54 +0000 (-0700) Subject: runtime/debug: skip fault address test on unsupported platforms X-Git-Tag: go1.16beta1~990 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=4c4a376736fff47b08ab6053605c3b68d87552b5;p=gostls13.git 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 --- 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)