]> git.baikalelectronics.ru Git - kernel.git/commit
bpf/tests: Add exhaustive tests of ALU operand magnitudes
authorJohan Almbladh <johan.almbladh@anyfinetworks.com>
Tue, 14 Sep 2021 09:18:32 +0000 (11:18 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 28 Sep 2021 07:26:28 +0000 (09:26 +0200)
commit4de910b75609c5143f246ee2404de3b4115385c2
tree775e78cf75d479563c91b20e87658c467c22a54b
parentd5787d4e07fabaeefcc4c714b0710adaffffc255
bpf/tests: Add exhaustive tests of ALU operand magnitudes

This patch adds a set of tests for ALU64 and ALU32 arithmetic and bitwise
logical operations to verify correctness for all possible magnitudes of
the register and immediate operands. Mainly intended for JIT testing.

The patch introduces a pattern generator that can be used to drive
extensive tests of different kinds of operations. It is parameterized
to allow tuning of the operand combinations to test.

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