aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2018-08-30 10:23:46 -0400
committerShuah Khan (Samsung OSG) <shuah@kernel.org>2018-10-24 16:49:36 -0400
commit174fd823397a2f19905a20bbcf47907e30e58444 (patch)
tree8b966cbae1bc41a18dfb76067c3cc9dfb84fd4d8 /tools
parent7bc026d6c0328f49469a56168b50ff7a498a5810 (diff)
selftests/ftrace: Add trace_pipe testcase
Add a simple testcase for trace_pipe which can consume ringbuffer. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/ftrace/test.d/00basic/trace_pipe.tc16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/testing/selftests/ftrace/test.d/00basic/trace_pipe.tc b/tools/testing/selftests/ftrace/test.d/00basic/trace_pipe.tc
new file mode 100644
index 000000000000..5058fbcfd90f
--- /dev/null
+++ b/tools/testing/selftests/ftrace/test.d/00basic/trace_pipe.tc
@@ -0,0 +1,16 @@
1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
3# description: trace_pipe and trace_marker
4# flags: instance
5
6[ ! -f trace_marker ] && exit_unsupported
7
8echo "test input 1" > trace_marker
9
10: "trace interface never consume the ring buffer"
11grep -q "test input 1" trace
12grep -q "test input 1" trace
13
14: "trace interface never consume the ring buffer"
15head -n 1 trace_pipe | grep -q "test input 1"
16! grep -q "test input 1" trace