Skip to content

Commit

Permalink
sync/atomic: don't run 64-bit uintptr tests on 32-bit systems
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Bryan Mills <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
Run-TryBot: Ian Lance Taylor <[email protected]>
Auto-Submit: Ian Lance Taylor <[email protected]>
  • Loading branch information
ianlancetaylor authored and gopherbot committed May 6, 2022
1 parent f99511d commit 7dd9884
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sync/atomic/atomic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}

Expand Down

0 comments on commit 7dd9884

Please sign in to comment.