From 0ed2fbfbbc9d5a4bd54736a3667d7238cb5a8f66 Mon Sep 17 00:00:00 2001 From: Dmitry Fomichev Date: Wed, 27 Jan 2021 13:19:30 +0900 Subject: [PATCH] t/zbd: check for error in test #2 With the preceding commit in place, fio gives an error if user attempts to run write I/O size that is larger than the zone size. Grep for that message instead of checking that no write has happened. Signed-off-by: Dmitry Fomichev Reviewed-by: Shin'ichiro Kawasaki Signed-off-by: Jens Axboe --- t/zbd/test-zbd-support | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/zbd/test-zbd-support b/t/zbd/test-zbd-support index acde3b3a..652dddfc 100755 --- a/t/zbd/test-zbd-support +++ b/t/zbd/test-zbd-support @@ -221,8 +221,8 @@ test2() { if [ -z "$is_zbd" ]; then opts+=("--zonesize=${zone_size}") fi - run_fio "${opts[@]}" >> "${logfile}.${test_number}" 2>&1 || return $? - ! grep -q 'WRITE:' "${logfile}.${test_number}" + run_fio "${opts[@]}" >> "${logfile}.${test_number}" 2>&1 && return 1 + grep -q 'buflen exceeds zone size' "${logfile}.${test_number}" } # Run fio against an empty zone. This causes fio to report "No I/O performed". -- 2.25.1