selftests/bpf: Add a kprobe_multi subtest to use addrs instead of syms
authorYonghong Song <yonghong.song@linux.dev>
Tue, 26 Mar 2024 04:15:23 +0000 (21:15 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 29 Mar 2024 01:31:41 +0000 (18:31 -0700)
commit6302bdeb91df9b4484b9d537c29f8b6117f3f73d
treea9404bc5f4df93821255a1867c7365b5ddae9d1e
parent9edaafadc2c50f2af99ee5b3bad6831e1b6ad54f
selftests/bpf: Add a kprobe_multi subtest to use addrs instead of syms

Get addrs directly from available_filter_functions_addrs and
send to the kernel during kprobe_multi_attach. This avoids
consultation of /proc/kallsyms. But available_filter_functions_addrs
is introduced in 6.5, i.e., it is introduced recently,
so I skip the test if the kernel does not support it.

Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20240326041523.1200301-1-yonghong.song@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/kprobe_multi_test.c