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@xxxxxxx> --- tests/generic/551 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/generic/551 b/tests/generic/551 index 2689270aa3dd..58c7f9a516c7 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 -- 2.41.0