selftests/bpf: Add verifier tests for code pattern '<const> <cond_op> <non_const>'
authorYonghong Song <yhs@fb.com>
Thu, 6 Apr 2023 16:45:10 +0000 (09:45 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 6 Apr 2023 22:26:08 +0000 (15:26 -0700)
commit23a88fae9f20d47bb3aed99b1e08d0d6cf65cf0c
tree048adeb70d56194baed0acf38432ee29ae2747d6
parent953d9f5beaf75e88c69a13d70ce424cd606a29f5
selftests/bpf: Add verifier tests for code pattern '<const> <cond_op> <non_const>'

Add various tests for code pattern '<const> <cond_op> <non_const>' to
exercise the previous verifier patch.

The following are veristat changed number of processed insns stat
comparing the previous patch vs. this patch:

File                                                   Program                                               Insns (A)  Insns (B)  Insns  (DIFF)
-----------------------------------------------------  ----------------------------------------------------  ---------  ---------  -------------
test_seg6_loop.bpf.linked3.o                           __add_egr_x                                               12423      12314  -109 (-0.88%)

Only one program is affected with minor change.

Signed-off-by: Yonghong Song <yhs@fb.com>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20230406164510.1047757-1-yhs@fb.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/progs/verifier_bounds_deduction_non_const.c