From: Shin'ichiro Kawasaki Date: Wed, 19 Jul 2023 10:57:53 +0000 (+0900) Subject: t/zbd: fix fio failure check and SG node failure in test case 31 X-Git-Tag: fio-3.36~48 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=4c99637ecee9bcbd96b4e91f2b627b276a905118;p=fio.git t/zbd: fix fio failure check and SG node failure in test case 31 The test case 31 runs fio twice but the failure of the first fio run was not checked. This allowed the test case pass even with wrong max_open_zones value. To fix this, check exit code of the fio run. Also, the first fio run fails when the test target devices are SG nodes, since libzbc I/O engine is not used. To fix this, call the ioengine() helper function which adjusts I/O engine for each device. Signed-off-by: Shin'ichiro Kawasaki Link: https://lore.kernel.org/r/20230719105756.553146-11-shinichiro.kawasaki@wdc.com Signed-off-by: Vincent Fu --- diff --git a/t/zbd/test-zbd-support b/t/zbd/test-zbd-support index 1d1d389b..71cb18bb 100755 --- a/t/zbd/test-zbd-support +++ b/t/zbd/test-zbd-support @@ -794,9 +794,10 @@ test31() { opts=("--name=$dev" "--filename=$dev" "--rw=write" "--bs=${bs}") opts+=("--offset=$off" "--size=$((inc * nz))" "--io_size=$((bs * nz))") opts+=("--zonemode=strided" "--zonesize=${bs}" "--zonerange=${inc}") - opts+=("--direct=1") + opts+=("--direct=1" "$(ioengine "psync")") echo "fio ${opts[@]}" >> "${logfile}.${test_number}" - "$(dirname "$0")/../../fio" "${opts[@]}" >> "${logfile}.${test_number}" 2>&1 + "$(dirname "$0")/../../fio" "${opts[@]}" >> "${logfile}.${test_number}" \ + 2>&1 || return $? # Next, run the test. opts=("--name=$dev" "--filename=$dev" "--offset=$off" "--size=$size")