linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] selftests/ftrace: mark irqsoff_tracer.tc test as unresolved if the test module does not exist
@ 2020-05-05 10:14 Po-Hsu Lin
  2020-05-05 13:09 ` Steven Rostedt
  2020-05-07  8:50 ` Masami Hiramatsu
  0 siblings, 2 replies; 7+ messages in thread
From: Po-Hsu Lin @ 2020-05-05 10:14 UTC (permalink / raw)
  To: linux-kselftest
  Cc: linux-kernel, shuah, mingo, rostedt, mhiramat, po-hsu.lin, joel

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 <po-hsu.lin@canonical.com>
---
 .../testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc b/tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc
index cbd1743..2b82c80e 100644
--- a/tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc
+++ b/tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc
@@ -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"
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-05-07  8:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-05 10:14 [PATCH] selftests/ftrace: mark irqsoff_tracer.tc test as unresolved if the test module does not exist Po-Hsu Lin
2020-05-05 13:09 ` Steven Rostedt
2020-05-05 14:22   ` shuah
2020-05-06  1:46   ` Po-Hsu Lin
2020-05-06 15:43     ` Steven Rostedt
2020-05-06 15:46       ` Shuah Khan
2020-05-07  8:50 ` Masami Hiramatsu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).