Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os 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>

authored by

Masami Hiramatsu and committed by
Shuah Khan (Samsung OSG)
174fd823 7bc026d6

+16
+16
tools/testing/selftests/ftrace/test.d/00basic/trace_pipe.tc
··· 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