]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
tests/shell: Fix shellcheck warnings for SC2153 in multiple scripts
authorAthira Rajeev <atrajeev@linux.vnet.ibm.com>
Thu, 7 Sep 2023 17:15:40 +0000 (22:45 +0530)
committerNamhyung Kim <namhyung@kernel.org>
Wed, 27 Sep 2023 04:47:12 +0000 (21:47 -0700)
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>
tools/perf/tests/shell/coresight/asm_pure_loop.sh
tools/perf/tests/shell/coresight/memcpy_thread_16k_10.sh
tools/perf/tests/shell/coresight/thread_loop_check_tid_10.sh
tools/perf/tests/shell/coresight/thread_loop_check_tid_2.sh
tools/perf/tests/shell/coresight/unroll_loop_thread_10.sh

index 04387061e9f3e3c6e1fecc1dbfaa8993d9c82f7d..2d65defb7e0f15aa185fd3afa38c4d5dc031aa32 100755 (executable)
@@ -11,6 +11,7 @@ TEST="asm_pure_loop"
 
 ARGS=""
 DATV="out"
+# shellcheck disable=SC2153
 DATA="$DATD/perf-$TEST-$DATV.data"
 
 perf record $PERFRECOPT -o "$DATA" "$BIN" $ARGS
index c17e442ac741d5288dc22447f4a98e04336a3c49..ddcc9bb850f5fcf6a212d1d848ba16499121a6e7 100755 (executable)
@@ -11,6 +11,7 @@ TEST="memcpy_thread"
 
 ARGS="16 10 1"
 DATV="16k_10"
+# shellcheck disable=SC2153
 DATA="$DATD/perf-$TEST-$DATV.data"
 
 perf record $PERFRECOPT -o "$DATA" "$BIN" $ARGS
index e47c4e955d0e82649b157342014cc334235697bb..2ce5e139b2fdd76f17e678175f7ef96a118186d6 100755 (executable)
@@ -11,6 +11,7 @@ TEST="thread_loop"
 
 ARGS="10 1"
 DATV="check-tid-10th"
+# shellcheck disable=SC2153
 DATA="$DATD/perf-$TEST-$DATV.data"
 STDO="$DATD/perf-$TEST-$DATV.stdout"
 
index 8bf94a02e384d7c77ec823e23f97bfd58a70b6ab..3ad9498753d7b7456f95e643c3d31dabb8818ab8 100755 (executable)
@@ -11,6 +11,7 @@ TEST="thread_loop"
 
 ARGS="2 20"
 DATV="check-tid-2th"
+# shellcheck disable=SC2153
 DATA="$DATD/perf-$TEST-$DATV.data"
 STDO="$DATD/perf-$TEST-$DATV.stdout"
 
index 0dc9ef424233e3ded0c1ed9c6481bc65cb178ea4..4fbb4a29aad3fa9470f1ce8ffa5f827d65f41369 100755 (executable)
@@ -11,6 +11,7 @@ TEST="unroll_loop_thread"
 
 ARGS="10"
 DATV="10"
+# shellcheck disable=SC2153
 DATA="$DATD/perf-$TEST-$DATV.data"
 
 perf record $PERFRECOPT -o "$DATA" "$BIN" $ARGS