From: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
To: acme@kernel.org, jolsa@kernel.org, adrian.hunter@intel.com,
irogers@google.com, namhyung@kernel.org
Cc: atrajeev@linux.vnet.ibm.com, kjain@linux.ibm.com,
linux-perf-users@vger.kernel.org, maddy@linux.ibm.com,
disgoel@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org
Subject: [PATCH 3/3] tests/shell: Fix shellcheck warnings for SC2153 in multiple scripts
Date: Thu, 7 Sep 2023 22:45:40 +0530 [thread overview]
Message-ID: <20230907171540.36736-4-atrajeev@linux.vnet.ibm.com> (raw)
In-Reply-To: <20230907171540.36736-1-atrajeev@linux.vnet.ibm.com>
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>
---
tools/perf/tests/shell/coresight/asm_pure_loop.sh | 1 +
tools/perf/tests/shell/coresight/memcpy_thread_16k_10.sh | 1 +
tools/perf/tests/shell/coresight/thread_loop_check_tid_10.sh | 1 +
tools/perf/tests/shell/coresight/thread_loop_check_tid_2.sh | 1 +
tools/perf/tests/shell/coresight/unroll_loop_thread_10.sh | 1 +
5 files changed, 5 insertions(+)
diff --git a/tools/perf/tests/shell/coresight/asm_pure_loop.sh b/tools/perf/tests/shell/coresight/asm_pure_loop.sh
index 04387061e9f3..2d65defb7e0f 100755
--- a/tools/perf/tests/shell/coresight/asm_pure_loop.sh
+++ b/tools/perf/tests/shell/coresight/asm_pure_loop.sh
@@ -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
diff --git a/tools/perf/tests/shell/coresight/memcpy_thread_16k_10.sh b/tools/perf/tests/shell/coresight/memcpy_thread_16k_10.sh
index c17e442ac741..ddcc9bb850f5 100755
--- a/tools/perf/tests/shell/coresight/memcpy_thread_16k_10.sh
+++ b/tools/perf/tests/shell/coresight/memcpy_thread_16k_10.sh
@@ -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
diff --git a/tools/perf/tests/shell/coresight/thread_loop_check_tid_10.sh b/tools/perf/tests/shell/coresight/thread_loop_check_tid_10.sh
index e47c4e955d0e..2ce5e139b2fd 100755
--- a/tools/perf/tests/shell/coresight/thread_loop_check_tid_10.sh
+++ b/tools/perf/tests/shell/coresight/thread_loop_check_tid_10.sh
@@ -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"
diff --git a/tools/perf/tests/shell/coresight/thread_loop_check_tid_2.sh b/tools/perf/tests/shell/coresight/thread_loop_check_tid_2.sh
index 8bf94a02e384..3ad9498753d7 100755
--- a/tools/perf/tests/shell/coresight/thread_loop_check_tid_2.sh
+++ b/tools/perf/tests/shell/coresight/thread_loop_check_tid_2.sh
@@ -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"
diff --git a/tools/perf/tests/shell/coresight/unroll_loop_thread_10.sh b/tools/perf/tests/shell/coresight/unroll_loop_thread_10.sh
index 0dc9ef424233..4fbb4a29aad3 100755
--- a/tools/perf/tests/shell/coresight/unroll_loop_thread_10.sh
+++ b/tools/perf/tests/shell/coresight/unroll_loop_thread_10.sh
@@ -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
--
2.31.1
next prev parent reply other threads:[~2023-09-07 17:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-07 17:15 [PATCH 0/3] Fix for shellcheck issues with version "0.6" Athira Rajeev
2023-09-07 17:15 ` [PATCH 1/3] tests/shell: Fix shellcheck SC1090 to handle the location of sourced files Athira Rajeev
2023-09-07 17:15 ` [PATCH 2/3] tests/shell: Fix shellcheck issues in tests/shell/stat+shadow_stat.sh tetscase Athira Rajeev
2023-09-07 17:15 ` Athira Rajeev [this message]
2023-09-07 23:50 ` [PATCH 0/3] Fix for shellcheck issues with version "0.6" Ian Rogers
2023-09-08 14:17 ` Athira Rajeev
2023-09-13 5:02 ` Athira Rajeev
2023-09-25 8:04 ` kajoljain
2023-09-27 4:27 ` Athira Rajeev
2023-09-28 3:54 ` Namhyung Kim
2023-09-30 6:02 ` Athira Rajeev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230907171540.36736-4-atrajeev@linux.vnet.ibm.com \
--to=atrajeev@linux.vnet.ibm.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=disgoel@linux.vnet.ibm.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=kjain@linux.ibm.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=namhyung@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).