]> asedeno.scripts.mit.edu Git - linux.git/commit
selftests: ftrace: Add test to test reading of set_ftrace_file
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Tue, 18 Apr 2017 15:22:38 +0000 (11:22 -0400)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Tue, 18 Apr 2017 17:48:27 +0000 (13:48 -0400)
commita9064f676ed6de7bf3a07e26fc19494d48fa4619
treeee1972cdbfe8e71c847c5b2fe4d42f0bc38eb943
parentd8b39e1d983efeb6c5835bcdd477e9c7cf1110fd
selftests: ftrace: Add test to test reading of set_ftrace_file

The set_ftrace_file lists both functions that are filtered, as well as
function probes (triggers) that are attached to a function, like traceon or
stacktrace, etc. The reading of this file is not as trivial as most pseudo
files are, and there's been various bugs that have appeared in the past
when there's a mix of probes and functions listed. There's also a difference
when reading the file using dd with a block size of 1.

This test performs the following:

 o Resets set_ftrace_filter

 o Makes sure only "#### all functions enabled ####" is listed

    (All checks uses cat, and dd with bs=1 and bs=100)

 o Adds a traceon trigger to schedule

 o Checks if only "#### all function enabled ####" and the trigger is there.

 o Adds tracing of schedule

 o Checks if only schedule and the trigger is there

 o Adds tracing of do_IRQ as well

 o Checks if only schedule, do_IRQ and the trigger is there

 o Adds a traceon trigger to do_IRQ

 o Checks if only schedule, do_IRQ and both triggers are there

 o Removes tracing of do_IRQ

 o Checks if only schedule and both triggers are there

 o Removes tracing of schedule

 o Checks if only  "#### all functions enabled ####" and both triggers are there

 o Removes the triggers

 o Checks if only "#### all functions enabled ####" is there

 o Adds tracing of schedule

 o Checks if only schedule is there

 o Adds tracing of do_IRQ

 o Checks if only schedule and do_IRQ are there

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
tools/testing/selftests/ftrace/test.d/ftrace/func_set_ftrace_file.tc [new file with mode: 0644]