tracing/selftests: Verbosity improvements to KTAP output

This series aims to improve the usability of the ftrace selftests when
running as part of the kselftest runner, mainly for use with automated
systems.  It fixes the output of verbose mode when run in KTAP output
mode and then enables verbose mode by default when invoked from the
kselftest runner so that the diagnostic information is there by default
when run in automated systems.

I've split this into two patches in case there is a concern with one
part but not the other, especially given the verbosity of the verbose
output when it triggers.

To: Steven Rostedt <rostedt@goodmis.org>
To: Masami Hiramatsu <mhiramat@kernel.org>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Shuah Khan <shuah@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Aishwarya TCV <aishwarya.tcv@arm.com>
Cc: linux-kernel@vger.kernel.org
Cc: linux-trace-kernel@vger.kernel.org
Cc: linux-kselftest@vger.kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>

---
Mark Brown (2):
      tracing/selftests: Support log output when generating KTAP output
      tracing/selftests: Default to verbose mode when running in kselftest

 tools/testing/selftests/ftrace/ftracetest      | 8 +++++++-
 tools/testing/selftests/ftrace/ftracetest-ktap | 2 +-
 2 files changed, 8 insertions(+), 2 deletions(-)
---
base-commit: 4cece764965020c22cff7665b18a012006359095
change-id: 20240319-kselftest-ftrace-ktap-verbose-72e37957e213

Best regards,
tracing/selftests: Default to verbose mode when running in kselftest

In order to facilitate debugging of issues from automated runs of the ftrace
selftests turn on verbose logging by default when run from the kselftest
runner. This is primarily used by automated systems where developers may
not have direct access to the system so defaulting to providing diagnostic
information which might help debug problems seems like a good idea.

When tests pass no extra output is generated, when they fail a full log of
the test run is provided. Since this really is rather verbose when there are
a large number of test failures or output is slow (eg, with a serial
console) this could substantially increase the run time for the tests which
might present problems with timeout detection for affected systems,
hopefully we keep the tests running well enough that this is not too much
of an issue.

Signed-off-by: Mark Brown <broonie@kernel.org>
1 file changed