From: Ian Lance Taylor Date: Fri, 6 May 2022 00:04:52 +0000 (-0700) Subject: sync/atomic: don't run 64-bit uintptr tests on 32-bit systems X-Git-Tag: go1.19beta1~386 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=7dd988456247c66f2ae62a82e8d8fa0d843710d1;p=gostls13.git sync/atomic: don't run 64-bit uintptr tests on 32-bit systems 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 Reviewed-by: Bryan Mills Reviewed-by: Ian Lance Taylor Run-TryBot: Ian Lance Taylor Auto-Submit: Ian Lance Taylor --- diff --git a/src/sync/atomic/atomic_test.go b/src/sync/atomic/atomic_test.go index ef0a5d990e..02d55fbc19 100644 --- a/src/sync/atomic/atomic_test.go +++ b/src/sync/atomic/atomic_test.go @@ -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") } }