From 50c6bc5e4292a1d4e65c6e9be5f53be28bcbe28e Mon Sep 17 00:00:00 2001 From: Matthew Dempsky Date: Thu, 4 Feb 2016 14:46:46 -0800 Subject: [PATCH] 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 Reviewed-by: Ian Lance Taylor --- unix/syscall_bsd_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/unix/syscall_bsd_test.go b/unix/syscall_bsd_test.go index 0bcd741f..2ad51290 100644 --- a/unix/syscall_bsd_test.go +++ b/unix/syscall_bsd_test.go @@ -7,6 +7,7 @@ package unix_test import ( + "runtime" "testing" "golang.org/x/sys/unix" @@ -35,6 +36,10 @@ func TestGetfsstat(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()) if err != nil { t.Fatal(err)