Commit b0898e84 authored by Masami Hiramatsu's avatar Masami Hiramatsu Committed by Shuah Khan (Samsung OSG)

selftests/ftrace: Add kprobe event with $comm argument testcase

Add kprobe-event with $comm argument testcase to
ftracetest. This not only checks syntax but
also checks log file.
Signed-off-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: default avatarShuah Khan (Samsung OSG) <shuah@kernel.org>
parent ddbc31e6
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# description: Kprobe event with comm arguments
[ -f kprobe_events ] || exit_unsupported # this is configurable
grep -A1 "fetcharg:" README | grep -q "\$comm" || exit_unsupported # this is too old
echo 'p:testprobe _do_fork comm=$comm ' > kprobe_events
grep testprobe kprobe_events | grep -q 'comm=$comm'
test -d events/kprobes/testprobe
echo 1 > events/kprobes/testprobe/enable
( echo "forked")
grep testprobe trace | grep -q 'comm=".*"'
exit 0
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment