mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 20:51:44 +00:00
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: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
This commit is contained in:
parent
e527c47081
commit
2452c96e61
@ -75,8 +75,11 @@ test_badarg "\$stackp" "\$stack0+10" "\$stack1-10"
|
||||
echo "r ${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"
|
||||
test_goodarg "\$comm"
|
||||
fi
|
||||
|
||||
: "Indirect memory access"
|
||||
test_goodarg "+0(${GOODREG})" "-0(${GOODREG})" "+10(\$stack)" \
|
||||
|
Loading…
Reference in New Issue
Block a user