]> 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)
commitf0960404d9a5d0254eed59bea81948bec528c253
tree670265d3ba29ecb6cf7f9826bc18bc5c293a3061
parentc542a932156a67db6f3ac5121c242e3e5822e629
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