mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
selftests/ftrace: Add a test case for repeating register/unregister fprobe
This test case repeats define and undefine the fprobe dynamic event to ensure that the fprobe does not cause any issue with such operations. Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com> Cc: Florent Revest <revest@chromium.org> Cc: Martin KaFai Lau <martin.lau@linux.dev> Cc: bpf <bpf@vger.kernel.org> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Alan Maguire <alan.maguire@oracle.com> Cc: Mark Rutland <mark.rutland@arm.com> Link: https://lore.kernel.org/173519009398.391279.4625924605120064761.stgit@devnote2 Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
This commit is contained in:
committed by
Steven Rostedt (Google)
parent
91fce23a08
commit
0c2dd44d3f
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# description: Generic dynamic event - Repeating add/remove fprobe events
|
||||
# requires: dynamic_events "f[:[<group>/][<event>]] <func-name>[%return] [<args>]":README
|
||||
|
||||
echo 0 > events/enable
|
||||
echo > dynamic_events
|
||||
|
||||
PLACE=$FUNCTION_FORK
|
||||
REPEAT_TIMES=64
|
||||
|
||||
for i in `seq 1 $REPEAT_TIMES`; do
|
||||
echo "f:myevent $PLACE" >> dynamic_events
|
||||
grep -q myevent dynamic_events
|
||||
test -d events/fprobes/myevent
|
||||
echo > dynamic_events
|
||||
done
|
||||
|
||||
clear_trace
|
||||
Reference in New Issue
Block a user