diff options
author | Jiri Olsa <[email protected]> | 2022-10-25 15:41:47 +0200 |
---|---|---|
committer | Alexei Starovoitov <[email protected]> | 2022-10-25 10:14:51 -0700 |
commit | e697d8dcebd2f557fa5e5ed57aaf0a9992ce9df8 (patch) | |
tree | feb2b8a2b844da0d5e3893867f81c29ca766f594 /tools/testing/selftests/bpf/progs/test_module_attach.c | |
parent | fee356ede980b6c2c8db612e18b25738356d6744 (diff) |
selftests/bpf: Add kprobe_multi check to module attach test
Adding test that makes sure the kernel module won't be removed
if there's kprobe multi link defined on top of it.
Acked-by: Song Liu <[email protected]>
Signed-off-by: Jiri Olsa <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_module_attach.c')
-rw-r--r-- | tools/testing/selftests/bpf/progs/test_module_attach.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/progs/test_module_attach.c b/tools/testing/selftests/bpf/progs/test_module_attach.c index 08628afedb77..8a1b50f3a002 100644 --- a/tools/testing/selftests/bpf/progs/test_module_attach.c +++ b/tools/testing/selftests/bpf/progs/test_module_attach.c @@ -110,4 +110,10 @@ int BPF_PROG(handle_fmod_ret, return 0; /* don't override the exit code */ } +SEC("kprobe.multi/bpf_testmod_test_read") +int BPF_PROG(kprobe_multi) +{ + return 0; +} + char _license[] SEC("license") = "GPL"; |