diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2022-11-02 22:53:00 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2022-11-03 21:54:13 -0700 |
commit | 1bb4ec815015609c9458d5ffeb5c8cc95b7d44d6 (patch) | |
tree | 13d0f0b087a52d696220e0927e11e72227c65e39 /kernel/bpf/arraymap.c | |
parent | d68c07e2dd91c3e8bc451ecb218b77da2635cdd4 (diff) |
selftests/bpf: support simple filtering of stats in veristat
Define simple expressions to filter not just by file and program name,
but also by resulting values of collected stats. Support usual
equality and inequality operators. Verdict, which is a boolean-like
field can be also filtered either as 0/1, failure/success (with f/s,
fail/succ, and failure/success aliases) symbols, or as false/true (f/t).
Aliases are case insensitive.
Currently this filtering is honored only in verification and replay
modes. Comparison mode support will be added in next patch.
Here's an example of verifying a bunch of BPF object files and emitting
only results for successfully validated programs that have more than 100
total instructions processed by BPF verifier, sorted by number of
instructions in ascending order:
$ sudo ./veristat *.bpf.o -s insns^ -f 'insns>100'
There can be many filters (both allow and deny flavors), all of them are
combined.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20221103055304.2904589-7-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/bpf/arraymap.c')
0 files changed, 0 insertions, 0 deletions