]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
common: return failure if _check_xxx_filesystem find corruption
authorEryu Guan <eguan@redhat.com>
Wed, 24 Dec 2014 03:51:25 +0000 (14:51 +1100)
committerDave Chinner <david@fromorbit.com>
Wed, 24 Dec 2014 03:51:25 +0000 (14:51 +1100)
So the callers could know if these functions find corruptions by the
return value.

Signed-off-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
common/rc

index de20aa78817eb59b07ea96400a285819a2bd00bf..f475818558456ce793daee4e129088b27654e86d 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -1743,6 +1743,7 @@ _check_generic_filesystem()
        if [ "$iam" != "check" ]; then
                exit 1
        fi
+       return 1
     fi
 
     return 0
@@ -1844,6 +1845,7 @@ _check_xfs_filesystem()
        if [ "$iam" != "check" ]; then
                exit 1
        fi
+       return 1
     fi
 
     return 0
@@ -1888,7 +1890,8 @@ _check_udf_filesystem()
     $here/src/udf_test $OPT_ARG $device | tee $seqres.checkfs | egrep "Error|Warning" | \
        _udf_test_known_error_filter | \
        egrep -iv "Error count:.*[0-9]+.*total occurrences:.*[0-9]+|Warning count:.*[0-9]+.*total occurrences:.*[0-9]+" && \
-        echo "Warning UDF Verifier reported errors see $seqres.checkfs."
+        echo "Warning UDF Verifier reported errors see $seqres.checkfs." && return 1
+    return 0
 }
 
 _check_xfs_test_fs()
@@ -1956,6 +1959,7 @@ _check_btrfs_filesystem()
        if [ "$iam" != "check" ]; then
                exit 1
        fi
+       return 1
     fi
 
     return 0