[PATCH v2 6/8] t/zbd: avoid test case 14 failure with write_zone_remainder option

Shin'ichiro Kawasaki
2026-02-16T07:59:46Z

When -m option is provided for t/zbd/test-zbd-support, the option
write_zone_remainder is specified to fio. In this case, the test case
14 fails because the random map feature is disabled and then random
writes for conventional zones may have overlap. To avoid the failure,
modify the test case to count the number of overlaps.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
t/zbd/test-zbd-support | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/t/zbd/test-zbd-support b/t/zbd/test-zbd-support
index 01fb4dd3..e5a5f75b 100755
--- a/t/zbd/test-zbd-support
+++ b/t/zbd/test-zbd-support
@@ -665,7 +665,7 @@ test13() {

# Random write to conventional zones.
test14() {
- local off size
+ local off size nr_overlaps

if ! result=($(first_online_zone "$dev")); then
echo "Failed to determine first online zone"
@@ -678,10 +678,11 @@ test14() {

run_one_fio_job "$(ioengine "libaio")" --iodepth=64 --rw=randwrite --bs=16K \
--zonemode=zbd --zonesize="${zone_size}" --do_verify=1 \
- --verify=md5 --offset=$off --size=$size\
+ --verify=md5 --offset=$off --size=$size --debug=io \
>>"${logfile}.${test_number}" 2>&1 || return $?
+ nr_overlaps=$(grep "iolog: overlap" --count "${logfile}.${test_number}")
check_written $((size)) || return $?
- check_read $((size)) || return $?
+ check_read $((size - nr_overlaps * 16 * 1024)) || return $?
}

# Sequential read on a mix of empty and full zones.
--
2.49.0