forked from Minki/linux
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>
This commit is contained in:
parent
7bc026d6c0
commit
174fd82339
16
tools/testing/selftests/ftrace/test.d/00basic/trace_pipe.tc
Normal file
16
tools/testing/selftests/ftrace/test.d/00basic/trace_pipe.tc
Normal file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# description: trace_pipe and trace_marker
|
||||
# flags: instance
|
||||
|
||||
[ ! -f trace_marker ] && exit_unsupported
|
||||
|
||||
echo "test input 1" > trace_marker
|
||||
|
||||
: "trace interface never consume the ring buffer"
|
||||
grep -q "test input 1" trace
|
||||
grep -q "test input 1" trace
|
||||
|
||||
: "trace interface never consume the ring buffer"
|
||||
head -n 1 trace_pipe | grep -q "test input 1"
|
||||
! grep -q "test input 1" trace
|
Loading…
Reference in New Issue
Block a user