aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNaohiro Aota <naohiro.aota@wdc.com>2023-08-22 16:28:52 +0900
committerZorro Lang <zlang@kernel.org>2023-09-02 03:27:32 +0800
commitd3bbcf20d8a26f51b6a94b7c05f8eb88cd8a500d (patch)
treef776a807991eb299934fc6c9428a366e412d93e0
parentc5e4bff3a8a4e88c75c72f387ac94cf910cc725a (diff)
downloadxfstests-dev-d3bbcf20d8a26f51b6a94b7c05f8eb88cd8a500d.tar.gz
generic/551: bail out test if aio-dio-write-verify failed
When the AIO program failed, it is better to bail out the test to keep the failed state intact. Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com> Reviewed-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
-rwxr-xr-xtests/generic/5516
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/generic/551 b/tests/generic/551
index 2689270aa3..58c7f9a516 100755
--- a/tests/generic/551
+++ b/tests/generic/551
@@ -56,16 +56,18 @@ do_test()
truncsize=$(((RANDOM * diosize + RANDOM % diosize) % max_io_size_b))
$AIO_TEST -t $truncsize $oper_list $localfile
- if [ $? -ne 0 ];then
+ ret=$?
+ if [ $ret -ne 0 ];then
echo "$AIO_TEST -t $truncsize $oper_list $localfile"
echo "==========^^ Fail ^^=========="
fi
+ return $ret
}
testimes=$((LOAD_FACTOR * 100))
while [ $testimes -gt 0 ]; do
echo > $localfile
- do_test
+ do_test || break
((testimes--))
done