OSDN Git Service

selftests/bpf: Add test for bpf_ksym_exists().
authorAlexei Starovoitov <ast@kernel.org>
Fri, 17 Mar 2023 20:19:20 +0000 (13:19 -0700)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 17 Mar 2023 22:46:02 +0000 (15:46 -0700)
commit95fdf6e313a981b0729886f86916190cb418b04c
treedd3fb68a821169c52d13421de0ba528db0ce70ba
parent5cbd3fe3a91df46ea201cc5d8ab4e390332ec26e
selftests/bpf: Add test for bpf_ksym_exists().

Add load and run time test for bpf_ksym_exists() and check that the verifier
performs dead code elimination for non-existing kfunc.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Reviewed-by: Martin KaFai Lau <martin.lau@kernel.org>
Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20230317201920.62030-5-alexei.starovoitov@gmail.com
tools/testing/selftests/bpf/progs/task_kfunc_success.c