bpf/tests: Add exhaustive tests of ALU register combinations
authorJohan Almbladh <johan.almbladh@anyfinetworks.com>
Fri, 1 Oct 2021 13:03:45 +0000 (15:03 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 1 Oct 2021 15:04:26 +0000 (17:04 +0200)
commitdaed6083f4fbcbb57da26d80f15365219ae793de
treed7f0117b0e718efeae58ce77050c64b98c1db8f1
parente42fc3c2c40e0fb9d371c146dc8c0a70bee88a3c
bpf/tests: Add exhaustive tests of ALU register combinations

This patch replaces the current register combination test with new
exhaustive tests. Before, only a subset of register combinations was
tested for ALU64 DIV. Now, all combinatons of operand registers are
tested, including the case when they are the same, and for all ALU32
and ALU64 operations.

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-8-johan.almbladh@anyfinetworks.com
lib/test_bpf.c