2 # SPDX-License-Identifier: GPL-2.0
3 # description: ftrace - function trace on module
5 check_filter_file set_ftrace_filter
7 : "mod: allows to filter a non exist function"
8 echo 'non_exist_func:mod:non_exist_module' > set_ftrace_filter
9 grep -q "non_exist_func" set_ftrace_filter
11 : "mod: on exist module"
12 echo '*:mod:trace_printk' > set_ftrace_filter
13 if ! modprobe trace-printk ; then
14 echo "No trace-printk sample module - please make CONFIG_SAMPLE_TRACE_PRINTK=
19 : "Wildcard should be resolved after loading module"
20 grep -q "trace_printk_irq_work" set_ftrace_filter
22 : "After removing the filter becomes empty"
24 test `cat set_ftrace_filter | wc -l` -eq 0