Skip to content

Commit ec61ff7

Browse files
committed
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 <[email protected]>
1 parent 35b7cce commit ec61ff7

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tests/block/004

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ requires() {
1515
}
1616

1717
device_requires() {
18-
! _test_dev_is_zoned || _have_fio_zbd_zonemode
18+
if _test_dev_is_zoned; then
19+
_have_fio_zbd_zonemode
20+
_have_program blkzone
21+
fi
1922
}
2023

2124
test_device() {
@@ -24,6 +27,7 @@ test_device() {
2427
local -a opts=()
2528

2629
if _test_dev_is_zoned; then
30+
blkzone reset "$TEST_DEV"
2731
_test_dev_set_scheduler deadline
2832
opts+=("--direct=1" "--zonemode=zbd")
2933
opts+=("--max_open_zones=$(_test_dev_max_open_active_zones)")

0 commit comments

Comments
 (0)