From 974e2baea30fa45087cfebf86b83b2d47e41ec5b Mon Sep 17 00:00:00 2001 From: Eryu Guan Date: Wed, 24 Dec 2014 14:51:04 +1100 Subject: [PATCH] common: exit only if tests find corruption If _check_xxx_filesystem called by tests when corruption found they exit, but we don't want the calls from the test harness itself to exit when corruption is found. _check_xfs_filesystem already behaves correctly, make _check_generic_filesystem and _check_btrfs_filesystem follow the same behavior. Signed-off-by: Eryu Guan Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner --- common/rc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/common/rc b/common/rc index 82a91c21..de20aa78 100644 --- a/common/rc +++ b/common/rc @@ -1740,7 +1740,9 @@ _check_generic_filesystem() if [ $ok -eq 0 ]; then status=1 - exit 1 + if [ "$iam" != "check" ]; then + exit 1 + fi fi return 0 @@ -1951,7 +1953,9 @@ _check_btrfs_filesystem() if [ $ok -eq 0 ]; then status=1 - exit 1 + if [ "$iam" != "check" ]; then + exit 1 + fi fi return 0 -- 2.39.5