diff mbox

[1/3] common: exit only if _check_xxx_filesystem called by tests when corruption found

Message ID 1418730102-17061-1-git-send-email-eguan@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Eryu Guan Dec. 16, 2014, 11:41 a.m. UTC
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 <eguan@redhat.com>
---
 common/rc | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
diff mbox

Patch

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