xref: /linux/tools/testing/selftests/ftrace/test.d/00basic/trace_pipe.tc (revision 4b4193256c8d3bc3a5397b5cd9494c2ad386317d)
1174fd823SMasami Hiramatsu#!/bin/sh
2174fd823SMasami Hiramatsu# SPDX-License-Identifier: GPL-2.0
3174fd823SMasami Hiramatsu# description: trace_pipe and trace_marker
4*3591e90fSMasami Hiramatsu# requires: trace_marker
5174fd823SMasami Hiramatsu# flags: instance
6174fd823SMasami Hiramatsu
7174fd823SMasami Hiramatsuecho "test input 1" > trace_marker
8174fd823SMasami Hiramatsu
9174fd823SMasami Hiramatsu: "trace interface never consume the ring buffer"
10174fd823SMasami Hiramatsugrep -q "test input 1" trace
11174fd823SMasami Hiramatsugrep -q "test input 1" trace
12174fd823SMasami Hiramatsu
13174fd823SMasami Hiramatsu: "trace interface never consume the ring buffer"
14174fd823SMasami Hiramatsuhead -n 1 trace_pipe | grep -q "test input 1"
15174fd823SMasami Hiramatsu! grep -q "test input 1" trace
16