• Steven Rostedt's avatar
    ftrace: force pass of preemptoff selftest · 769c48eb
    Steven Rostedt authored
    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: default avatarSteven Rostedt <srostedt@redhat.com>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    769c48eb
trace_selftest.c 11.4 KB