2 # SPDX-License-Identifier: GPL-2.0
3 # description: ftrace - function graph filters
5 # Make sure that function graph filtering works
7 if ! grep -q function_graph available_tracers; then
8 echo "no function graph tracer configured"
27 # filter something, schedule is always good
28 if ! echo "schedule" > set_ftrace_filter; then
30 if ! echo ".schedule" > set_ftrace_filter; then
31 fail "can not enable schedule filter"
35 echo function_graph > current_tracer
38 # search for functions (has "()" on the line), and make sure
39 # that only the schedule function was found
40 count=`cat trace | grep '()' | grep -v schedule | wc -l`
41 if [ $count -ne 0 ]; then
42 fail "Graph filtering not working by itself?"
45 # Make sure we did find something
46 count=`cat trace | grep 'schedule()' | wc -l`
47 if [ $count -eq 0 ]; then
48 fail "No schedule traces found?"