Commit adb57164 authored by Po-Hsu Lin's avatar Po-Hsu Lin Committed by Shuah Khan

selftests/ftrace: mark irqsoff_tracer.tc test as unresolved if the test module does not exist

The UNRESOLVED state is much more apporiate than the UNSUPPORTED state
for the absence of the test module, as it matches "test was set up
incorrectly" situation in the README file.

A possible scenario is that the function was enabled (supported by the
kernel) but the module was not installed properly, in this case we
cannot call this as UNSUPPORTED.

This change also make it consistent with other module-related tests
in ftrace.
Signed-off-by: default avatarPo-Hsu Lin <po-hsu.lin@canonical.com>
Acked-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
Acked-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent d8238f9e
......@@ -17,7 +17,14 @@ unsup() { #msg
exit_unsupported
}
modprobe $MOD || unsup "$MOD module not available"
unres() { #msg
reset_tracer
rmmod $MOD || true
echo $1
exit_unresolved
}
modprobe $MOD || unres "$MOD module not available"
rmmod $MOD
grep -q "preemptoff" available_tracers || unsup "preemptoff tracer not enabled"
......
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