From 7dd988456247c66f2ae62a82e8d8fa0d843710d1 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 5 May 2022 17:04:52 -0700 Subject: [PATCH] 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 --- src/sync/atomic/atomic_test.go | 3 +++ 1 file changed, 3 insertions(+) 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") } } -- 2.50.0