]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
selftests: ftrace: Add a test to test function triggers to start and stop tracing
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Mon, 17 Apr 2017 22:05:53 +0000 (18:05 -0400)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Tue, 18 Apr 2017 17:48:27 +0000 (13:48 -0400)
commitd8b39e1d983efeb6c5835bcdd477e9c7cf1110fd
treead959a5e9cac54b5ccbaddf817420396dcd70ab0
parent43bb45da82f94fffd5fb816e1fd2453561747c8b
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>
tools/testing/selftests/ftrace/test.d/ftrace/func_traceonoff_triggers.tc [new file with mode: 0644]