diff options
author | Andrii Nakryiko <andriin@fb.com> | 2019-10-20 20:39:01 -0700 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-10-21 14:49:12 +0200 |
commit | 8af1c8b8d6223c31fada6148fd870257407952d1 (patch) | |
tree | d9fe42c3e8946a9a7a7b08b9876b23315a092cdd /tools/testing/selftests/bpf/prog_tests | |
parent | f90415e9600c5227131531c0ed11514a2d3bbe62 (diff) |
selftests/bpf: Make reference_tracking test use subtests
reference_tracking is actually a set of 9 sub-tests. Make it explicitly so.
Also, add explicit "classifier/" prefix to BPF program section names to
let libbpf correctly guess program type. Thus, also remove explicit
bpf_prog__set_type() call.
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20191021033902.3856966-7-andriin@fb.com
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests')
-rw-r--r-- | tools/testing/selftests/bpf/prog_tests/reference_tracking.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/reference_tracking.c b/tools/testing/selftests/bpf/prog_tests/reference_tracking.c index 86cee820d4d3..4493ba277bd7 100644 --- a/tools/testing/selftests/bpf/prog_tests/reference_tracking.c +++ b/tools/testing/selftests/bpf/prog_tests/reference_tracking.c @@ -31,7 +31,8 @@ void test_reference_tracking(void) if (strstr(title, ".text") != NULL) continue; - bpf_program__set_type(prog, BPF_PROG_TYPE_SCHED_CLS); + if (!test__start_subtest(title)) + continue; /* Expect verifier failure if test name has 'fail' */ if (strstr(title, "fail") != NULL) { |