mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-04 08:08:54 +00:00
selftests/ftrace: Fix ftrace test cases to check unsupported
Since dynamic function tracer can be disabled, set_ftrace_filter can be disappeared. Test cases which depends on it, must check whether the set_ftrace_filter exists or not before testing and if not, return as unsupported. Also, if the function tracer itself is disabled, we can not set "function" to current_tracer. Test cases must check it before testing, and return as unsupported. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
This commit is contained in:
parent
fd1baf6ca2
commit
25deae098e
2 changed files with 7 additions and 0 deletions
|
@ -3,6 +3,8 @@
|
|||
# description: ftrace - stacktrace filter command
|
||||
# flags: instance
|
||||
|
||||
[ ! -f set_ftrace_filter ] && exit_unsupported
|
||||
|
||||
echo _do_fork:stacktrace >> set_ftrace_filter
|
||||
|
||||
grep -q "_do_fork:stacktrace:unlimited" set_ftrace_filter
|
||||
|
|
|
@ -15,6 +15,11 @@ if [ $NP -eq 1 ] ;then
|
|||
exit_unresolved
|
||||
fi
|
||||
|
||||
if ! grep -q "function" available_tracers ; then
|
||||
echo "Function trace is not enabled"
|
||||
exit_unsupported
|
||||
fi
|
||||
|
||||
ORIG_CPUMASK=`cat tracing_cpumask`
|
||||
|
||||
do_reset() {
|
||||
|
|
Loading…
Reference in a new issue