diff options
author | Athira Rajeev <atrajeev@linux.vnet.ibm.com> | 2023-09-07 22:45:39 +0530 |
---|---|---|
committer | Namhyung Kim <namhyung@kernel.org> | 2023-09-26 21:47:12 -0700 |
commit | 55312ca7527e018c5ceacc4e311ac201c8bca90d (patch) | |
tree | fba3ebd068942bf0ebb6a90d7aece1c046ce7291 /tools/perf/tests/shell/stat+csv_summary.sh | |
parent | 35de80c709d730987c9a13911f836fbd92c5d1c5 (diff) |
tests/shell: Fix shellcheck issues in tests/shell/stat+shadow_stat.sh tetscase
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>
Diffstat (limited to 'tools/perf/tests/shell/stat+csv_summary.sh')
-rwxr-xr-x | tools/perf/tests/shell/stat+csv_summary.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/tests/shell/stat+csv_summary.sh b/tools/perf/tests/shell/stat+csv_summary.sh index 8bae9c8a835e..323123ff4d19 100755 --- a/tools/perf/tests/shell/stat+csv_summary.sh +++ b/tools/perf/tests/shell/stat+csv_summary.sh @@ -10,7 +10,7 @@ set -e # perf stat -e cycles -x' ' -I1000 --interval-count 1 --summary 2>&1 | \ grep -e summary | \ -while read summary _num _event _run _pct +while read summary _ _ _ _ do if [ $summary != "summary" ]; then exit 1 @@ -23,7 +23,7 @@ done # perf stat -e cycles -x' ' -I1000 --interval-count 1 --summary --no-csv-summary 2>&1 | \ grep -e summary | \ -while read _num _event _run _pct +while read _ _ _ _ do exit 1 done |