mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-31 14:26:40 -04:00
unix: skip broken test on OpenBSD
OpenBSD (and likely NetBSD, but it's not enabled for these tests anyway) use a different sysctl API for fetching process information than FreeBSD and its derivatives. Change-Id: Id2ab10f170b788ba4d9bd45d3347f530555da23b Reviewed-on: https://go-review.googlesource.com/19232 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
package unix_test
|
package unix_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"runtime"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
@@ -35,6 +36,10 @@ func TestGetfsstat(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestSysctlRaw(t *testing.T) {
|
func TestSysctlRaw(t *testing.T) {
|
||||||
|
if runtime.GOOS == "openbsd" {
|
||||||
|
t.Skip("kern.proc.pid does not exist on OpenBSD")
|
||||||
|
}
|
||||||
|
|
||||||
_, err := unix.SysctlRaw("kern.proc.pid", unix.Getpid())
|
_, err := unix.SysctlRaw("kern.proc.pid", unix.Getpid())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
|||||||
Reference in New Issue
Block a user