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
History
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
File Mode Size
apparmor
bpf
integrity
keys
loadpin
lockdown
safesetid
selinux
smack
tomoyo
yama
Kconfig -rw-r--r-- 10.7 KB
Kconfig.hardening -rw-r--r-- 8.8 KB
Makefile -rw-r--r-- 1.3 KB
commoncap.c -rw-r--r-- 42.9 KB
device_cgroup.c -rw-r--r-- 21.1 KB
inode.c -rw-r--r-- 10.6 KB
lsm_audit.c -rw-r--r-- 10.9 KB
min_addr.c -rw-r--r-- 1.3 KB
security.c -rw-r--r-- 64.3 KB

back to top