mbox series

[bpf-next,0/4] Parallelize verif_scale selftests

Message ID 20211022223228.99920-1-andrii@kernel.org (mailing list archive)
Headers show
Series Parallelize verif_scale selftests | expand

Message

Andrii Nakryiko Oct. 22, 2021, 10:32 p.m. UTC
Reduce amount of waiting time when running test_progs in parallel mode (-j) by
splitting bpf_verif_scale selftests into multiple tests. Previously it was
structured as a test with multiple subtests, but subtests are not easily
parallelizable with test_progs' infra. Also in practice each scale subtest is
really an independent test with nothing shared across all substest.

This patch set changes how test_progs test discovery works. Now it is possible
to define multiple tests within a single source code file. One of the patches
also marks tc_redirect selftests as serial, because it's extremely harmful to
the test system when run in parallel mode.

Andrii Nakryiko (4):
  selftests/bpf: normalize selftest entry points
  selftests/bpf: support multiple tests per file
  selftests/bpf: mark tc_redirect selftest as serial
  selftests/bpf: split out bpf_verif_scale selftests into multiple tests

 tools/testing/selftests/bpf/Makefile          |   7 +-
 .../bpf/prog_tests/bpf_verif_scale.c          | 220 ++++++++++++------
 .../selftests/bpf/prog_tests/btf_dump.c       |   2 +-
 .../selftests/bpf/prog_tests/resolve_btfids.c |  10 +-
 .../selftests/bpf/prog_tests/signal_pending.c |   2 +-
 .../selftests/bpf/prog_tests/snprintf.c       |   4 +-
 .../selftests/bpf/prog_tests/tc_redirect.c    |   2 +-
 .../bpf/prog_tests/xdp_adjust_tail.c          |   6 +-
 .../bpf/prog_tests/xdp_devmap_attach.c        |   4 +-
 9 files changed, 169 insertions(+), 88 deletions(-)

Comments

sunyucong@gmail.com Oct. 25, 2021, 8:15 p.m. UTC | #1
Thanks, this patch is awesome!

Acked-by: Yucong Sun <sunyucong@gmail.com>


On Fri, Oct 22, 2021 at 3:33 PM Andrii Nakryiko <andrii@kernel.org> wrote:
>
> Reduce amount of waiting time when running test_progs in parallel mode (-j) by
> splitting bpf_verif_scale selftests into multiple tests. Previously it was
> structured as a test with multiple subtests, but subtests are not easily
> parallelizable with test_progs' infra. Also in practice each scale subtest is
> really an independent test with nothing shared across all substest.
>
> This patch set changes how test_progs test discovery works. Now it is possible
> to define multiple tests within a single source code file. One of the patches
> also marks tc_redirect selftests as serial, because it's extremely harmful to
> the test system when run in parallel mode.
>
> Andrii Nakryiko (4):
>   selftests/bpf: normalize selftest entry points
>   selftests/bpf: support multiple tests per file
>   selftests/bpf: mark tc_redirect selftest as serial
>   selftests/bpf: split out bpf_verif_scale selftests into multiple tests
>
>  tools/testing/selftests/bpf/Makefile          |   7 +-
>  .../bpf/prog_tests/bpf_verif_scale.c          | 220 ++++++++++++------
>  .../selftests/bpf/prog_tests/btf_dump.c       |   2 +-
>  .../selftests/bpf/prog_tests/resolve_btfids.c |  10 +-
>  .../selftests/bpf/prog_tests/signal_pending.c |   2 +-
>  .../selftests/bpf/prog_tests/snprintf.c       |   4 +-
>  .../selftests/bpf/prog_tests/tc_redirect.c    |   2 +-
>  .../bpf/prog_tests/xdp_adjust_tail.c          |   6 +-
>  .../bpf/prog_tests/xdp_devmap_attach.c        |   4 +-
>  9 files changed, 169 insertions(+), 88 deletions(-)
>
> --
> 2.30.2
>
Alexei Starovoitov Oct. 26, 2021, 1:12 a.m. UTC | #2
On Mon, Oct 25, 2021 at 1:15 PM sunyucong@gmail.com <sunyucong@gmail.com> wrote:
>
> Thanks, this patch is awesome!
>
> Acked-by: Yucong Sun <sunyucong@gmail.com>
>
>
> On Fri, Oct 22, 2021 at 3:33 PM Andrii Nakryiko <andrii@kernel.org> wrote:
> >
> > Reduce amount of waiting time when running test_progs in parallel mode (-j) by
> > splitting bpf_verif_scale selftests into multiple tests. Previously it was
> > structured as a test with multiple subtests, but subtests are not easily
> > parallelizable with test_progs' infra. Also in practice each scale subtest is
> > really an independent test with nothing shared across all substest.
> >
> > This patch set changes how test_progs test discovery works. Now it is possible
> > to define multiple tests within a single source code file. One of the patches
> > also marks tc_redirect selftests as serial, because it's extremely harmful to
> > the test system when run in parallel mode.

The patch set was applied.