Skip to content

Commit 0f754a3

Browse files
kawasakivincentkfu
authored andcommitted
t/zbd: add test case to confirm no max_open_zones limit check
The previous commit fixed the max_open_zones limit check for non-write jobs. Add a test case to confirm the fix. Signed-off-by: Shin'ichiro Kawasaki <[email protected]> Reviewed-by: Damien Le Moal <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vincent Fu <[email protected]>
1 parent f3abed7 commit 0f754a3

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

t/zbd/test-zbd-support

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,6 +1608,35 @@ test69() {
16081608
>> "${logfile}.${test_number}" 2>&1 || return $?
16091609
}
16101610

1611+
# Test max_open_zones and job_max_open_zones do not error out for non-write jobs
1612+
test70() {
1613+
require_zbd || return "$SKIP_TESTCASE"
1614+
1615+
reset_zone "${dev}" -1
1616+
1617+
# Write data to two zones and make them open
1618+
run_fio_on_seq "$(ioengine "psync")" --io_size="$min_seq_write_size" \
1619+
--rw=write --offset_increment=1z --numjobs=2 \
1620+
--group_reporting=1 >> "${logfile}.${test_number}" 2>&1
1621+
1622+
# Confirm max_open_zones=1 for read workload does not fail
1623+
run_fio_on_seq "$(ioengine "psync")" --io_size="$min_seq_write_size" \
1624+
--rw=read --max_open_zones=1 \
1625+
>> "${logfile}.${test_number}" 2>&1 || return $?
1626+
1627+
# Confirm job_max_open_zones=1 for read workload does not fail
1628+
run_fio_on_seq "$(ioengine "psync")" --io_size="$min_seq_write_size" \
1629+
--rw=read --job_max_open_zones=1 \
1630+
>> "${logfile}.${test_number}" 2>&1
1631+
grep -q 'valid only for write jobs' \
1632+
"${logfile}.${test_number}" || return $?
1633+
1634+
# Confirm max_open_zones=1 for trim workload does not fail
1635+
run_fio_on_seq "$(ioengine "psync")" --rw=trim --io_size=1z \
1636+
--bs="$zone_size" --max_open_zones=1 \
1637+
>> "${logfile}.${test_number}" 2>&1
1638+
}
1639+
16111640
SECONDS=0
16121641
tests=()
16131642
dynamic_analyzer=()

0 commit comments

Comments
 (0)