Skip to content
Snippets Groups Projects
Commit 2452c96e authored by Masami Hiramatsu's avatar Masami Hiramatsu Committed by Shuah Khan (Samsung OSG)
Browse files

selftests/ftrace: Fix to test kprobe $comm arg only if available


Test $comm in kprobe-event argument syntax testcase
only if it is supported on the kernel because
$comm has been introduced 4.8 kernel.
So on older stable kernel, it should be skipped.

Signed-off-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: default avatarShuah Khan (Samsung OSG) <shuah@kernel.org>
parent e527c470
No related branches found
No related tags found
No related merge requests found
...@@ -75,8 +75,11 @@ test_badarg "\$stackp" "\$stack0+10" "\$stack1-10" ...@@ -75,8 +75,11 @@ test_badarg "\$stackp" "\$stack0+10" "\$stack1-10"
echo "r ${PROBEFUNC} \$retval" > kprobe_events echo "r ${PROBEFUNC} \$retval" > kprobe_events
! echo "p ${PROBEFUNC} \$retval" > kprobe_events ! echo "p ${PROBEFUNC} \$retval" > kprobe_events
# $comm was introduced in 4.8, older kernels reject it.
if grep -A1 "fetcharg:" README | grep -q '\$comm' ; then
: "Comm access" : "Comm access"
test_goodarg "\$comm" test_goodarg "\$comm"
fi
: "Indirect memory access" : "Indirect memory access"
test_goodarg "+0(${GOODREG})" "-0(${GOODREG})" "+10(\$stack)" \ test_goodarg "+0(${GOODREG})" "-0(${GOODREG})" "+10(\$stack)" \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment