mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 01:53:29 +02:00
selftests/bpf: Add kprobe session recursion check test
Adding kprobe.session probe to bpf_kfunc_common_test that misses bpf program execution due to recursion check and making sure it increases the program missed count properly. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Link: https://lore.kernel.org/r/20250106175048.1443905-2-jolsa@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
parent
2ebadb60cb
commit
bfaac2a0b9
|
|
@ -85,6 +85,7 @@ static void test_missed_kprobe_recursion(void)
|
|||
ASSERT_GE(get_missed_count(bpf_program__fd(skel->progs.test3)), 1, "test3_recursion_misses");
|
||||
ASSERT_GE(get_missed_count(bpf_program__fd(skel->progs.test4)), 1, "test4_recursion_misses");
|
||||
ASSERT_GE(get_missed_count(bpf_program__fd(skel->progs.test5)), 1, "test5_recursion_misses");
|
||||
ASSERT_EQ(get_missed_count(bpf_program__fd(skel->progs.test6)), 1, "test6_recursion_misses");
|
||||
|
||||
cleanup:
|
||||
missed_kprobe_recursion__destroy(skel);
|
||||
|
|
|
|||
|
|
@ -46,3 +46,9 @@ int test5(struct pt_regs *ctx)
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
SEC("kprobe.session/bpf_kfunc_common_test")
|
||||
int test6(struct pt_regs *ctx)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user