From: Dmitry Fomichev Date: Sun, 16 Oct 2022 01:43:08 +0000 (+0900) Subject: t/zbd: fix max_open_zones determination in tests X-Git-Tag: fio-3.33~15 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=842fb796d249ef4c2b97a54442aa8055668888a0;p=fio.git 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 --- 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 }