Commit bc5f1598 authored by Masami Hiramatsu's avatar Masami Hiramatsu Committed by Shuah Khan

selftests/ftrace: Return unsupported if it detects older kernel

Return unsupported if the kernel is too old to support
instance independent ftrace filter for some testcases.
Signed-off-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
parent 565d5576
......@@ -72,6 +72,15 @@ run_enable_disable() {
test_event_enabled $check_disable
echo "schedule:${enable}_event:$EVENT" > set_ftrace_filter
if [ -d ../../instances ]; then # Check instances
cur=`cat set_ftrace_filter`
top=`cat ../../set_ftrace_filter`
if [ "$cur" = "$top" ]; then
echo "This kernel is too old to support per instance filter"
reset_ftrace_filter
exit_unsupported
fi
fi
echo " make sure it works 5 times"
......
......@@ -75,6 +75,15 @@ fi
echo '** SET TRACEOFF'
echo "$func:traceoff" > set_ftrace_filter
if [ -d ../../instances ]; then # Check instances
cur=`cat set_ftrace_filter`
top=`cat ../../set_ftrace_filter`
if [ "$cur" = "$top" ]; then
echo "This kernel is too old to support per instance filter"
reset_ftrace_filter
exit_unsupported
fi
fi
cnt=`grep schedule set_ftrace_filter | wc -l`
if [ $cnt -ne 1 ]; then
......
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