selftests/bpf: Add test for missed counts of perf event link kprobe
authorJiri Olsa <jolsa@kernel.org>
Wed, 20 Sep 2023 21:31:43 +0000 (23:31 +0200)
committerAndrii Nakryiko <andrii@kernel.org>
Mon, 25 Sep 2023 23:37:44 +0000 (16:37 -0700)
commit01e4ae474e39b855f911caec355bb79e722562b3
treeadace8f603d62e1bb0869bbdc43b6c929ee52f2b
parentb563b9bae8c3a6583e34820856dc6eafc2239aaf
selftests/bpf: Add test for missed counts of perf event link kprobe

Adding test that puts kprobe on bpf_fentry_test1 that calls
bpf_kfunc_common_test kfunc, which has also kprobe on.

The latter won't get triggered due to kprobe recursion check
and kprobe missed counter is incremented.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Hou Tao <houtao1@huawei.com>
Link: https://lore.kernel.org/bpf/20230920213145.1941596-8-jolsa@kernel.org
tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c
tools/testing/selftests/bpf/bpf_testmod/bpf_testmod_kfunc.h
tools/testing/selftests/bpf/prog_tests/missed.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/missed_kprobe.c [new file with mode: 0644]