bpf, tests: Add tests for BPF_CMPXCHG
authorJohan Almbladh <johan.almbladh@anyfinetworks.com>
Mon, 9 Aug 2021 09:18:28 +0000 (11:18 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 10 Aug 2021 09:33:32 +0000 (11:33 +0200)
commit6a3b24ca489ea01d5b4d5a2539e75dfb5e1e18be
tree670265d3ba29ecb6cf7f9826bc18bc5c293a3061
parente4517b3637c648b215307e3343900ec675fde607
bpf, tests: Add tests for BPF_CMPXCHG

Tests for BPF_CMPXCHG with both word and double word operands. As with
the tests for other atomic operations, these tests only check the result
of the arithmetic operation. The atomicity of the operations is not tested.

Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20210809091829.810076-14-johan.almbladh@anyfinetworks.com
lib/test_bpf.c