summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter-stack.tc
diff options
context:
space:
mode:
authorXiao Yang <yangx.jy@cn.fujitsu.com>2020-04-22 17:58:07 +0800
committerShuah Khan <skhan@linuxfoundation.org>2020-04-23 17:11:37 -0600
commit16bcd0f509e469630d82a33a6d7e5d95bcc738fe (patch)
tree23b22cc21292d9b6f2290b2501be941551d425aa /tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter-stack.tc
parentb87080eab4c1377706c113fc9c0157f19ea8fed1 (diff)
selftests/ftrace: Check required filter files before running test
Without CONFIG_DYNAMIC_FTRACE, some tests get failure because required filter files(set_ftrace_filter/available_filter_functions/stack_trace_filter) are missing. So implement check_filter_file() and make all related tests check required filter files by it. BTW: set_ftrace_filter and available_filter_functions are introduced together so just check either of them. Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com> Acked-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter-stack.tc')
-rw-r--r--tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter-stack.tc5
1 files changed, 1 insertions, 4 deletions
diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter-stack.tc b/tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter-stack.tc
index aefab0c66d54..f59853857ad2 100644
--- a/tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter-stack.tc
+++ b/tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter-stack.tc
@@ -10,10 +10,7 @@ if ! grep -q function_graph available_tracers; then
exit_unsupported
fi
-if [ ! -f set_ftrace_filter ]; then
- echo "set_ftrace_filter not found? Is dynamic ftrace not set?"
- exit_unsupported
-fi
+check_filter_file set_ftrace_filter
do_reset() {
if [ -e /proc/sys/kernel/stack_tracer_enabled ]; then