aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/tests
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2022-09-12 11:34:07 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2022-10-04 08:55:23 -0300
commit711949e2f0bac0c8894cf84360354344be55c057 (patch)
tree4b9bdc782ccb8a7907df1a2d33ab1d77b387b064 /tools/perf/tests
parentperf test: test_intel_pt.sh: Stop using backticks (diff)
downloadlinux-dev-711949e2f0bac0c8894cf84360354344be55c057.tar.xz
linux-dev-711949e2f0bac0c8894cf84360354344be55c057.zip
perf test: test_intel_pt.sh: Use grep -c instead of grep plus wc -l
As suggested by shellcheck, use grep -c instead of grep plus wc -l Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Ian Rogers <irogers@google.com> Cc: Jiri Olsa <jolsa@kernel.org> Link: https://lore.kernel.org/r/20220912083412.7058-7-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests')
-rwxr-xr-xtools/perf/tests/shell/test_intel_pt.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/tests/shell/test_intel_pt.sh b/tools/perf/tests/shell/test_intel_pt.sh
index 0273332b99e9..3dfdef4fa6f4 100755
--- a/tools/perf/tests/shell/test_intel_pt.sh
+++ b/tools/perf/tests/shell/test_intel_pt.sh
@@ -51,7 +51,7 @@ test_system_wide_side_band()
perf record -B -N --no-bpf-event -o ${perfdatafile} -e intel_pt//u -C 0 -- taskset --cpu-list 1 uname
# Should get MMAP events from CPU 1 because they can be needed to decode
- mmap_cnt=$(perf script -i ${perfdatafile} --no-itrace --show-mmap-events -C 1 2>/dev/null | grep MMAP | wc -l)
+ mmap_cnt=$(perf script -i ${perfdatafile} --no-itrace --show-mmap-events -C 1 2>/dev/null | grep -c MMAP)
if [ ${mmap_cnt} -gt 0 ] ; then
return 0