aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFilippo Valsorda <filippo@golang.org>2025-03-18 20:21:51 +0100
committerGopher Robot <gobot@golang.org>2025-03-18 14:04:58 -0700
commitfcb27f717b0eccb2a3de1bc05a7d222325ad5aeb (patch)
treec33ef055fcde9edd2fb46c552c58ab87c36040d4 /src
parentc8eced8580028328fde7c03cbfcb720ce15b2358 (diff)
downloadgo-fcb27f717b0eccb2a3de1bc05a7d222325ad5aeb.tar.xz
cmd/compile/internal/amd64: disable FIPS 140-3 mode for TestGoAMD64v1
TestGoAMD64v1 modifies the binary, which will make the FIPS 140-3 integrity self-check fail. Disable FIPS 140-3 mode when running the modified binary. Change-Id: I6a6a46566a38f8c44f996f6e1155dac5f67c56e6 Reviewed-on: https://go-review.googlesource.com/c/go/+/658915 Reviewed-by: Daniel McCarney <daniel@binaryparadox.net> 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>
Diffstat (limited to 'src')
-rw-r--r--src/cmd/compile/internal/amd64/versions_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/amd64/versions_test.go b/src/cmd/compile/internal/amd64/versions_test.go
index 92365fb365..15395fc5e5 100644
--- a/src/cmd/compile/internal/amd64/versions_test.go
+++ b/src/cmd/compile/internal/amd64/versions_test.go
@@ -75,7 +75,8 @@ func TestGoAMD64v1(t *testing.T) {
cmd := testenv.Command(t, dst.Name())
testenv.CleanCmdEnv(cmd)
cmd.Env = append(cmd.Env, "TESTGOAMD64V1=yes")
- cmd.Env = append(cmd.Env, fmt.Sprintf("GODEBUG=%s", strings.Join(features, ",")))
+ // Disable FIPS 140-3 mode, since it would detect the modified binary.
+ cmd.Env = append(cmd.Env, fmt.Sprintf("GODEBUG=%s,fips140=off", strings.Join(features, ",")))
out, err := cmd.CombinedOutput()
if err != nil {
t.Fatalf("couldn't execute test: %s\n%s", err, out)