public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: passt-dev@passt.top, Stefano Brivio <sbrivio@redhat.com>
Cc: David Gibson <david@gibson.dropbear.id.au>
Subject: [PATCH v2 1/3] test: Use ${} consistently in lib/exeter
Date: Fri, 10 Oct 2025 14:45:47 +1100	[thread overview]
Message-ID: <20251010034549.1821828-2-david@gibson.dropbear.id.au> (raw)
In-Reply-To: <20251010034549.1821828-1-david@gibson.dropbear.id.au>

Most of the test shell scripts use {} around variable names even when it's
not required, for consistency.  lib/exeter didn't do so consistently,
however.  Correct that.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
 test/lib/exeter | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/test/lib/exeter b/test/lib/exeter
index 3b19beaa..0b361599 100644
--- a/test/lib/exeter
+++ b/test/lib/exeter
@@ -13,18 +13,18 @@
 # Copyright Red Hat
 # Author: David Gibson <david@gibson.dropbear.id.au>
 
-EXETOOL="$BASEPATH/exeter/exetool/exetool"
+EXETOOL="${BASEPATH}/exeter/exetool/exetool"
 
 # is_exeter() - Determine if a test file is an exeter program
 # $@:	Command line to invoke test program
 is_exeter() {
-	$EXETOOL probe -- "$@"
+	${EXETOOL} probe -- "${@}"
 }
 
 # exeter() - Run each test in an exeter program, logging each test separately
 # $@:	Command line to invoke exeter test program
 exeter() {
-	STATESETUP="${STATEBASE}/$1"
+	STATESETUP="${STATEBASE}/${1}"
 	mkdir -p "${STATESETUP}"
 
 	context_setup_host host
@@ -32,9 +32,9 @@ exeter() {
 
 	cd test
 
-	__ntests=$($EXETOOL list -- "$@" | wc -l)
-	if [ $? != 0 ]; then
-		info "Failed to get exeter manifest for $@"
+	__ntests=$(${EXETOOL} list -- "${@}" | wc -l)
+	if [ ${?} != 0 ]; then
+		info "Failed to get exeter manifest for ${@}"
 		pause_continue \
 			"Press any key to pause test session"		\
 			"Resuming in "					\
@@ -43,13 +43,13 @@ exeter() {
 		return
 	fi
 
-	status_file_start "$* (exeter)" ${__ntests}
+	status_file_start "${*} (exeter)" ${__ntests}
 	[ ${CI} -eq 1 ] && video_link "${1}"
 
-	for __testid in $($EXETOOL list -- "$@"); do
-		__desc="$($EXETOOL desc -- "$@" -- ${__testid})"
+	for __testid in $(${EXETOOL} list -- "${@}"); do
+		__desc="$(${EXETOOL} desc -- "${@}" -- ${__testid})"
 		status_test_start "${__desc}"
-		context_run host "$@" "${__testid}" && status_test_ok || status_test_fail
+		context_run host "${@}" "${__testid}" && status_test_ok || status_test_fail
 	done
 
 	cd ..
-- 
2.51.0


  reply	other threads:[~2025-10-10  3:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-10  3:45 [PATCH v2 0/3] Fixes to exeter test integration David Gibson
2025-10-10  3:45 ` David Gibson [this message]
2025-10-10  3:45 ` [PATCH v2 2/3] test: Add some missing quoting in exeter runner David Gibson
2025-10-10  3:45 ` [PATCH v2 3/3] test: For missing static checkers, skip rather than failing tests David Gibson

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=20251010034549.1821828-2-david@gibson.dropbear.id.au \
    --to=david@gibson.dropbear.id.au \
    --cc=passt-dev@passt.top \
    --cc=sbrivio@redhat.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

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 IMAP folder(s).