mirror of
https://github.com/golang/go
synced 2024-11-14 08:30:25 -07:00
syscall: enable TestSyscallNoError on all Linux 32-bit architectures
Check the size of uintptr instead of listing GOARCHes explicitly. This will make the test also run on linux/mips{,le}. Change-Id: I649f15d293002afc1360b1913910202c3e5188b7 Reviewed-on: https://go-review.googlesource.com/135715 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
623c772814
commit
5eec2373e4
@ -19,6 +19,7 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
// chtmpdir changes the working directory to a new temporary directory and
|
// chtmpdir changes the working directory to a new temporary directory and
|
||||||
@ -294,7 +295,7 @@ func TestSyscallNoError(t *testing.T) {
|
|||||||
// On Linux there are currently no syscalls which don't fail and return
|
// On Linux there are currently no syscalls which don't fail and return
|
||||||
// a value larger than 0xfffffffffffff001 so we could test RawSyscall
|
// a value larger than 0xfffffffffffff001 so we could test RawSyscall
|
||||||
// vs. RawSyscallNoError on 64bit architectures.
|
// vs. RawSyscallNoError on 64bit architectures.
|
||||||
if runtime.GOARCH != "386" && runtime.GOARCH != "arm" {
|
if unsafe.Sizeof(uintptr(0)) != 4 {
|
||||||
t.Skip("skipping on non-32bit architecture")
|
t.Skip("skipping on non-32bit architecture")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user