selftests: ftrace: Add a test to test function triggers to start and stop tracing
This adds a test to test the function tiggers traceon and traceoff to make
sure that it starts and stops tracing when a function is hit.
The test performs the following:
o Enables all events
o Writes schedule:traceoff into set_ftrace_filter
o Makes sure the tigger exists in the file
o Makes sure the trace file no longer grows
o Makes sure that tracing_on is now zero
o Clears the trace file
o Makes sure it's still empty
o Removes the trigger
o Makes sure tracing is still off (tracing_on is zero)
o Writes schedule:traceon into set_ftrace_filter
o Makes sure the trace file is no longer empty
o Makes sure that tracing_on file is set to one
o Removes the trigger
o Makes sure the trigger is no longer there
o Writes schedule:traceoff:3 into set_ftrace_filter
o Makes sure that tracing_on turns off
. Writes 1 into tracing_on
. Makes sure that it turns off 2 more times
o Writes 1 into tracing_on
o Makes sure that tracing_on is still a one
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Showing
Please register or sign in to comment