[PATCH bpf-next v2 0/3] selftests/bpf: fix for veristat file/prog filters processing
Eduard Zingerman <[email protected]>
| Newsgroups | org.kernel.vger.bpf |
|---|---|
| Message-ID | <[email protected]> |
At the moment veristat filtering behaves unexpectedly for the following filter expression: -f !file/prog The expression rejects all programs with name 'prog', and all programs in a file with name 'file'. Fix the expression to exclude only a program 'prog' from a file 'file', also add a set of tests to exercise filtering logic. Changelog: v1 -> v2: - added fixes tag for patch #1 (bot+bpf-ci); - extended test cases for '!*foo*' and '*foo*' filters in patch #2 (bot+bpf-ci); - added patch #3, replacing direct read() calls with calls to read_output(), guaranteeing input buffer null termination (bot+bpf-ci). v1: https://lore.kernel.org/bpf/[email protected]/ --- Eduard Zingerman (3): selftests/bpf: fix for veristat file/prog filters processing selftests/bpf: exercise veristat filtering logic in a selftest selftests/bpf: guarantee zero termination for veristat test buffers .../selftests/bpf/prog_tests/test_veristat.c | 113 +++++++++++++++++++-- tools/testing/selftests/bpf/progs/veristat_bar.c | 3 + tools/testing/selftests/bpf/progs/veristat_foo.c | 31 ++++++ tools/testing/selftests/bpf/veristat.c | 76 +++++++++----- 4 files changed, 190 insertions(+), 33 deletions(-) --- base-commit: d114bb98936770c501c958bf2bc5fb6b7c0bad7b change-id: 20260811-veristat-filter-fix-920cff2a288a