summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/testing_helpers.h
diff options
context:
space:
mode:
authorStephen Veiss <sveiss@meta.com>2023-04-27 15:53:33 -0700
committerAndrii Nakryiko <andrii@kernel.org>2023-05-01 15:30:02 -0700
commit64276f01dce85f72853617e513622b5645497d81 (patch)
treef289291673a8b8c12d4c3d0da4beb163fdd3671c /tools/testing/selftests/bpf/testing_helpers.h
parent0a5c0de8b66f9789422f04de7304e374a2ea8df5 (diff)
selftests/bpf: Test_progs can read test lists from file
Improve test selection logic when using -a/-b/-d/-t options. The list of tests to include or exclude can now be read from a file, specified as @<filename>. The file contains one name (or wildcard pattern) per line, and comments beginning with # are ignored. These options can be passed multiple times to read more than one file. Signed-off-by: Stephen Veiss <sveiss@meta.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Yonghong Song <yhs@fb.com> Link: https://lore.kernel.org/bpf/20230427225333.3506052-3-sveiss@meta.com
Diffstat (limited to 'tools/testing/selftests/bpf/testing_helpers.h')
-rw-r--r--tools/testing/selftests/bpf/testing_helpers.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/testing_helpers.h b/tools/testing/selftests/bpf/testing_helpers.h
index eb8790f928e4..98f09bbae86f 100644
--- a/tools/testing/selftests/bpf/testing_helpers.h
+++ b/tools/testing/selftests/bpf/testing_helpers.h
@@ -20,5 +20,8 @@ struct test_filter_set;
int parse_test_list(const char *s,
struct test_filter_set *test_set,
bool is_glob_pattern);
+int parse_test_list_file(const char *path,
+ struct test_filter_set *test_set,
+ bool is_glob_pattern);
__u64 read_perf_max_sample_freq(void);