]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfstests: exit non-0 if fs check fails
authorEric Sandeen <sandeen@sandeen.net>
Thu, 1 Apr 2010 03:01:11 +0000 (22:01 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Thu, 1 Apr 2010 03:01:11 +0000 (22:01 -0500)
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 <sandeen@redhat.com>
Reviewed-by: David Chinner <david@fromorbit.com>
common.rc

index 2103a7751d0b8a042687fc30aeb37d85f30497f8..e6d818d005f4cec504d528858fd298599382aacd 100644 (file)
--- 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
 }