diff options
| author | Tobias Klauser <tklauser@distanz.ch> | 2018-09-17 17:22:48 +0200 |
|---|---|---|
| committer | Tobias Klauser <tobias.klauser@gmail.com> | 2018-09-17 16:22:04 +0000 |
| commit | 5eec2373e492081132cf374daa494264df923c98 (patch) | |
| tree | 7575c24508047e86cb50e8c36c1342a9b65ffb94 /src/syscall/syscall_linux_test.go | |
| parent | 623c772814cdae562afb4c63c62d51a228bc672e (diff) | |
| download | go-5eec2373e492081132cf374daa494264df923c98.tar.xz | |
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>
Diffstat (limited to 'src/syscall/syscall_linux_test.go')
| -rw-r--r-- | src/syscall/syscall_linux_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/syscall/syscall_linux_test.go b/src/syscall/syscall_linux_test.go index 1fd70b07e3..293549a841 100644 --- a/src/syscall/syscall_linux_test.go +++ b/src/syscall/syscall_linux_test.go @@ -19,6 +19,7 @@ import ( "syscall" "testing" "time" + "unsafe" ) // 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 // a value larger than 0xfffffffffffff001 so we could test RawSyscall // 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") } |
