https://github.com/torvalds/linux
Revision ee666a185558ac9a929e53b902a568442ed62416 authored by Steven Rostedt (VMware) on 01 March 2021, 15:49:35 UTC, committed by Steven Rostedt (VMware) on 04 March 2021, 14:51:25 UTC
If tracing is disabled for some reason (traceoff_on_warning, command line,
etc), the ftrace selftests are guaranteed to fail, as their results are
defined by trace data in the ring buffers. If the ring buffers are turned
off, the tests will fail, due to lack of data.

Because tracing being disabled is for a specific reason (warning, user
decided to, etc), it does not make sense to enable tracing to run the self
tests, as the test output may corrupt the reason for the tracing to be
disabled.

Instead, simply skip the self tests and report that they are being skipped
due to tracing being disabled.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
1 parent f40fc79
Raw File
Tip revision: ee666a185558ac9a929e53b902a568442ed62416 authored by Steven Rostedt (VMware) on 01 March 2021, 15:49:35 UTC
tracing: Skip selftests if tracing is disabled
Tip revision: ee666a1
README
Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.
back to top