selftests/bpf: Allow prog name matching for tests with __description
Subsystems (3)
Kumar Kartikeya Dwivedi
maintainerPATCH 1/1 selftests/bpf: Allow prog name matching for tests with __description
For tests that carry a __description tag, allow matching on both the description string and program name for convenience. Before this commit, the description string must be spelt out to filter the tests.
Suggested-by Alexei Starovoitov <[email protected]>
Signed-off-by Kumar Kartikeya Dwivedi <[email protected]>
--- tools/testing/selftests/bpf/progs/bpf_misc.h | 4 +- tools/testing/selftests/bpf/test_loader.c | 46 ++++++++++++++++---- tools/testing/selftests/bpf/test_progs.c | 45 +++++++++++++++---- tools/testing/selftests/bpf/test_progs.h | 1 + 4 files changed, 76 insertions(+), 20 deletions(-)
tools/testing/selftests/bpf/progs/bpf_misc.h +2 -2
@@ -103,8 +103,8 @@* - TEST_DATA_LEN * __retval_unpriv Same, but load program in unprivileged mode. * -* __description Text to be used instead of a program name for display -* and filtering purposes. +* __description Text to be used for display and as an additional filter +* alias, while the original program name stays matchable. * * __log_level Log level to use for the program, numeric value expected. *
tools/testing/selftests/bpf/test_loader.c +37 -9
92 lines not on this page · raw message
tools/testing/selftests/bpf/test_progs.c +36 -9
90 lines not on this page · raw message
tools/testing/selftests/bpf/test_progs.h +1 -0
@@ -181,6 +181,7 @@ struct msg {extern struct test_env env;void test__force_log (void ); +bool test__start_subtest_with_desc (const char *name,const char *description);bool test__start_subtest (const char *name);void test__end_subtest (void );void test__skip (void );
--
2.52.0