Skip to content
Commit 43bb45da authored by Steven Rostedt (VMware)'s avatar Steven Rostedt (VMware)
Browse files

selftests: ftrace: Add a selftest to test event enable/disable func trigger



This adds a test to enable and disable trace events via the function
triggers. It tests enabling and disabling the sched:sched_switch event via
the the event_enable and event_disable function triggers attached to the
schedule() kernel function.

The test does the following:

 o disable all events

 o disables or enables the sched_switch event

 o writes schedule:event_enable/disable:sched:sched_switch into set_ftrace_filter

 o 5 times it checks to make sure:

    . Writes 0/1 into the sched_switch/enable

    . Checks that the sched_switch/enable goes back to 1/0

 o Resets the events

 o writes schedule:event_enable/disable:sched:sched_switch:3 into set_ftrace_filter

 o Does a loop of 3 to see that sched_switch/enable file gets updated

 o Makes sure the sched_switch/enable stops getting updated

Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
parent 8e5e19c1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment