Commit 971f7c32 authored by Artem Savkov's avatar Artem Savkov Committed by Andrii Nakryiko
Browse files

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: aa3d65de ("bpf/selftests: Test fentry attachment to shadowed functions")
Signed-off-by: default avatarArtem Savkov <asavkov@redhat.com>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20230914124928.340701-1-asavkov@redhat.com
parent 8fa19341
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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,
	);