2 # SPDX-License-Identifier: GPL-2.0
3 # description: ftrace - function graph filters
4 # requires: set_ftrace_filter function_graph:tracer
6 # Make sure that function graph filtering works
16 # filter something, schedule is always good
17 if ! echo "schedule" > set_ftrace_filter; then
19 if ! echo ".schedule" > set_ftrace_filter; then
20 fail "can not enable schedule filter"
24 echo function_graph > current_tracer
27 # search for functions (has "()" on the line), and make sure
28 # that only the schedule function was found
29 count=`cat trace | grep '()' | grep -v schedule | wc -l`
30 if [ $count -ne 0 ]; then
31 fail "Graph filtering not working by itself?"
34 # Make sure we did find something
35 count=`cat trace | grep 'schedule()' | wc -l`
36 if [ $count -eq 0 ]; then
37 fail "No schedule traces found?"