]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Improve by-name subtest selection logic in prog_tests
authorMykola Lysenko <mykolal@fb.com>
Sat, 9 Apr 2022 00:17:49 +0000 (17:17 -0700)
committerAndrii Nakryiko <andrii@kernel.org>
Mon, 11 Apr 2022 03:08:20 +0000 (20:08 -0700)
commitabd1e5c9c7db100b2d1521e6f5441105b1f8637f
treea35a8d89fedb8542d3238d04c98943bc3021743a
parent3d0a264150827ee90aef2674740e6de3e7dea204
selftests/bpf: Improve by-name subtest selection logic in prog_tests

Improve subtest selection logic when using -t/-a/-d parameters.
In particular, more than one subtest can be specified or a
combination of tests / subtests.

-a send_signal -d send_signal/send_signal_nmi* - runs send_signal
test without nmi tests

-a send_signal/send_signal_nmi*,find_vma - runs two send_signal
subtests and find_vma test

-a 'send_signal*' -a find_vma -d send_signal/send_signal_nmi* -
runs 2 send_signal test and find_vma test. Disables two send_signal
nmi subtests

-t send_signal -t find_vma - runs two *send_signal* tests and one
*find_vma* test

This will allow us to have granular control over which subtests
to disable in the CI system instead of disabling whole tests.

Also, add new selftest to avoid possible regression when
changing prog_test test name selection logic.

Signed-off-by: Mykola Lysenko <mykolal@fb.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220409001750.529930-1-mykolal@fb.com
tools/testing/selftests/bpf/prog_tests/arg_parsing.c [new file with mode: 0644]
tools/testing/selftests/bpf/test_progs.c
tools/testing/selftests/bpf/test_progs.h
tools/testing/selftests/bpf/testing_helpers.c
tools/testing/selftests/bpf/testing_helpers.h