selftests/bpf: Add tests for non-constant cond_op NE/EQ bound deduction
authorYonghong Song <yhs@fb.com>
Thu, 6 Apr 2023 16:45:00 +0000 (09:45 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 6 Apr 2023 22:26:08 +0000 (15:26 -0700)
commitaec08d677b4d0adeb7412fa98547cf07bfce6fea
treeca847d1fac4f305e9ec5d3a95993ad8f51a4f8b4
parent13fbcee55706db45ce047a7cea14811d68f94ee3
selftests/bpf: Add tests for non-constant cond_op NE/EQ bound deduction

Add various tests for code pattern '<non-const> NE/EQ <const>' implemented
in the previous verifier patch. Without the verifier patch, these new
tests will fail.

Signed-off-by: Yonghong Song <yhs@fb.com>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20230406164500.1045715-1-yhs@fb.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/verifier.c
tools/testing/selftests/bpf/progs/verifier_bounds_deduction_non_const.c [new file with mode: 0644]