From: Eryu Guan <eguan@redhat.com>
To: fstests@vger.kernel.org
Cc: Eryu Guan <eguan@redhat.com>, xfs@oss.sgi.com
Subject: [PATCH v2] xfs/005: filter _scratch_mount output to match golden image
Date: Fri, 23 May 2014 11:43:23 +0800 [thread overview]
Message-ID: <1400816603-2263-1-git-send-email-eguan@redhat.com> (raw)
Failure message of mount has been changed since util-linux v2.21, to
something like:
mount: mount /dev/sda5 on /mnt/scratch failed: Structure needs cleaning
Filter the output to match the golden image for newer mount binary so
that both old and new version of mount work correctly.
Signed-off-by: Eryu Guan <eguan@redhat.com>
---
v2: filter the mount error message instead of changing the golden image
tests/xfs/005 | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tests/xfs/005 b/tests/xfs/005
index 94157c4..509ac61 100755
--- a/tests/xfs/005
+++ b/tests/xfs/005
@@ -40,6 +40,11 @@ _cleanup()
rm -f $tmp.*
}
+filter_mount()
+{
+ sed -e "s/mount .* failed: //"
+}
+
# get standard environment, filters and checks
. ./common/rc
. ./common/filter
@@ -59,7 +64,7 @@ _scratch_mkfs_xfs -m crc=1 >> $seqres.full 2>&1 || _fail "mkfs failed"
$XFS_IO_PROG -c "pwrite 224 4" $SCRATCH_DEV | _filter_xfs_io
# should FAIL, the crc is bad; golden output contains mount failure
-_scratch_mount
+_scratch_mount 2>&1 | filter_mount
# success, all done
status=0
--
1.9.0
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next reply other threads:[~2014-05-23 3:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-23 3:43 Eryu Guan [this message]
2014-05-23 11:39 ` [PATCH v2] xfs/005: filter _scratch_mount output to match golden image Brian Foster
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=1400816603-2263-1-git-send-email-eguan@redhat.com \
--to=eguan@redhat.com \
--cc=fstests@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