selftests/bpf: Fix endianness issues in atomic tests
Atomic tests store a DW, but then load it back as a W from the same address. This doesn't work on big-endian systems, and since the point of those tests is not testing narrow loads, fix simply by loading a DW. Fixes: 98d666d0 ("bpf: Add tests for new BPF atomic operations") Signed-off-by:Ilya Leoshkevich <iii@linux.ibm.com> Signed-off-by:
Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20210210020713.77911-1-iii@linux.ibm.com
Showing
- tools/testing/selftests/bpf/verifier/atomic_and.c 1 addition, 1 deletiontools/testing/selftests/bpf/verifier/atomic_and.c
- tools/testing/selftests/bpf/verifier/atomic_or.c 1 addition, 1 deletiontools/testing/selftests/bpf/verifier/atomic_or.c
- tools/testing/selftests/bpf/verifier/atomic_xor.c 1 addition, 1 deletiontools/testing/selftests/bpf/verifier/atomic_xor.c
Loading
Please register or sign in to comment