From 7e5e4a7cef34727c8de2da218e76da23f826d608 Mon Sep 17 00:00:00 2001 From: Cuong Manh Le Date: Tue, 9 Aug 2022 01:39:18 +0700 Subject: [PATCH] math/big: disable TestNewIntAllocs on noopt builder Since when that test requires inlining, which is disabled on noopt builder. Updates #29951 Change-Id: I9d7a0a64015a30d3bfb5ad5d806ea0955657fda3 Reviewed-on: https://go-review.googlesource.com/c/go/+/422039 Run-TryBot: Cuong Manh Le Auto-Submit: Cuong Manh Le Reviewed-by: Than McIntosh TryBot-Result: Gopher Robot Reviewed-by: Dmitri Shuralyov --- src/math/big/int_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/math/big/int_test.go b/src/math/big/int_test.go index 4ebb09d2c2..961ba0cdf5 100644 --- a/src/math/big/int_test.go +++ b/src/math/big/int_test.go @@ -8,6 +8,7 @@ import ( "bytes" "encoding/hex" "fmt" + "internal/testenv" "math" "math/rand" "strconv" @@ -1905,6 +1906,9 @@ func TestNewIntMinInt64(t *testing.T) { } func TestNewIntAllocs(t *testing.T) { + if strings.HasSuffix(testenv.Builder(), "-noopt") { + t.Skip("inlining is disabled on noopt builder") + } for _, n := range []int64{0, 7, -7, 1 << 30, -1 << 30, 1 << 50, -1 << 50} { x := NewInt(3) got := testing.AllocsPerRun(100, func() { -- 2.51.0