selftests/bpf: Switch fexit_stress to bpf_link_create() API
Use bpf_link_create() API in fexit_stress test to attach FEXIT programs. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Reviewed-by: Kui-Feng Lee <kuifeng@fb.com> Link: https://lore.kernel.org/bpf/20220421033945.3602803-4-andrii@kernel.org
This commit is contained in:
committed by
Daniel Borkmann
parent
8462e0b46f
commit
fd0493a1e4
@@ -53,7 +53,7 @@ void test_fexit_stress(void)
|
|||||||
&trace_opts);
|
&trace_opts);
|
||||||
if (!ASSERT_GE(fexit_fd[i], 0, "fexit load"))
|
if (!ASSERT_GE(fexit_fd[i], 0, "fexit load"))
|
||||||
goto out;
|
goto out;
|
||||||
link_fd[i] = bpf_raw_tracepoint_open(NULL, fexit_fd[i]);
|
link_fd[i] = bpf_link_create(fexit_fd[i], 0, BPF_TRACE_FEXIT, NULL);
|
||||||
if (!ASSERT_GE(link_fd[i], 0, "fexit attach"))
|
if (!ASSERT_GE(link_fd[i], 0, "fexit attach"))
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user