Skip to content

Commit

Permalink
t/zbd: add test case to confirm no max_open_zones limit check
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
kawasaki authored and vincentkfu committed Jan 22, 2025
1 parent f3abed7 commit 0f754a3
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions t/zbd/test-zbd-support
Original file line number Diff line number Diff line change
Expand Up @@ -1608,6 +1608,35 @@ test69() {
>> "${logfile}.${test_number}" 2>&1 || return $?
}

# Test max_open_zones and job_max_open_zones do not error out for non-write jobs
test70() {
require_zbd || return "$SKIP_TESTCASE"

reset_zone "${dev}" -1

# Write data to two zones and make them open
run_fio_on_seq "$(ioengine "psync")" --io_size="$min_seq_write_size" \
--rw=write --offset_increment=1z --numjobs=2 \
--group_reporting=1 >> "${logfile}.${test_number}" 2>&1

# Confirm max_open_zones=1 for read workload does not fail
run_fio_on_seq "$(ioengine "psync")" --io_size="$min_seq_write_size" \
--rw=read --max_open_zones=1 \
>> "${logfile}.${test_number}" 2>&1 || return $?

# Confirm job_max_open_zones=1 for read workload does not fail
run_fio_on_seq "$(ioengine "psync")" --io_size="$min_seq_write_size" \
--rw=read --job_max_open_zones=1 \
>> "${logfile}.${test_number}" 2>&1
grep -q 'valid only for write jobs' \
"${logfile}.${test_number}" || return $?

# Confirm max_open_zones=1 for trim workload does not fail
run_fio_on_seq "$(ioengine "psync")" --rw=trim --io_size=1z \
--bs="$zone_size" --max_open_zones=1 \
>> "${logfile}.${test_number}" 2>&1
}

SECONDS=0
tests=()
dynamic_analyzer=()
Expand Down

0 comments on commit 0f754a3

Please sign in to comment.