From 7a6e5648d140666db5d920909e082ca00a87ba2c Mon Sep 17 00:00:00 2001 From: Steven Hartland Date: Wed, 1 Feb 2017 04:15:14 +0000 Subject: [PATCH] unix: fix SysctlUint64 on 32bit machines TestSysctlUint64 was using vm.max_kernel_address which is only 64bit on 64bit machines or 32bit machines with PAE. Switch to using security.mac.labeled which is a SYSCTL_UQUAD so 64bit on all platforms. Also: * Correct typo in test name. Fixes golang/go#15186 Change-Id: I88b5b6ee6a04dec0730bca1e1f0e282f3c18d20d Reviewed-on: https://go-review.googlesource.com/36058 Reviewed-by: Ian Lance Taylor Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot --- unix/syscall_freebsd_test.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/unix/syscall_freebsd_test.go b/unix/syscall_freebsd_test.go index cd13080a..3c3d8258 100644 --- a/unix/syscall_freebsd_test.go +++ b/unix/syscall_freebsd_test.go @@ -7,18 +7,14 @@ package unix_test import ( - "os" "testing" "golang.org/x/sys/unix" ) -func TestSysctUint64(t *testing.T) { - _, err := unix.SysctlUint64("vm.max_kernel_address") +func TestSysctlUint64(t *testing.T) { + _, err := unix.SysctlUint64("security.mac.labeled") if err != nil { - if os.Getenv("GO_BUILDER_NAME") == "freebsd-386-gce101" { - t.Skipf("Ignoring known failing test (golang.org/issue/15186). Failed with: %v", err) - } t.Fatal(err) } }