mirror of
https://github.com/golang/sys.git
synced 2026-02-08 19:56:04 +03:00
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>
21 lines
375 B
Go
21 lines
375 B
Go
// Copyright 2014 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.
|
|
|
|
// +build freebsd
|
|
|
|
package unix_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"golang.org/x/sys/unix"
|
|
)
|
|
|
|
func TestSysctlUint64(t *testing.T) {
|
|
_, err := unix.SysctlUint64("security.mac.labeled")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
}
|