Skip to content

Commit 182bbdc

Browse files
author
Bryan C. Mills
committed
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 <[email protected]> Run-TryBot: Bryan C. Mills <[email protected]> gopls-CI: kokoro <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Russ Cox <[email protected]>
1 parent f6440c8 commit 182bbdc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

go/pointer/pointer_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import (
2626
"strconv"
2727
"strings"
2828
"testing"
29+
"unsafe"
2930

3031
"golang.org/x/tools/go/callgraph"
3132
"golang.org/x/tools/go/packages"
@@ -553,6 +554,9 @@ func TestInput(t *testing.T) {
553554
if testing.Short() {
554555
t.Skip("skipping in short mode; this test requires tons of memory; https://golang.org/issue/14113")
555556
}
557+
if unsafe.Sizeof(unsafe.Pointer(nil)) <= 4 {
558+
t.Skip("skipping memory-intensive test on platform with small address space; https://golang.org/issue/14113")
559+
}
556560
ok := true
557561

558562
wd, err := os.Getwd()

0 commit comments

Comments
 (0)