mbox series

[bpf-next,V2,0/3] BPF selftests test runner test_progs improvement for scripting

Message ID 159363468114.929474.3089726346933732131.stgit@firesoul
Headers show
Series BPF selftests test runner test_progs improvement for scripting | expand


Jesper Dangaard Brouer July 1, 2020, 8:18 p.m. UTC
The BPF selftest 'test_progs' contains many tests, that cover all the
different areas of the kernel where BPF is used.  The CI system sees this
as one test, which is impractical for identifying what team/engineer is
responsible for debugging the problem.

This patchset add some options that makes it easier to create a shell
for-loop that invoke each (top-level) test avail in test_progs. Then each
test FAIL/PASS result can be presented the CI system to have a separate
bullet. (For Red Hat use-case in Beaker https://beaker-project.org/)

Created a public script[1] that uses these features in an advanced way.
Demonstrating howto reduce the number of (top-level) tests by grouping tests
together via using the existing test pattern selection feature, and then
using the new --list feature combined with exclude (-b) to get a list of
remaining test names that was not part of the groups.

[1] https://github.com/netoptimizer/prototype-kernel/blob/master/scripts/bpf_selftests_grouping.sh


Jesper Dangaard Brouer (3):
      selftests/bpf: test_progs option for getting number of tests
      selftests/bpf: test_progs option for listing test names
      selftests/bpf: test_progs indicate to shell on non-actions

 tools/testing/selftests/bpf/test_progs.c |   37 ++++++++++++++++++++++++++++++
 tools/testing/selftests/bpf/test_progs.h |    2 ++
 2 files changed, 39 insertions(+)