]> 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)
commitf1e4371c783f3525b999c062f32f029b1b989056
tree775e78cf75d479563c91b20e87658c467c22a54b
parent8232ca68f0291b23d893cbc6f8ab25b19e34d8e6
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