diff options
author | Artem Savkov <asavkov@redhat.com> | 2023-09-14 15:49:28 +0300 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2023-09-14 21:16:13 +0300 |
commit | 971f7c32147f2d0953a815a109b22b8ed45949d4 (patch) | |
tree | 8b39c8732eb692013deab290f4f5a1b5bb052d1b /tools | |
parent | 8fa193412bdced22eb55bf7080716e6501c68881 (diff) | |
download | linux-971f7c32147f2d0953a815a109b22b8ed45949d4.tar.xz |
selftests/bpf: Skip module_fentry_shadow test when bpf_testmod is not available
This test relies on bpf_testmod, so skip it if the module is not available.
Fixes: aa3d65de4b900 ("bpf/selftests: Test fentry attachment to shadowed functions")
Signed-off-by: Artem Savkov <asavkov@redhat.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20230914124928.340701-1-asavkov@redhat.com
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/bpf/prog_tests/module_fentry_shadow.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/module_fentry_shadow.c b/tools/testing/selftests/bpf/prog_tests/module_fentry_shadow.c index c7636e18b1eb..aa9f67eb1c95 100644 --- a/tools/testing/selftests/bpf/prog_tests/module_fentry_shadow.c +++ b/tools/testing/selftests/bpf/prog_tests/module_fentry_shadow.c @@ -61,6 +61,11 @@ void test_module_fentry_shadow(void) int link_fd[2] = {}; __s32 btf_id[2] = {}; + if (!env.has_testmod) { + test__skip(); + return; + } + LIBBPF_OPTS(bpf_prog_load_opts, load_opts, .expected_attach_type = BPF_TRACE_FENTRY, ); |