mirror of
https://github.com/torvalds/linux.git
synced 2026-04-29 20:12:38 -04:00
Add two selftest scripts which tests kprobe-tracer as the startup selftest does. These test cases are testing that the kprobe_event can accept a kprobe event with $stack related arguments and a kretprobe event with $retval argument. Link: http://lkml.kernel.org/p/20141008040307.13415.45145.stgit@kbuild-f20.novalocal Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
17 lines
491 B
Bash
17 lines
491 B
Bash
#!/bin/sh
|
|
# description: Kprobe dynamic event with arguments
|
|
|
|
[ -f kprobe_events ] || exit_unsupported # this is configurable
|
|
|
|
echo 0 > events/enable
|
|
echo > kprobe_events
|
|
echo 'p:testprobe do_fork $stack $stack0 +0($stack)' > kprobe_events
|
|
grep testprobe kprobe_events
|
|
test -d events/kprobes/testprobe
|
|
echo 1 > events/kprobes/testprobe/enable
|
|
( echo "forked")
|
|
echo 0 > events/kprobes/testprobe/enable
|
|
echo "-:testprobe" >> kprobe_events
|
|
test -d events/kprobes/testprobe && exit 1 || exit 0
|
|
|