From 9d9081821dc32010e4b2dd25aef27afc1c95aa74 Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Wed, 31 Mar 2010 22:01:11 -0500 Subject: [PATCH] xfstests: exit non-0 if fs check fails Right now if any of the _check_scratch_fs tests etc fail, the check script exits but with 0 status. This change will cause the status to be non-0 so we can detect the error. Signed-off-by: Eric Sandeen Reviewed-by: David Chinner --- common.rc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/common.rc b/common.rc index 2103a775..e6d818d0 100644 --- a/common.rc +++ b/common.rc @@ -966,7 +966,11 @@ _check_generic_filesystem() ok=$? fi - [ $ok -eq 0 ] && exit 1 + if [ $ok -eq 0 ]; then + status=1 + exit 1 + fi + return 0 } @@ -1059,7 +1063,11 @@ _check_xfs_filesystem() _mount_or_remount_rw "$extra_mount_options" $device $mountpoint fi - [ $ok -eq 0 ] && exit 1 + if [ $ok -eq 0 ]; then + status=1 + exit 1 + fi + return 0 } -- 2.47.3