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 V2 1/3] tools/perf/tests Ignore the shellcheck SC2046 warning in lock_contention
Date: Fri, 13 Oct 2023 13:00:19 +0530 [thread overview]
Message-ID: <20231013073021.99794-2-atrajeev@linux.vnet.ibm.com> (raw)
In-Reply-To: <20231013073021.99794-1-atrajeev@linux.vnet.ibm.com>
Running shellcheck on lock_contention.sh generates below
warning
In tests/shell/lock_contention.sh line 36:
if [ `nproc` -lt 4 ]; then
^-----^ SC2046: Quote this to prevent word splitting.
Here since nproc will generate a single word output
and there is no possibility of word splitting, this
warning can be ignored. Use exception for this with
"disable" option in shellcheck. This warning is observed
after commit:
"commit 29441ab3a30a ("perf test lock_contention.sh: Skip test
if not enough CPUs")"
Fixes: 29441ab3a30a ("perf test lock_contention.sh: Skip test if not enough CPUs")
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Reviewed-by: Kajol Jain <kjain@linux.ibm.com>
---
changelog:
v1 -> v2:
Add Reviewed-by from Kajol Jain
tools/perf/tests/shell/lock_contention.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/perf/tests/shell/lock_contention.sh b/tools/perf/tests/shell/lock_contention.sh
index d5a191d3d090..c1ec5762215b 100755
--- a/tools/perf/tests/shell/lock_contention.sh
+++ b/tools/perf/tests/shell/lock_contention.sh
@@ -33,6 +33,7 @@ check() {
exit
fi
+ # shellcheck disable=SC2046
if [ `nproc` -lt 4 ]; then
echo "[Skip] Low number of CPUs (`nproc`), lock event cannot be triggered certainly"
err=2
--
2.31.1
next prev parent reply other threads:[~2023-10-13 7:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-13 7:30 [PATCH V2 0/3] Fix for shellcheck issues with latest scripts in tests/shell Athira Rajeev
2023-10-13 7:30 ` Athira Rajeev [this message]
2023-10-13 7:30 ` [PATCH V2 2/3] tools/perf/tests: Fix shellcheck warning in record_sideband.sh test Athira Rajeev
2023-10-13 7:30 ` [PATCH V2 3/3] tools/perf/tests/shell: Fix shellcheck warning SC2112 with stat_all_metricgroups Athira Rajeev
2023-10-17 2:04 ` [PATCH V2 0/3] Fix for shellcheck issues with latest scripts in tests/shell Namhyung Kim
2023-10-17 19:55 ` Namhyung Kim
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=20231013073021.99794-2-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).