From: marc.herbert@linux.intel.com
To: linux-cxl@vger.kernel.org, nvdimm@lists.linux.dev,
alison.schofield@intel.com, dan.j.williams@intel.com,
dave.jiang@intel.com
Cc: Marc Herbert <marc.herbert@linux.intel.com>
Subject: [ndctl PATCH 1/3] test/common: add missing quotes
Date: Thu, 24 Jul 2025 22:00:44 +0000 [thread overview]
Message-ID: <20250724221323.365191-2-marc.herbert@linux.intel.com> (raw)
In-Reply-To: <20250724221323.365191-1-marc.herbert@linux.intel.com>
From: Marc Herbert <marc.herbert@linux.intel.com>
This makes shellcheck much happier and its output readable and usable.
Signed-off-by: Marc Herbert <marc.herbert@linux.intel.com>
---
test/common | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/test/common b/test/common
index 75ff1a6e12be..2d8422f26436 100644
--- a/test/common
+++ b/test/common
@@ -4,7 +4,7 @@
# Global variables
# NDCTL
-if [ -z $NDCTL ]; then
+if [ -z "$NDCTL" ]; then
if [ -f "../ndctl/ndctl" ] && [ -x "../ndctl/ndctl" ]; then
export NDCTL=../ndctl/ndctl
elif [ -f "./ndctl/ndctl" ] && [ -x "./ndctl/ndctl" ]; then
@@ -16,7 +16,7 @@ if [ -z $NDCTL ]; then
fi
# DAXCTL
-if [ -z $DAXCTL ]; then
+if [ -z "$DAXCTL" ]; then
if [ -f "../daxctl/daxctl" ] && [ -x "../daxctl/daxctl" ]; then
export DAXCTL=../daxctl/daxctl
elif [ -f "./daxctl/daxctl" ] && [ -x "./daxctl/daxctl" ]; then
@@ -28,7 +28,7 @@ if [ -z $DAXCTL ]; then
fi
# CXL
-if [ -z $CXL ]; then
+if [ -z "$CXL" ]; then
if [ -f "../cxl/cxl" ] && [ -x "../cxl/cxl" ]; then
export CXL=../cxl/cxl
elif [ -f "./cxl/cxl" ] && [ -x "./cxl/cxl" ]; then
@@ -39,7 +39,7 @@ if [ -z $CXL ]; then
fi
fi
-if [ -z $TEST_PATH ]; then
+if [ -z "$TEST_PATH" ]; then
export TEST_PATH=.
fi
@@ -103,7 +103,7 @@ check_min_kver()
#
do_skip()
{
- echo kernel $(uname -r): $1
+ echo kernel "$(uname -r)": "$1"
exit 77
}
@@ -147,7 +147,7 @@ check_dmesg()
# validate no WARN or lockdep report during the run
sleep 1
log=$(journalctl -r -k --since "-$((SECONDS+1))s")
- grep -q "Call Trace" <<< $log && err $1
+ grep -q "Call Trace" <<< "$log" && err "$1"
true
}
--
2.50.1
next prev parent reply other threads:[~2025-07-24 22:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-24 22:00 test/common: stop relying on bash $SECONDS in check_dmesg() marc.herbert
2025-07-24 22:00 ` marc.herbert [this message]
2025-07-29 15:14 ` [ndctl PATCH 1/3] test/common: add missing quotes Dave Jiang
2025-08-06 21:43 ` Alison Schofield
2025-07-24 22:00 ` [ndctl PATCH 2/3] test/common: move err() function at the top marc.herbert
2025-07-29 15:14 ` Dave Jiang
2025-08-06 21:44 ` Alison Schofield
2025-07-24 22:00 ` [ndctl PATCH 3/3] test/common: stop relying on bash $SECONDS in check_dmesg() marc.herbert
2025-07-29 15:19 ` Dave Jiang
2025-08-22 0:10 ` Alison Schofield
2025-08-22 0:21 ` Alison Schofield
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=20250724221323.365191-2-marc.herbert@linux.intel.com \
--to=marc.herbert@linux.intel.com \
--cc=alison.schofield@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=nvdimm@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.