]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/internal/sysrand: skip TestNoGetrandom without cgo
authorFilippo Valsorda <filippo@golang.org>
Thu, 9 Jan 2025 23:06:43 +0000 (00:06 +0100)
committerGopher Robot <gobot@golang.org>
Tue, 28 Jan 2025 22:19:31 +0000 (14:19 -0800)
crypto/internal/sysrand/internal/seccomp needs cgo to disable getrandom.
Before this change, "CGO_ENABLED=0 go test crypto/internal/sysrand"
would fail on Linux.

Change-Id: I6a6a465685b480c846e5479da0659e90ab7f3a65
Reviewed-on: https://go-review.googlesource.com/c/go/+/642737
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Roland Shoemaker <roland@golang.org>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
src/crypto/internal/sysrand/rand_linux_test.go

index 417523c29ddc9f890eead7fe216781537d2e6c3f..ab43904f91296f4609024f55f5636a253c6d039e 100644 (file)
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build cgo
+
 package sysrand_test
 
 import (