Skip to content

Commit

Permalink
skip TestBlockGeneric when boring is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
qmuntal committed Sep 28, 2023
1 parent 192f5be commit 83acb5b
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion patches/0002-Add-crypto-backend-foundation.patch
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Subject: [PATCH] Add crypto backend foundation
src/crypto/internal/backend/norequirefips.go | 9 ++
src/crypto/internal/backend/stub.s | 10 ++
src/crypto/md5/md5.go | 7 +
src/crypto/md5/md5_test.go | 4 +
src/crypto/rand/rand_unix.go | 2 +-
src/crypto/rsa/boring.go | 4 +-
src/crypto/rsa/notboring.go | 2 +-
Expand All @@ -44,7 +45,7 @@ Subject: [PATCH] Add crypto backend foundation
src/crypto/tls/prf_test.go | 12 +-
src/go/build/deps_test.go | 2 +
src/runtime/runtime_boring.go | 5 +
40 files changed, 454 insertions(+), 65 deletions(-)
41 files changed, 458 insertions(+), 65 deletions(-)
create mode 100644 src/crypto/internal/backend/backend_test.go
create mode 100644 src/crypto/internal/backend/bbig/big.go
create mode 100644 src/crypto/internal/backend/common.go
Expand Down Expand Up @@ -565,6 +566,28 @@ index ccee4ea3a9914f..206249f5bf261e 100644
var d digest
d.Reset()
d.Write(data)
diff --git a/src/crypto/md5/md5_test.go b/src/crypto/md5/md5_test.go
index 851e7fb10d42f5..f9d1037c9b82b9 100644
--- a/src/crypto/md5/md5_test.go
+++ b/src/crypto/md5/md5_test.go
@@ -6,6 +6,7 @@ package md5

import (
"bytes"
+ boring "crypto/internal/backend"
"crypto/rand"
"encoding"
"fmt"
@@ -144,6 +145,9 @@ func TestLarge(t *testing.T) {

// Tests that blockGeneric (pure Go) and block (in assembly for amd64, 386, arm) match.
func TestBlockGeneric(t *testing.T) {
+ if boring.Enabled {
+ t.Skip("digest is not used when boring.Enabled is set")
+ }
gen, asm := New().(*digest), New().(*digest)
buf := make([]byte, BlockSize*20) // arbitrary factor
rand.Read(buf)
diff --git a/src/crypto/rand/rand_unix.go b/src/crypto/rand/rand_unix.go
index 40fce36314adfa..1d6231ae91d5ae 100644
--- a/src/crypto/rand/rand_unix.go
Expand Down

0 comments on commit 83acb5b

Please sign in to comment.