All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Fomichev <dmitry.fomichev@wdc.com>
To: Jens Axboe <axboe@kernel.dk>, fio@vger.kernel.org
Cc: Damien Le Moal <damien.lemoal@wdc.com>,
	Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>,
	Niklas Cassel <niklas.cassel@wdc.com>,
	Dmitry Fomichev <dmitry.fomichev@wdc.com>
Subject: [PATCH 1/2] t/zbd: fix max_open_zones determination in tests
Date: Sun, 16 Oct 2022 10:43:08 +0900	[thread overview]
Message-ID: <20221016014309.53682-1-dmitry.fomichev@wdc.com> (raw)

The test script erroneously falls back to using libzbc for finding out
the max_open_zones setting if the device being tested is not a SCSI
device. This causes false positives if libzbc is not installed in the
test system. To fix, unless the option to use libzbc is explicitly set,
set this value to 0 for non-SCSI devices to let fio find the actual
max_open_zones value using the system block interface.

Signed-off-by: Dmitry Fomichev <dmitry.fomichev@wdc.com>
---
 t/zbd/functions | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/t/zbd/functions b/t/zbd/functions
index 7cff18fd..812320f5 100644
--- a/t/zbd/functions
+++ b/t/zbd/functions
@@ -230,9 +230,11 @@ max_open_zones() {
 		    echo ${max_nr_open_zones}
 		}
 	fi
-    else
+    elif [ -n "${use_libzbc}" ]; then
 	${zbc_report_zones} "$dev" |
 	    sed -n 's/^[[:blank:]]*Maximum number of open sequential write required zones:[[:blank:]]*//p'
+    else
+	echo 0
     fi
 }
 
-- 
2.37.3


             reply	other threads:[~2022-10-16  1:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-16  1:43 Dmitry Fomichev [this message]
2022-10-16  1:43 ` [PATCH 2/2] t/zbd: add a CLI option to force io_uring Dmitry Fomichev
2022-10-16 23:05 ` [PATCH 1/2] t/zbd: fix max_open_zones determination in tests Jens Axboe

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=20221016014309.53682-1-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 \
    /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.