fio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Fomichev <dmitry.fomichev@wdc.com>
To: Jens Axboe <axboe@kernel.dk>, Vincent Fu <vincent.fu@samsung.com>,
	fio@vger.kernel.org
Cc: Damien Le Moal <damien.lemoal@wdc.com>,
	Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>,
	Niklas Cassel <niklas.cassel@wdc.com>,
	Dmitry Fomichev <dmitry.fomichev@wdc.com>
Subject: [PATCH 5/5] t/zbd: add -s option to test-zbd-support script
Date: Mon,  5 Feb 2024 06:16:37 +0900	[thread overview]
Message-ID: <20240204211637.210199-6-dmitry.fomichev@wdc.com> (raw)
In-Reply-To: <20240204211637.210199-1-dmitry.fomichev@wdc.com>

The total number of ZBD tests in test-zbd-support script has grown
considerably over the years and zoned drive capacity has significantly
increased as well. Today, the test run duration may reach one hour for
large drives. If a terminal session failure happens during a run, it
is more efficient to restart the tests from the point where the last
run stopped rather than from the beginning.

Add -s option to the script command line to specify the starting
test number.

Signed-off-by: Dmitry Fomichev <dmitry.fomichev@wdc.com>
---
 t/zbd/test-zbd-support | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/t/zbd/test-zbd-support b/t/zbd/test-zbd-support
index defb3652..c27d2ad6 100755
--- a/t/zbd/test-zbd-support
+++ b/t/zbd/test-zbd-support
@@ -15,6 +15,7 @@ usage() {
 	echo -e "\t-w Reset all zones before executing each write test case"
 	echo -e "\t-o <max_open_zones> Run fio with max_open_zones limit"
 	echo -e "\t-t <test #> Run only a single test case with specified number"
+	echo -e "\t-s <test #> Start testing from the case with the specified number"
 	echo -e "\t-q Quit the test run after any failed test"
 	echo -e "\t-z Run fio with debug=zbd option"
 	echo -e "\t-u Use io_uring ioengine in place of libaio"
@@ -1602,6 +1603,7 @@ zbd_debug=
 max_open_zones_opt=
 quit_on_err=
 force_io_uring=
+start_test=1
 
 while [ "${1#-}" != "$1" ]; do
   case "$1" in
@@ -1615,6 +1617,7 @@ while [ "${1#-}" != "$1" ]; do
     -w) reset_before_write=1; shift;;
     -t) tests+=("$2"); shift; shift;;
     -o) max_open_zones_opt="${2}"; shift; shift;;
+    -s) start_test=$2; shift; shift;;
     -v) dynamic_analyzer=(valgrind "--read-var-info=yes");
 	shift;;
     -q) quit_on_err=1; shift;;
@@ -1694,6 +1697,7 @@ if [[ -b "$realdev" ]]; then
 		set_io_scheduler "$basename" none || exit $?
 		;;
 	esac
+
 elif [[ -c "$realdev" ]]; then
 	# For an SG node, we must have libzbc option specified
 	if [[ ! -n "$use_libzbc" ]]; then
@@ -1772,6 +1776,7 @@ trap 'intr=1' SIGINT
 ret=0
 
 for test_number in "${tests[@]}"; do
+    [ "${test_number}" -lt "${start_test}" ] && continue
     rm -f "${logfile}.${test_number}"
     unset SKIP_REASON
     echo -n "Running test $(printf "%02d" $test_number) ... "
-- 
2.37.3


      parent reply	other threads:[~2024-02-04 21:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-04 21:16 [PATCH 0/5] zbd, t/zbd: miscellaneous fixes Dmitry Fomichev
2024-02-04 21:16 ` [PATCH 1/5] zbd: avoid assertions during sequential read I/O Dmitry Fomichev
2024-02-04 21:16 ` [PATCH 2/5] oslib: log BLKREPORTZONE error code Dmitry Fomichev
2024-02-04 21:16 ` [PATCH 3/5] zbd: use a helper to calculate zone index Dmitry Fomichev
2024-02-04 21:16 ` [PATCH 4/5] t/zbd: check device for unrestricted read support Dmitry Fomichev
2024-02-04 21:16 ` Dmitry Fomichev [this message]

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=20240204211637.210199-6-dmitry.fomichev@wdc.com \
    --to=dmitry.fomichev@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=damien.lemoal@wdc.com \
    --cc=fio@vger.kernel.org \
    --cc=niklas.cassel@wdc.com \
    --cc=shinichiro.kawasaki@wdc.com \
    --cc=vincent.fu@samsung.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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).