OSDN Git Service

bpf/tests: Add exhaustive tests of BPF_ATOMIC magnitudes
authorJohan Almbladh <johan.almbladh@anyfinetworks.com>
Fri, 1 Oct 2021 13:03:41 +0000 (15:03 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 1 Oct 2021 15:04:25 +0000 (17:04 +0200)
commitf68e8efd7fa506928432b8cd41b8c7d91d804e02
tree04dafd757aabb1d50454f5e5c2d02ca76fc6eaee
parent89b63462765cc0370f22ebec53d3e83cbbb17613
bpf/tests: Add exhaustive tests of BPF_ATOMIC magnitudes

This patch adds a series of test to verify the operation of BPF_ATOMIC
with BPF_DW and BPF_W sizes, for all power-of-two magnitudes of the
register value operand.

Also fixes a confusing typo in the comment for a related test.

Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20211001130348.3670534-4-johan.almbladh@anyfinetworks.com
lib/test_bpf.c