Skip to content

Commit

Permalink
selftests/ftrace: mark irqsoff_tracer.tc test as unresolved if the te…
Browse files Browse the repository at this point in the history
…st 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: Po-Hsu Lin <[email protected]>
Acked-by: Steven Rostedt (VMware) <[email protected]>
Acked-by: Masami Hiramatsu <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>
  • Loading branch information
Cypresslin authored and shuahkh committed May 8, 2020
1 parent d8238f9 commit adb5716
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit adb5716

Please sign in to comment.