From 05d8a33b37682e4a58477dea4cb5c6bc298d9d25 Mon Sep 17 00:00:00 2001 From: Filippo Valsorda Date: Mon, 7 Oct 2024 17:59:58 +0200 Subject: [PATCH] crypto/rand: skip TestAllocations if optimizations are off Without optimizations escape analysis can't do as much. Updates #66779 Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-noopt Change-Id: I9ccd1b995c62427ceebd9ce5c98170dbf4a93e8b Reviewed-on: https://go-review.googlesource.com/c/go/+/618275 Reviewed-by: Roland Shoemaker Auto-Submit: Filippo Valsorda LUCI-TryBot-Result: Go LUCI Reviewed-by: Dmitri Shuralyov --- src/crypto/rand/rand_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/crypto/rand/rand_test.go b/src/crypto/rand/rand_test.go index 0743a2dd04..2372413279 100644 --- a/src/crypto/rand/rand_test.go +++ b/src/crypto/rand/rand_test.go @@ -158,6 +158,7 @@ func TestAllocations(t *testing.T) { if race.Enabled { t.Skip("urandomRead allocates under -race") } + testenv.SkipIfOptimizationOff(t) n := int(testing.AllocsPerRun(10, func() { buf := make([]byte, 32) -- 2.48.1