From 7764c502e28e42279d033719b058690ca8fbaa44 Mon Sep 17 00:00:00 2001 From: Filippo Valsorda Date: Fri, 10 Jan 2025 00:06:43 +0100 Subject: [PATCH] crypto/internal/sysrand: skip TestNoGetrandom without cgo 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 LUCI-TryBot-Result: Go LUCI Reviewed-by: Ian Lance Taylor Auto-Submit: Roland Shoemaker Auto-Submit: Filippo Valsorda Reviewed-by: Roland Shoemaker --- src/crypto/internal/sysrand/rand_linux_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/crypto/internal/sysrand/rand_linux_test.go b/src/crypto/internal/sysrand/rand_linux_test.go index 417523c29d..ab43904f91 100644 --- a/src/crypto/internal/sysrand/rand_linux_test.go +++ b/src/crypto/internal/sysrand/rand_linux_test.go @@ -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 ( -- 2.48.1