]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit2ce9f8ba35a02448690a524ef8f160666a47c380
tree670265d3ba29ecb6cf7f9826bc18bc5c293a3061
parente6a79ac32f68b6701a461649a44c732ea7df46f0
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