From 0123751ca55fe462e8888c8d7b8c7def14b74ab3 Mon Sep 17 00:00:00 2001 From: Shin'ichiro Kawasaki Date: Wed, 15 Jul 2020 13:13:18 +0900 Subject: [PATCH] t/zbd: Combine write and read fio commands for test case #6 The test case #6 checks result of the read job which reads data written by the write job of test case #5. It does not work if test case #6 is executed alone with the -t option and the target device has all zones empty. Specify both the write job and the read job to a single fio command using write_and_run_one_fio_job() helper function instead of run_fio_on_seq() helper function. Reviewed-by: Damien Le Moal Signed-off-by: Shin'ichiro Kawasaki Signed-off-by: Jens Axboe --- t/zbd/test-zbd-support | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/t/zbd/test-zbd-support b/t/zbd/test-zbd-support index 55363357..eccb5178 100755 --- a/t/zbd/test-zbd-support +++ b/t/zbd/test-zbd-support @@ -215,14 +215,18 @@ test5() { check_read $size || return $? } -# Sequential read from sequential zones. Must be run after test5. +# Sequential read from sequential zones. test6() { local size size=$((4 * zone_size)) - run_fio_on_seq "$(ioengine "psync")" --iodepth=1 --rw=read \ - --bs="$(max $((zone_size / 64)) "$logical_block_size")"\ - >>"${logfile}.${test_number}" 2>&1 || return $? + write_and_run_one_fio_job \ + $((first_sequential_zone_sector * 512)) "${size}" \ + --offset=$((first_sequential_zone_sector * 512)) \ + --size="${size}" --zonemode=zbd --zonesize="${zone_size}" \ + "$(ioengine "psync")" --iodepth=1 --rw=read \ + --bs="$(max $((zone_size / 64)) "$logical_block_size")" \ + >>"${logfile}.${test_number}" 2>&1 || return $? check_read $size || return $? } -- 2.25.1