]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/rand: skip TestAllocations if optimizations are off
authorFilippo Valsorda <filippo@golang.org>
Mon, 7 Oct 2024 15:59:58 +0000 (17:59 +0200)
committerGopher Robot <gobot@golang.org>
Mon, 7 Oct 2024 16:38:43 +0000 (16:38 +0000)
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 <roland@golang.org>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
src/crypto/rand/rand_test.go

index 0743a2dd043ad1dfb20a5672c32ae586929869d3..2372413279dafee193349a9e6ee298e282f5cd4e 100644 (file)
@@ -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)