From 182bbdcec92f24c2bda00ffd8ab4240213cb862c Mon Sep 17 00:00:00 2001 From: "Bryan C. Mills" Date: Tue, 2 Nov 2021 15:37:35 -0400 Subject: [PATCH] go/pointer: skip TestInput on 32-bit platforms This test was already memory-hungry to begin with, and apparently the switch to go/packages in CL 356513 pushed it over the edge of the 32-bit address space (at least with the default GOGC setting). Rather than trying to precisely tune it to skim under the 32-bit limit, let's just skip the test on platforms with insufficient address space. Updates golang/go#14113 Updates golang/go#48547 Change-Id: Iab99e9ce70a98034194d7c7ad7df7a545ac95ef3 Reviewed-on: https://go-review.googlesource.com/c/tools/+/360837 Trust: Bryan C. Mills Run-TryBot: Bryan C. Mills gopls-CI: kokoro TryBot-Result: Go Bot Reviewed-by: Russ Cox --- go/pointer/pointer_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/go/pointer/pointer_test.go b/go/pointer/pointer_test.go index ff75a05310..1ac5b6c9ff 100644 --- a/go/pointer/pointer_test.go +++ b/go/pointer/pointer_test.go @@ -26,6 +26,7 @@ import ( "strconv" "strings" "testing" + "unsafe" "golang.org/x/tools/go/callgraph" "golang.org/x/tools/go/packages" @@ -553,6 +554,9 @@ func TestInput(t *testing.T) { if testing.Short() { t.Skip("skipping in short mode; this test requires tons of memory; https://golang.org/issue/14113") } + if unsafe.Sizeof(unsafe.Pointer(nil)) <= 4 { + t.Skip("skipping memory-intensive test on platform with small address space; https://golang.org/issue/14113") + } ok := true wd, err := os.Getwd()