From: Filippo Valsorda Date: Mon, 7 Oct 2024 15:59:58 +0000 (+0200) Subject: crypto/rand: skip TestAllocations if optimizations are off X-Git-Tag: go1.24rc1~735 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=05d8a33b37682e4a58477dea4cb5c6bc298d9d25;p=gostls13.git 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 --- 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)