diff options
| author | Vladimir Stefanovic <vladimir.stefanovic@imgtec.com> | 2016-10-18 23:51:06 +0200 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2016-11-03 22:48:09 +0000 |
| commit | 9788e3d4d72792da22a12e54f8a86e25a03b58ab (patch) | |
| tree | 02f4cc8e4d70e5e4a6714633367dea5e248d1c16 /src/sync/atomic/atomic_test.go | |
| parent | b241a06479864b85c2377e52b775b176f686e192 (diff) | |
| download | go-9788e3d4d72792da22a12e54f8a86e25a03b58ab.tar.xz | |
sync/atomic: add support for GOARCH=mips{,le}
Change-Id: I10f36710dd95b9bd31b3b82a3c32edcadb90ffa9
Reviewed-on: https://go-review.googlesource.com/31510
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/sync/atomic/atomic_test.go')
| -rw-r--r-- | src/sync/atomic/atomic_test.go | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/sync/atomic/atomic_test.go b/src/sync/atomic/atomic_test.go index 4f44f48f51..a230d63329 100644 --- a/src/sync/atomic/atomic_test.go +++ b/src/sync/atomic/atomic_test.go @@ -1389,12 +1389,15 @@ func TestUnaligned64(t *testing.T) { // Unaligned 64-bit atomics on 32-bit systems are // a continual source of pain. Test that on 32-bit systems they crash // instead of failing silently. - if unsafe.Sizeof(int(0)) != 4 { - t.Skip("test only runs on 32-bit systems") - } - if runtime.GOARCH == "amd64p32" { - // amd64p32 can handle unaligned atomics. - t.Skip("test not needed on amd64p32") + + switch runtime.GOARCH { + default: + if unsafe.Sizeof(int(0)) != 4 { + t.Skip("test only runs on 32-bit systems") + } + case "amd64p32", "mips", "mipsle": + // amd64p32 and mips can handle unaligned atomics. + t.Skipf("test not needed on %v", runtime.GOARCH) } x := make([]uint32, 4) |
