[PATCH 10/12] t/zbd: avoid test case 14 failure due to no randam map

Shin'ichiro Kawasaki <[email protected]> Fri, 9 Jan 2026 11:36:01 +0900
Newsgroups org.kernel.vger.fio
Message-ID <[email protected]>
The recent change disabled the random map feature in zonemode=zbd. Then
random writes for conventional zones may have overlap. This made the
test case 14 fail. To avoid the failure, modify the test case to count
the number of overlaps.

Signed-off-by: Shin'ichiro Kawasaki <[email protected]>
---
 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 40f1de90..e7a711b9 100755
--- a/t/zbd/test-zbd-support
+++ b/t/zbd/test-zbd-support
@@ -637,7 +637,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"
@@ -650,10 +650,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