diff options
author | Athira Rajeev <[email protected]> | 2023-07-09 23:58:00 +0530 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2023-08-03 17:01:27 -0300 |
commit | 35578a551b757cd00afe9b81406363f85cab16b2 (patch) | |
tree | d5f7a4637ee3cc4a991182219c52e2d332b42fc1 | |
parent | 8439b44abb0c2e6522823e0e20ae21feb882b408 (diff) |
perf tests stat+std_output: Fix shellcheck warnings about word splitting/quoting and local variables
Running shellcheck on stat_std_output testcase throws
below warning:
In tests/shell/stat+std_output.sh line 9:
. $(dirname $0)/lib/stat_output.sh
^-----------^ SC2046 (warning): Quote this to prevent word splitting.
In tests/shell/stat+std_output.sh line 32:
local -i cnt=0
^-^ SC2034 (warning): cnt appears unused. Verify use (or export if used externally).
Fixed the warning by adding quotes to avoid word splitting
and removed unused variable "cnt" at line 32.
Signed-off-by: Athira Rajeev <[email protected]>
Acked-by: Ian Rogers <[email protected]>
Cc: Disha Goel <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kajol Jain <[email protected]>
Cc: Madhavan Srinivasan <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rwxr-xr-x | tools/perf/tests/shell/stat+std_output.sh | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/perf/tests/shell/stat+std_output.sh b/tools/perf/tests/shell/stat+std_output.sh index f972b31fa0c2..fb2b10547a11 100755 --- a/tools/perf/tests/shell/stat+std_output.sh +++ b/tools/perf/tests/shell/stat+std_output.sh @@ -6,7 +6,7 @@ set -e -. $(dirname $0)/lib/stat_output.sh +. "$(dirname $0)"/lib/stat_output.sh stat_output=$(mktemp /tmp/__perf_test.stat_output.std.XXXXX) @@ -28,7 +28,6 @@ trap trap_cleanup EXIT TERM INT function commachecker() { - local -i cnt=0 local prefix=1 case "$1" |