From: Shin'ichiro Kawasaki Date: Fri, 4 Aug 2023 12:20:07 +0000 (+0900) Subject: block/004: reset zones of TEST_DEV before fio operation X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ec61ff749846ac07f3e08896c5bfbb20283ca88f;p=users%2Fsagi%2Fblktests.git block/004: reset zones of TEST_DEV before fio operation When test target is a zoned block device with max_active_zones limit larger than max_open_zones, fio write operation may fail depending on zone conditions. To avoid the failure, reset zones of the device before the fio run. Signed-off-by: Shin'ichiro Kawasaki --- diff --git a/tests/block/004 b/tests/block/004 index 63484a4..52a260f 100755 --- a/tests/block/004 +++ b/tests/block/004 @@ -15,7 +15,10 @@ requires() { } device_requires() { - ! _test_dev_is_zoned || _have_fio_zbd_zonemode + if _test_dev_is_zoned; then + _have_fio_zbd_zonemode + _have_program blkzone + fi } test_device() { @@ -24,6 +27,7 @@ test_device() { local -a opts=() if _test_dev_is_zoned; then + blkzone reset "$TEST_DEV" _test_dev_set_scheduler deadline opts+=("--direct=1" "--zonemode=zbd") opts+=("--max_open_zones=$(_test_dev_max_open_active_zones)")