mbox series

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

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

Message

Jesper Dangaard Brouer July 1, 2020, 9:44 p.m. UTC
V3: Reorder patches to cause less code churn.

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 indicate to shell on non-actions
      selftests/bpf: test_progs option for getting number of tests
      selftests/bpf: test_progs option for listing test names


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

--

Comments

Alexei Starovoitov July 1, 2020, 10:22 p.m. UTC | #1
On Wed, Jul 1, 2020 at 2:44 PM Jesper Dangaard Brouer <brouer@redhat.com> wrote:
>
> V3: Reorder patches to cause less code churn.
>
> 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

Applied. Thanks