summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/ftrace
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2018-08-30 16:24:14 +0200
committerShuah Khan (Samsung OSG) <shuah@kernel.org>2018-10-24 22:49:36 +0200
commit91ae08a265142d9378f7d972e00de29d5c91a2de (patch)
tree905c193bc3cd9b009082da04762c8f13775091ac /tools/testing/selftests/ftrace
parentselftests/ftrace: Add trace_pipe testcase (diff)
downloadlinux-91ae08a265142d9378f7d972e00de29d5c91a2de.tar.xz
linux-91ae08a265142d9378f7d972e00de29d5c91a2de.zip
selftests/ftrace: Add stacktrace ftrace filter command testcase
Add a test case for stacktrace filter command for ftrace. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
Diffstat (limited to 'tools/testing/selftests/ftrace')
-rw-r--r--tools/testing/selftests/ftrace/test.d/ftrace/func-filter-stacktrace.tc12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-stacktrace.tc b/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-stacktrace.tc
new file mode 100644
index 000000000000..bf72e783d014
--- /dev/null
+++ b/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-stacktrace.tc
@@ -0,0 +1,12 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL2.0
+# description: ftrace - stacktrace filter command
+# flags: instance
+
+echo _do_fork:stacktrace >> set_ftrace_filter
+
+grep -q "_do_fork:stacktrace:unlimited" set_ftrace_filter
+
+(echo "forked"; sleep 1)
+
+grep -q "<stack trace>" trace