Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tests/shell: Fix shellcheck warnings for SC2153 in multiple scripts

Running shellcheck on some of the shell scripts, throws
below warning on shellcheck v0.6. Example:

In tests/shell/coresight/asm_pure_loop.sh line 14:
DATA="$DATD/perf-$TEST-$DATV.data"
^---^ SC2153: Possible misspelling: DATD may not be assigned, but DATA is.

Here, DATD is exported from "lib/coresight.sh" and this
warning can be ignored. Use "shellcheck disable=" to ignore
this check.

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-4-atrajeev@linux.vnet.ibm.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>

authored by

Athira Rajeev and committed by
Namhyung Kim
cefff1f3 55312ca7

+5
+1
tools/perf/tests/shell/coresight/asm_pure_loop.sh
··· 11 11 12 12 ARGS="" 13 13 DATV="out" 14 + # shellcheck disable=SC2153 14 15 DATA="$DATD/perf-$TEST-$DATV.data" 15 16 16 17 perf record $PERFRECOPT -o "$DATA" "$BIN" $ARGS
+1
tools/perf/tests/shell/coresight/memcpy_thread_16k_10.sh
··· 11 11 12 12 ARGS="16 10 1" 13 13 DATV="16k_10" 14 + # shellcheck disable=SC2153 14 15 DATA="$DATD/perf-$TEST-$DATV.data" 15 16 16 17 perf record $PERFRECOPT -o "$DATA" "$BIN" $ARGS
+1
tools/perf/tests/shell/coresight/thread_loop_check_tid_10.sh
··· 11 11 12 12 ARGS="10 1" 13 13 DATV="check-tid-10th" 14 + # shellcheck disable=SC2153 14 15 DATA="$DATD/perf-$TEST-$DATV.data" 15 16 STDO="$DATD/perf-$TEST-$DATV.stdout" 16 17
+1
tools/perf/tests/shell/coresight/thread_loop_check_tid_2.sh
··· 11 11 12 12 ARGS="2 20" 13 13 DATV="check-tid-2th" 14 + # shellcheck disable=SC2153 14 15 DATA="$DATD/perf-$TEST-$DATV.data" 15 16 STDO="$DATD/perf-$TEST-$DATV.stdout" 16 17
+1
tools/perf/tests/shell/coresight/unroll_loop_thread_10.sh
··· 11 11 12 12 ARGS="10" 13 13 DATV="10" 14 + # shellcheck disable=SC2153 14 15 DATA="$DATD/perf-$TEST-$DATV.data" 15 16 16 17 perf record $PERFRECOPT -o "$DATA" "$BIN" $ARGS