-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ftracetest: Add kprobe basic testcases
Add basic testcases for kprobe dynamic events. This also shows that the ftracetest accepts sub-directory for new testcases. Link: http://lkml.kernel.org/p/20140922234254.23415.46964.stgit@kbuild-f20.novalocal Acked-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
- Loading branch information
Masami Hiramatsu
authored and
Steven Rostedt
committed
Sep 23, 2014
1 parent
03e1664
commit 2909ef2
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
tools/testing/selftests/ftrace/test.d/kprobe/add_and_remove.tc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
# description: Kprobe dynamic event - adding and removing | ||
|
||
[ -f kprobe_events ] || exit 1 | ||
|
||
echo 0 > events/enable || exit 1 | ||
echo > kprobe_events || exit 1 | ||
echo p:myevent do_fork > kprobe_events || exit 1 | ||
grep myevent kprobe_events || exit 1 | ||
[ -d events/kprobes/myevent ] || exit 1 | ||
echo > kprobe_events |
14 changes: 14 additions & 0 deletions
14
tools/testing/selftests/ftrace/test.d/kprobe/busy_check.tc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/sh | ||
# description: Kprobe dynamic event - busy event check | ||
|
||
[ -f kprobe_events ] || exit 1 | ||
|
||
echo 0 > events/enable || exit 1 | ||
echo > kprobe_events || exit 1 | ||
echo p:myevent do_fork > kprobe_events || exit 1 | ||
[ -d events/kprobes/myevent ] || exit 1 | ||
echo 1 > events/kprobes/myevent/enable || exit 1 | ||
echo > kprobe_events && exit 1 # this must fail | ||
echo 0 > events/kprobes/myevent/enable || exit 1 | ||
echo > kprobe_events # this must succeed | ||
|