]> Cypherpunks repositories - gostls13.git/commitdiff
sync/atomic: don't run 64-bit uintptr tests on 32-bit systems
authorIan Lance Taylor <iant@golang.org>
Fri, 6 May 2022 00:04:52 +0000 (17:04 -0700)
committerGopher Robot <gobot@golang.org>
Fri, 6 May 2022 02:40:50 +0000 (02:40 +0000)
The tests don't work on big-endian systems. This change handles more
of the tests added in CL 381317 like the other existing tests.

Fixes #52723

Change-Id: Ie9e048e75dbe0b5aca61b51cd0c50d7d878ff6d6
Reviewed-on: https://go-review.googlesource.com/c/go/+/404495
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>

src/sync/atomic/atomic_test.go

index ef0a5d990e0a53bc360ba8b1f46f83f1182c52d9..02d55fbc1974c75a46cee18f9abdb28e8a40759d 100644 (file)
@@ -1787,8 +1787,11 @@ func init() {
        if uintptr(v) == 0 {
                // 32-bit system; clear uintptr tests
                delete(hammer64, "SwapUintptr")
+               delete(hammer64, "SwapUintptrMethod")
                delete(hammer64, "AddUintptr")
+               delete(hammer64, "AddUintptrMethod")
                delete(hammer64, "CompareAndSwapUintptr")
+               delete(hammer64, "CompareAndSwapUintptrMethod")
        }
 }