mirror of
https://github.com/golang/sys.git
synced 2026-02-08 11:46:04 +03:00
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 <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
committed by
Ian Lance Taylor
parent
d75a526598
commit
7a6e5648d1
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user