selftests/bpf: add range x range test to reg_bounds
authorAndrii Nakryiko <andrii@kernel.org>
Sun, 12 Nov 2023 01:06:05 +0000 (17:06 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 15 Nov 2023 20:03:42 +0000 (12:03 -0800)
commit2b0d204e368b306d4db894749947ed591b667ec5
tree945d7b212d428d0d4100a89db98f5d8db96849b1
parent774f94c5e74d86d554c4fd1e97c517a1a7ee7fe0
selftests/bpf: add range x range test to reg_bounds

Now that verifier supports range vs range bounds adjustments, validate
that by checking each generated range against every other generated
range, across all supported operators (everything by JSET).

We also add few cases that were problematic during development either
for verifier or for selftest's range tracking implementation.

Note that we utilize the same trick with splitting everything into
multiple independent parallelizable tests, but init_t and cond_t. This
brings down verification time in parallel mode from more than 8 hours
down to less that 1.5 hours. 106 million cases were successfully
validate for range vs range logic, in addition to about 7 million range
vs const cases, added in earlier patch.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20231112010609.848406-10-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/reg_bounds.c