]> git.ipfire.org Git - thirdparty/linux.git/commit - lib/test_kprobes.c
test_kprobes: Add recursed kprobe test case
authorMasami Hiramatsu (Google) <mhiramat@kernel.org>
Mon, 20 Feb 2023 23:52:42 +0000 (08:52 +0900)
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>
Mon, 20 Feb 2023 23:52:42 +0000 (08:52 +0900)
commit1fcd09fd4f8494b05b7c34971f3498dda0bb06ee
tree6cb6b562cb20dd3cf9f90d6b3cb03f7da4e83f62
parent8478cca1e3abd183f309cd9c2491f484acf5d377
test_kprobes: Add recursed kprobe test case

Add a recursed kprobe test case to the KUnit test module for kprobes.
This will probe a function which is called from the pre_handler and
post_handler itself. If the kprobe is correctly implemented, the recursed
kprobe handlers will be skipped and the number of skipped kprobe will
be counted on kprobe::nmissed.

Link: https://lore.kernel.org/all/167414238758.2301956.258548940194352895.stgit@devnote3/
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
lib/test_kprobes.c