Otherwise these functions cause check to exit if they find corruption
and terminate the whole test.

_check_xfs_filesystem already behaves correctly, make
_check_generic_filesystem and _check_btrfs_filesystem follow the same
behavior.

Signed-off-by: Eryu Guan <[email protected]>
---
 common/rc | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/common/rc b/common/rc
index 765e05a..6bbdc69 100644
--- a/common/rc
+++ b/common/rc
@@ -1719,7 +1719,9 @@ _check_generic_filesystem()
 
     if [ $ok -eq 0 ]; then
        status=1
-       exit 1
+       if [ "$iam" != "check" ]; then
+               exit 1
+       fi
     fi
 
     return 0
@@ -1930,7 +1932,9 @@ _check_btrfs_filesystem()
 
     if [ $ok -eq 0 ]; then
        status=1
-       exit 1
+       if [ "$iam" != "check" ]; then
+               exit 1
+       fi
     fi
 
     return 0
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to