public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfstests: exit non-0 if fs check fails
@ 2010-03-31 23:38 Eric Sandeen
  2010-04-01  0:19 ` Dave Chinner
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Sandeen @ 2010-03-31 23:38 UTC (permalink / raw)
  To: xfs-oss

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>
---

(aside - we could make it 2 instead of 1, so that a calling script
could fsck and continue ... thoughts?)

diff --git a/common.rc b/common.rc
index 2103a77..301ae6a 100644
--- a/common.rc
+++ b/common.rc
@@ -959,6 +959,7 @@ _check_generic_filesystem()
         echo "*** mount output ***"                             >>$here/$seq.full
         _mount                                                  >>$here/$seq.full
         echo "*** end mount output"                             >>$here/$seq.full
+        status=1
     elif [ "$type" = "$FSTYP" ]
     then
 	# was mounted ...
@@ -1054,6 +1055,7 @@ _check_xfs_filesystem()
         echo "*** mount output ***"                             >>$here/$seq.full
         _mount                                                  >>$here/$seq.full
         echo "*** end mount output"                             >>$here/$seq.full
+        status=1
     elif [ "$type" = "xfs" ]
     then
 	_mount_or_remount_rw "$extra_mount_options" $device $mountpoint

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-04-15 19:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-31 23:38 [PATCH] xfstests: exit non-0 if fs check fails Eric Sandeen
2010-04-01  0:19 ` Dave Chinner
2010-04-01  1:25   ` Eric Sandeen
2010-04-15 19:29     ` Alex Elder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox