All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: xfs-oss <xfs@oss.sgi.com>
Subject: [PATCH] xfstests: exit non-0 if fs check fails
Date: Wed, 31 Mar 2010 18:38:23 -0500	[thread overview]
Message-ID: <4BB3DCEF.8040704@redhat.com> (raw)

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

             reply	other threads:[~2010-03-31 23:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-31 23:38 Eric Sandeen [this message]
2010-04-01  0:19 ` [PATCH] xfstests: exit non-0 if fs check fails Dave Chinner
2010-04-01  1:25   ` Eric Sandeen
2010-04-15 19:29     ` Alex Elder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BB3DCEF.8040704@redhat.com \
    --to=sandeen@redhat.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.