perf test: Add a shell test for 'perf stat --bpf-counters' new option
authorSong Liu <songliubraving@fb.com>
Tue, 23 Mar 2021 20:42:47 +0000 (17:42 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 23 Mar 2021 21:05:36 +0000 (18:05 -0300)
commit2c0cb9f56020d2ea006589434d5eb4e702110124
tree0361fd67e378a91fbadb02a28345bb5e3d9a1f7f
parent435b46ef1d9fd904089199da16a21ade0701537f
perf test: Add a shell test for 'perf stat --bpf-counters' new option

Add a test to compare the output of perf-stat with and without option
--bpf-counters. If the difference is more than 10%, the test is considered
as failed.

Committer testing:

  # perf test bpf-counters
  86: perf stat --bpf-counters test                                   : Ok
  # perf test -v bpf-counters
  86: perf stat --bpf-counters test                                   :
  --- start ---
  test child forked, pid 2433339
  test child finished with 0
  ---- end ----
  perf stat --bpf-counters test: Ok
  #

Signed-off-by: Song Liu <songliubraving@fb.com>
Requested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lore.kernel.org/lkml/EC00E37D-8587-4662-8E30-7AD5F874FA84@fb.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/shell/stat_bpf_counters.sh [new file with mode: 0755]