mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-01 10:42:11 +00:00
55312ca752
Running shellcheck on stat+shadow_stat.sh generates below warning In tests/shell/stat+csv_summary.sh line 26: while read _num _event _run _pct ^--^ SC2034: _num appears unused. Verify use (or export if used externally). ^----^ SC2034: _event appears unused. Verify use (or export if used externally). ^--^ SC2034: _run appears unused. Verify use (or export if used externally). ^--^ SC2034: _pct appears unused. Verify use (or export if used externally). This variable is intentionally unused since it is needed to parse through the output. commit used "_" as a prefix for this throw away variable. But this stil shows warning with shellcheck v0.6. Fix this by only using "_" instead of prefix and variable name. Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Tested-by: Ian Rogers <irogers@google.com> Reviewed-by: Kajol Jain <kjain@linux.ibm.com> Cc: maddy@linux.ibm.com Cc: disgoel@linux.vnet.ibm.com Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230907171540.36736-3-atrajeev@linux.vnet.ibm.com Signed-off-by: Namhyung Kim <namhyung@kernel.org>
32 lines
611 B
Bash
Executable File
32 lines
611 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 _ _ _ _
|
|
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 _ _ _ _
|
|
do
|
|
exit 1
|
|
done
|
|
|
|
exit 0
|