Skip to content

Commit

Permalink
selftest/ftrace: Fix function trigger test to handle trace not disabl…
Browse files Browse the repository at this point in the history
…ing the tracer

The ftrace selftest "ftrace - test for function traceon/off triggers"
enables all events and reads the trace file. Now that the trace file does
not disable tracing, and will attempt to continually read new data that is
added, the selftest gets stuck reading the trace file. This is because the
data added to the trace file will fill up quicker than the reading of it.

By only enabling scheduling events, the read can keep up with the writes.
Instead of enabling all events, only enable the scheduler events.

Link: http://lkml.kernel.org/r/20200318111345.0516642e@gandalf.local.home

Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: linux-kselftest@vger.kernel.org
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
  • Loading branch information
rostedt committed Mar 19, 2020
1 parent bf2cbe0 commit 8c77f0b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ fi

echo '** ENABLE EVENTS'

echo 1 > events/enable
echo 1 > events/sched/enable

echo '** ENABLE TRACING'
enable_tracing
Expand Down

0 comments on commit 8c77f0b

Please sign in to comment.