perf tools: Add pipe_test.sh to verify pipe operations
authorNamhyung Kim <namhyung@kernel.org>
Mon, 19 Jul 2021 22:31:53 +0000 (15:31 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 2 Aug 2021 13:14:58 +0000 (10:14 -0300)
commitec02f2b134d86b4a91c5d82eed03319060718a97
treee468fb5e5a3224bbc812f2a7759f31c9eaa20b9f
parentc3a057dc3aa9979ce6dc350e05eb2e4c021432cd
perf tools: Add pipe_test.sh to verify pipe operations

It builds a test program and use it to verify pipe behavior with perf
record, inject and report.

  $ perf test pipe -v
  80: perf pipe recording and injection test                          :
  --- start ---
  test child forked, pid 1109301
  [ perf record: Woken up 1 times to write data ]
  [ perf record: Captured and wrote 0.000 MB - ]
     1109315  1109315       -1 |test.file.MGNff
  [ perf record: Woken up 1 times to write data ]
  [ perf record: Captured and wrote 0.000 MB - ]
      99.99%  test.file.MGNff  test.file.MGNffM  [.] noploop
  [ perf record: Woken up 1 times to write data ]
  [ perf record: Captured and wrote 0.000 MB - ]
      99.99%  test.file.MGNff  test.file.MGNffM  [.] noploop
  [ perf record: Woken up 1 times to write data ]
  [ perf record: Captured and wrote 0.153 MB /tmp/perf.data.dmsnlx (3995 samples) ]
      99.99%  test.file.MGNff  test.file.MGNffM  [.] noploop
  test child finished with 0
  ---- end ----
  perf pipe recording and injection test: Ok

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20210719223153.1618812-6-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/shell/pipe_test.sh [new file with mode: 0755]