golang.org/x/sys@v0.20.1-0.20240517151509-673e0f94c16d/cpu/runtime_auxv_go121_test.go (about) 1 // Copyright 2023 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 //go:build go1.21 6 7 package cpu 8 9 import ( 10 "runtime" 11 "testing" 12 ) 13 14 func TestAuxvFromRuntime(t *testing.T) { 15 got := getAuxv() 16 t.Logf("got: %v", got) // notably: we didn't panic 17 if runtime.GOOS == "linux" && len(got) == 0 { 18 t.Errorf("expected auxv on linux; got zero entries") 19 } 20 }