Linux-Block Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH blktests] Restore support for running tests without prior test results
@ 2020-05-20 16:52 Bart Van Assche
  0 siblings, 0 replies; only message in thread
From: Bart Van Assche @ 2020-05-20 16:52 UTC (permalink / raw)
  To: Omar Sandoval; +Cc: linux-block, Bart Van Assche

This patch fixes the following runtime error:

./check: line 245: LAST_TEST_RUN: unbound variable

Fixes: 203b5723a28e ("Show last run for skipped tests")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 check | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/check b/check
index 0a4e539a5cd9..5151d01995ac 100755
--- a/check
+++ b/check
@@ -240,9 +240,15 @@ _output_last_test_run() {
 }
 
 _output_test_run() {
+	local param_count
 	if [[ -t 1 ]]; then
 		# Move the cursor back up to the status.
-		tput cuu $((${#LAST_TEST_RUN[@]} + 1))
+		if [ -n "${LAST_TEST_RUN+set}" ]; then
+			param_count=${#LAST_TEST_RUN[@]}
+		else
+			param_count=0
+		fi
+		tput cuu $((param_count + 1))
 	fi
 
 	local status=${TEST_RUN["status"]}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-20 16:52 [PATCH blktests] Restore support for running tests without prior test results Bart Van Assche

Linux-Block Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-block/0 linux-block/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-block linux-block/ https://lore.kernel.org/linux-block \
		linux-block@vger.kernel.org
	public-inbox-index linux-block

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-block


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git