public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <jbacik@fusionio.com>
To: xfs@oss.sgi.com, linxu-btrfs@vger.kernel.org
Subject: [PATCH] xfstests: exit out if _scratch_mount fails
Date: Tue, 9 Jul 2013 15:07:27 -0400	[thread overview]
Message-ID: <1373396847-7975-1-git-send-email-jbacik@fusionio.com> (raw)

I test some of the different mkfs options for btrfs, one set doesn't work
properly with small file systems, so the fs won't mount.  This is fine from a
btrfs point of view, but tests that fail to mount the scratch fs will run
anyway, so if it's a "fill the fs" sort of test this will wreak havoc.  To fix
this just error out of _scratch_mount fails.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
---
 common/rc |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/common/rc b/common/rc
index 4de1329..f11699f 100644
--- a/common/rc
+++ b/common/rc
@@ -276,6 +276,10 @@ _scratch_mount_options()
 _scratch_mount()
 {
     _mount -t $FSTYP `_scratch_mount_options $*`
+    if [ $? -ne 0 ]; then
+	echo "mount failed"
+	exit 1
+    fi
 }
 
 _scratch_unmount()
-- 
1.7.7.6

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

             reply	other threads:[~2013-07-09 19:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-09 19:07 Josef Bacik [this message]
2013-07-19 20:38 ` [PATCH] xfstests: exit out if _scratch_mount fails Ben Myers
2013-07-26 16:12 ` Ben Myers
2013-07-26 16:15   ` Eric Sandeen
2013-07-26 16:25     ` Josef Bacik
2013-07-26 16:33     ` Ben Myers
2013-07-26 16:58       ` Eric Sandeen

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=1373396847-7975-1-git-send-email-jbacik@fusionio.com \
    --to=jbacik@fusionio.com \
    --cc=linxu-btrfs@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox