提交 2909ef28 编写于 作者: M Masami Hiramatsu 提交者: Steven Rostedt

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.novalocalAcked-by: NNamhyung Kim <namhyung@kernel.org>
Signed-off-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
上级 03e16645
#!/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
#!/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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册