]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/internal/cryptotest: test Armv8.2 on darwin/arm64
authorFilippo Valsorda <filippo@golang.org>
Wed, 23 Apr 2025 21:15:51 +0000 (23:15 +0200)
committerFilippo Valsorda <filippo@golang.org>
Wed, 21 May 2025 20:47:43 +0000 (13:47 -0700)
Fixes #69593

Cq-Include-Trybots: luci.golang.try:gotip-darwin-arm64_15
Change-Id: I6a6a4656302d65b582df582fa12bb72b88b0316d
Reviewed-on: https://go-review.googlesource.com/c/go/+/667755
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

src/crypto/internal/cryptotest/implementations.go

index 3fa730459050f6043f12cedb77a6d33f3e0ca8f2..f0ba665403e4e232dc614d823b327b2bee6af20d 100644 (file)
@@ -7,6 +7,7 @@ package cryptotest
 import (
        "crypto/internal/boring"
        "crypto/internal/impl"
+       "internal/goarch"
        "internal/goos"
        "internal/testenv"
        "testing"
@@ -35,15 +36,14 @@ func TestAllImplementations(t *testing.T, pkg string, f func(t *testing.T)) {
                        t.Run(name, f)
                } else {
                        t.Run(name, func(t *testing.T) {
-                               // Report an error if we're on Linux CI (assumed to be the most
-                               // consistent) and the builder can't test this implementation.
-                               if testenv.Builder() != "" && goos.GOOS == "linux" {
+                               // Report an error if we're on the most capable builder for the
+                               // architecture and the builder can't test this implementation.
+                               flagship := goos.GOOS == "linux" && goarch.GOARCH != "arm64" ||
+                                       goos.GOOS == "darwin" && goarch.GOARCH == "arm64"
+                               if testenv.Builder() != "" && flagship {
                                        if name == "SHA-NI" {
                                                t.Skip("known issue, see golang.org/issue/69592")
                                        }
-                                       if name == "Armv8.2" {
-                                               t.Skip("known issue, see golang.org/issue/69593")
-                                       }
                                        t.Error("builder doesn't support CPU features needed to test this implementation")
                                } else {
                                        t.Skip("implementation not supported")