selftests/bpf: Support glob matching for test selector.
authorYucong Sun <fallentree@fb.com>
Tue, 17 Aug 2021 04:47:32 +0000 (21:47 -0700)
committerAndrii Nakryiko <andrii@kernel.org>
Tue, 17 Aug 2021 18:31:29 +0000 (11:31 -0700)
commit74339a8f866cdcca3f701c859b43b538890d905b
tree66046b3c7226da4f6ede6d10ab5d0ac30383e3b0
parent99c4fd8b92b3dc6db1afa0e252d3054d501a03ca
selftests/bpf: Support glob matching for test selector.

This patch adds '-a' and '-d' arguments supporting both exact string match as
well as using '*' wildcard in test/subtests selection. '-a' and '-t' can
co-exists, same as '-d' and '-b', in which case they just add to the list of
allowed or denied test selectors.

Caveat: Same as the current substring matching mechanism, test and subtest
selector applies independently, 'a*/b*' will execute all tests matching "a*",
and with subtest name matching "b*", but tests matching "a*" that has no
subtests will also be executed.

Signed-off-by: Yucong Sun <fallentree@fb.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210817044732.3263066-5-fallentree@fb.com
tools/testing/selftests/bpf/test_progs.c