From: "Ricardo B. Marlière" <rbm@suse.com>
To: Shuah Khan <shuah@kernel.org>,
Nathan Chancellor <nathan@kernel.org>,
Nicolas Schier <nsc@kernel.org>
Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kbuild@vger.kernel.org,
"Ricardo B. Marlière" <rbm@suse.com>
Subject: [PATCH 2/6] selftests/run_kselftest.sh: Add missing quotes
Date: Fri, 20 Mar 2026 15:29:17 -0300 [thread overview]
Message-ID: <20260320-selftests-fixes-v1-2-79144f76be01@suse.com> (raw)
In-Reply-To: <20260320-selftests-fixes-v1-0-79144f76be01@suse.com>
Fix the following shellcheck warning:
Double quote to prevent globbing and word splitting. [SC2086]
Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
---
tools/testing/selftests/run_kselftest.sh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/run_kselftest.sh b/tools/testing/selftests/run_kselftest.sh
index 9abea79018d7..b782b025d002 100755
--- a/tools/testing/selftests/run_kselftest.sh
+++ b/tools/testing/selftests/run_kselftest.sh
@@ -11,7 +11,7 @@ else
BASE_DIR=$(readlink -f $(dirname $0))
fi
-cd $BASE_DIR
+cd "$BASE_DIR"
TESTS="$BASE_DIR"/kselftest-list.txt
if [ ! -r "$TESTS" ] ; then
echo "$0: Could not find list of tests to run ($TESTS)" >&2
@@ -38,7 +38,7 @@ Usage: $0 [OPTIONS]
-h | --help Show this usage info
-o | --override-timeout Number of seconds after which we timeout
EOF
- exit $1
+ exit "$1"
}
COLLECTIONS=""
@@ -51,7 +51,7 @@ while true; do
case "$1" in
-s | --summary)
logfile="$BASE_DIR"/output.log
- cat /dev/null > $logfile
+ cat /dev/null > "$logfile"
shift ;;
-p | --per-test-log)
per_test_logging=1
@@ -127,7 +127,7 @@ collections=$(echo "$available" | cut -d: -f1 | sort | uniq)
for collection in $collections ; do
[ -w /dev/kmsg ] && echo "kselftest: Running tests in $collection" >> /dev/kmsg
tests=$(echo "$available" | grep "^$collection:" | cut -d: -f2)
- ($dryrun cd "$collection" && $dryrun run_many $tests)
+ ($dryrun cd "$collection" && $dryrun run_many "$tests")
done
failures="$(cat "$kselftest_failures_file")"
--
2.53.0
next prev parent reply other threads:[~2026-03-20 18:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 18:29 [PATCH 0/6] selftests: run_kselftest.sh cleanup and fixes Ricardo B. Marlière
2026-03-20 18:29 ` [PATCH 1/6] selftests/run_kselftest.sh: Remove unused $ROOT Ricardo B. Marlière
2026-03-20 18:29 ` Ricardo B. Marlière [this message]
2026-03-20 18:29 ` [PATCH 3/6] selftests/run_kselftest.sh: Resolve BASE_DIR with pwd -P Ricardo B. Marlière
2026-03-20 18:29 ` [PATCH 4/6] selftests/run_kselftest.sh: Allow choosing per-test log directory Ricardo B. Marlière
2026-03-20 18:29 ` [PATCH 5/6] selftests: Preserve subtarget failures in all/install Ricardo B. Marlière
2026-03-20 18:29 ` [PATCH 6/6] kbuild: remove kselftest output in mrproper Ricardo B. Marlière
2026-04-10 19:19 ` Shuah Khan
2026-04-11 12:49 ` Ricardo B. Marlière
2026-03-31 22:43 ` [PATCH 0/6] selftests: run_kselftest.sh cleanup and fixes Shuah Khan
2026-04-01 11:45 ` Ricardo B. Marlière
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=20260320-selftests-fixes-v1-2-79144f76be01@suse.com \
--to=rbm@suse.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=nsc@kernel.org \
--cc=shuah@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