selftests/bpf: Add kprobe_multi attach test
authorJiri Olsa <jolsa@kernel.org>
Wed, 16 Mar 2022 12:24:16 +0000 (13:24 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 18 Mar 2022 03:17:19 +0000 (20:17 -0700)
commitf7a11eeccb11185437f4da1c80b66b857d1e906f
tree22061e9e6b4da7212c81774c2bb1432bd28dbc04
parentddc6b04989eb099368d3e6b6eaf5a6b181a36f91
selftests/bpf: Add kprobe_multi attach test

Adding kprobe_multi attach test that uses new fprobe interface to
attach kprobe program to multiple functions.

The test is attaching programs to bpf_fentry_test* functions and
uses single trampoline program bpf_prog_test_run to trigger
bpf_fentry_test* functions.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20220316122419.933957-11-jolsa@kernel.org
tools/testing/selftests/bpf/prog_tests/kprobe_multi_test.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/kprobe_multi.c [new file with mode: 0644]
tools/testing/selftests/bpf/trace_helpers.c