]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/sha256,crypto/sha512: skip TestAllocations without optimizations
authorFilippo Valsorda <filippo@golang.org>
Wed, 23 Oct 2024 18:01:36 +0000 (20:01 +0200)
committerFilippo Valsorda <filippo@golang.org>
Thu, 24 Oct 2024 08:58:59 +0000 (08:58 +0000)
Fixes #70004
Fixes #70005

Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-noopt
Change-Id: I6766a722f124646262fa0d2a1ff245f8b93bc920
Reviewed-on: https://go-review.googlesource.com/c/go/+/622095
Reviewed-by: Roland Shoemaker <roland@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/crypto/sha256/sha256_test.go
src/crypto/sha512/sha512_test.go

index 40be1480dd51d12db06ac3a4f47ad189b676ca43..ffd163865158300967c0f8d5094859d0bd31e630 100644 (file)
@@ -13,6 +13,7 @@ import (
        "encoding"
        "fmt"
        "hash"
+       "internal/testenv"
        "io"
        "testing"
 )
@@ -297,6 +298,7 @@ func TestLargeHashes(t *testing.T) {
 }
 
 func TestAllocations(t *testing.T) {
+       testenv.SkipIfOptimizationOff(t)
        if boring.Enabled {
                t.Skip("BoringCrypto doesn't allocate the same way as stdlib")
        }
index 6e3d9bce1cf09569b1a3ea59b0280f5812b72494..fdad37b1863ae8ab8cd9bf079f33c08600474453 100644 (file)
@@ -14,6 +14,7 @@ import (
        "encoding/hex"
        "fmt"
        "hash"
+       "internal/testenv"
        "io"
        "testing"
 )
@@ -902,6 +903,7 @@ func TestLargeHashes(t *testing.T) {
 }
 
 func TestAllocations(t *testing.T) {
+       testenv.SkipIfOptimizationOff(t)
        if boring.Enabled {
                t.Skip("BoringCrypto doesn't allocate the same way as stdlib")
        }