veristat: add ability to set BPF_F_TEST_SANITY_STRICT flag with -r flag
authorAndrii Nakryiko <andrii@kernel.org>
Sun, 12 Nov 2023 01:06:08 +0000 (17:06 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 15 Nov 2023 20:03:43 +0000 (12:03 -0800)
commita5c57f81eb2b5d6de4f46e47fd85be50d179bfd8
treeec6cd2995fed010ef99ecf1ca17b404c9db9134f
parent8c5677f8b31e92b57be7d5d0fbb1ac66eedf4f91
veristat: add ability to set BPF_F_TEST_SANITY_STRICT flag with -r flag

Add a new flag -r (--test-sanity), similar to -t (--test-states), to add
extra BPF program flags when loading BPF programs.

This allows to use veristat to easily catch sanity violations in
production BPF programs.

reg_bounds tests are also enforcing BPF_F_TEST_SANITY_STRICT flag now.

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