From 842fb796d249ef4c2b97a54442aa8055668888a0 Mon Sep 17 00:00:00 2001 From: Dmitry Fomichev Date: Sun, 16 Oct 2022 10:43:08 +0900 Subject: [PATCH] t/zbd: fix max_open_zones determination in tests 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 Link: https://lore.kernel.org/r/20221016014309.53682-1-dmitry.fomichev@wdc.com Signed-off-by: Jens Axboe --- 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.25.1