mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 20:51:44 +00:00
selftests/ftrace: Improve kprobe testcase to check log data
Improve kprobe testcase to check the log data correctness and ensure the event definition is corrctly including argument definition. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
This commit is contained in:
parent
af2a0750f3
commit
e42e5c46b0
@ -5,10 +5,14 @@
|
||||
[ -f kprobe_events ] || exit_unsupported # this is configurable
|
||||
|
||||
echo 'p:testprobe _do_fork $stack $stack0 +0($stack)' > kprobe_events
|
||||
grep testprobe kprobe_events
|
||||
grep testprobe kprobe_events | grep -q 'arg1=\$stack arg2=\$stack0 arg3=+0(\$stack)'
|
||||
test -d events/kprobes/testprobe
|
||||
|
||||
echo 1 > events/kprobes/testprobe/enable
|
||||
( echo "forked")
|
||||
grep testprobe trace | grep '_do_fork' | \
|
||||
grep -q 'arg1=0x[[:xdigit:]]* arg2=0x[[:xdigit:]]* arg3=0x[[:xdigit:]]*$'
|
||||
|
||||
echo 0 > events/kprobes/testprobe/enable
|
||||
echo "-:testprobe" >> kprobe_events
|
||||
clear_trace
|
||||
|
Loading…
Reference in New Issue
Block a user