mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-02 15:17:31 -04:00
unix: add Auxv
Fixes golang/go#67839 Change-Id: I3af38d21159f7cac3786b49ac17657d314fbc178 Reviewed-on: https://go-review.googlesource.com/c/sys/+/644295 Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com>
This commit is contained in:
committed by
Gopher Robot
parent
b215a1c6fc
commit
4d4692e1b0
@@ -0,0 +1,23 @@
|
||||
// Copyright 2025 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build go1.21 && linux
|
||||
|
||||
package unix_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
func TestAuxv(t *testing.T) {
|
||||
vec, err := unix.Auxv()
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
if len(vec) == 0 {
|
||||
t.Errorf("got zero auxv entries on linux, expected > 0")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user