Skip to content

Commit adb5716

Browse files
Cypresslinshuahkh
authored andcommitted
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: 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]>
1 parent d8238f9 commit adb5716

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,14 @@ unsup() { #msg
1717
exit_unsupported
1818
}
1919

20-
modprobe $MOD || unsup "$MOD module not available"
20+
unres() { #msg
21+
reset_tracer
22+
rmmod $MOD || true
23+
echo $1
24+
exit_unresolved
25+
}
26+
27+
modprobe $MOD || unres "$MOD module not available"
2128
rmmod $MOD
2229

2330
grep -q "preemptoff" available_tracers || unsup "preemptoff tracer not enabled"

0 commit comments

Comments
 (0)