mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-17 07:14:25 +00:00
Running shellcheck on stat+csv_summary.sh throws below warnings:
In tests/shell/stat+csv_summary.sh line 26:
while read num event run pct
^-^ SC2034 (warning): num appears unused. Verify use (or export if used externally).
^---^ SC2034 (warning): event appears unused. Verify use (or export if used externally).
^-^ SC2034 (warning): run appears unused. Verify use (or export if used externally).
^-^ SC2034 (warning): pct appears unused. Verify use (or export if used externally).
These variables are intentionally unused since they are needed to parse
through the output. Use "_" as a prefix for these throw away variables.
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Disha Goel <disgoel@linux.vnet.ibm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: linuxppc-dev@lists.ozlabs.org
Link: https://lore.kernel.org/r/20230709182800.53002-8-atrajeev@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
32 lines
639 B
Bash
Executable File
32 lines
639 B
Bash
Executable File
#!/bin/sh
|
|
# perf stat csv summary test
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
set -e
|
|
|
|
#
|
|
# 1.001364330 9224197 cycles 8012885033 100.00
|
|
# summary 9224197 cycles 8012885033 100.00
|
|
#
|
|
perf stat -e cycles -x' ' -I1000 --interval-count 1 --summary 2>&1 | \
|
|
grep -e summary | \
|
|
while read summary _num _event _run _pct
|
|
do
|
|
if [ $summary != "summary" ]; then
|
|
exit 1
|
|
fi
|
|
done
|
|
|
|
#
|
|
# 1.001360298 9148534 cycles 8012853854 100.00
|
|
#9148534 cycles 8012853854 100.00
|
|
#
|
|
perf stat -e cycles -x' ' -I1000 --interval-count 1 --summary --no-csv-summary 2>&1 | \
|
|
grep -e summary | \
|
|
while read _num _event _run _pct
|
|
do
|
|
exit 1
|
|
done
|
|
|
|
exit 0
|