]> Cypherpunks repositories - gostls13.git/commit
crypto/sha256,crypto/sha512: test fallback implementations
authorFilippo Valsorda <filippo@golang.org>
Fri, 20 Sep 2024 16:06:54 +0000 (18:06 +0200)
committerGopher Robot <gobot@golang.org>
Wed, 23 Oct 2024 15:21:42 +0000 (15:21 +0000)
commitf04f4c24e36440226baaa181abb1754f8b0f0b41
treeb289d502f771925cdb5ee76a49d09f526ce1dd0c
parenta7650080302173d2de33ca35da20fc592c5fc0b6
crypto/sha256,crypto/sha512: test fallback implementations

This will be required for #69536 but is also good hygiene and required
by go.dev/wiki/AssemblyPolicy.

> The code must be tested in our CI. This means there need to be
> builders that support the instructions, and if there are multiple (or
> fallback) paths they must be tested separately.

The new crypto/internal/impl registry lets us select alternative
implementations from both the same package and importers (such as
crypto/sha256 tests once we have crypto/internal/fips/sha256, or
crypto/hmac).

Updates #69592
Updates #69593

Change-Id: Ifea22a9fc9ccffcaf4924ff6bd08da7c9bd39e99
Cq-Include-Trybots: luci.golang.try:gotip-linux-arm64-longtest,gotip-linux-amd64-longtest,gotip-linux-ppc64le_power8,gotip-linux-ppc64_power8
Reviewed-on: https://go-review.googlesource.com/c/go/+/614656
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
13 files changed:
src/crypto/internal/cryptotest/implementations.go [new file with mode: 0644]
src/crypto/internal/impl/impl.go [new file with mode: 0644]
src/crypto/sha256/sha256_test.go
src/crypto/sha256/sha256block_amd64.go
src/crypto/sha256/sha256block_arm64.go
src/crypto/sha256/sha256block_ppc64x.go
src/crypto/sha256/sha256block_s390x.go
src/crypto/sha512/sha512_test.go
src/crypto/sha512/sha512block_amd64.go
src/crypto/sha512/sha512block_arm64.go
src/crypto/sha512/sha512block_ppc64x.go
src/crypto/sha512/sha512block_s390x.go
src/go/build/deps_test.go