]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit - kernel/trace/trace_selftest.c
ftrace: force pass of preemptoff selftest
authorSteven Rostedt <srostedt@redhat.com>
Sat, 8 Nov 2008 03:36:02 +0000 (22:36 -0500)
committerIngo Molnar <mingo@elte.hu>
Sat, 8 Nov 2008 08:51:49 +0000 (09:51 +0100)
commit769c48eb2530c5c1a393e2c82063f4f050571d24
treea32f0718b42ab189c5547dccb0d0c7bb7cfe5c4c
parent7d5222a6afa4e429f55df8c086adb747837cbdf5
ftrace: force pass of preemptoff selftest

Impact: preemptoff not tested in selftest

Due to the BKL not being preemptable anymore, the selftest of the
preemptoff code can not be tested. It requires that it is called
with preemption enabled, but since the BKL is held, that is no
longer the case.

This patch simply skips those tests if it detects that the context
is not preemptable. The following will now show up in the tests:

Testing tracer preemptoff: can not test ... force PASSED
Testing tracer preemptirqsoff: can not test ... force PASSED

When the BKL is removed, or it becomes preemptable once again, then
the tests will be performed.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/trace/trace_selftest.c