diff options
author | Masami Hiramatsu <mhiramat@kernel.org> | 2018-08-30 10:23:46 -0400 |
---|---|---|
committer | Shuah Khan (Samsung OSG) <shuah@kernel.org> | 2018-10-24 16:49:36 -0400 |
commit | 174fd823397a2f19905a20bbcf47907e30e58444 (patch) | |
tree | 8b966cbae1bc41a18dfb76067c3cc9dfb84fd4d8 /tools | |
parent | 7bc026d6c0328f49469a56168b50ff7a498a5810 (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.tc | 16 |
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 | |||
8 | echo "test input 1" > trace_marker | ||
9 | |||
10 | : "trace interface never consume the ring buffer" | ||
11 | grep -q "test input 1" trace | ||
12 | grep -q "test input 1" trace | ||
13 | |||
14 | : "trace interface never consume the ring buffer" | ||
15 | head -n 1 trace_pipe | grep -q "test input 1" | ||
16 | ! grep -q "test input 1" trace | ||