From: Eryu Guan <eguan@redhat.com>
To: xfs@oss.sgi.com
Cc: Eryu Guan <eguan@redhat.com>
Subject: [PATCH RESEND] xfstests: _filter_mkfs should consume input from stdin first to avoid EPIPE
Date: Tue, 12 Nov 2013 12:17:54 +0800 [thread overview]
Message-ID: <1384229874-30656-1-git-send-email-eguan@redhat.com> (raw)
_filter_mkfs is a filter so that it should read from stdin first
before printing anything out. Otherwise the command prior to the
pipeline may get EPIPE.
I saw this when testing extN with generic/204, _scratch_mkfs_sized was
unable to create fs because of EPIPE, then _scratch_mount failed.
generic/204 12s ... [failed, exit status 1] - output mismatch (see /root/xfstests/results//generic/204.out.bad)
--- tests/generic/204.out 2013-11-01 16:47:56.728591856 +0800
+++ /root/xfstests/results//generic/204.out.bad 2013-11-01 22:52:53.207828779 +0800
@@ -1,2 +1,7 @@
QA output created by 204
-*** done
+mount: wrong fs type, bad option, bad superblock on /dev/sda6,
+ missing codepage or helper program, or other error
+ In some cases useful info is found in syslog - try
+ dmesg | tail or so
+
Signed-off-by: Eryu Guan <eguan@redhat.com>
---
common/filter | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/common/filter b/common/filter
index e37ce69..faf33e3 100644
--- a/common/filter
+++ b/common/filter
@@ -134,16 +134,19 @@ _filter_date()
# Non XFS filesystems always return a 4k block size and a 256 byte inode.
_filter_mkfs()
{
+ local tmp=/tmp/mkfs_filter
+ cat - >$tmp
+
case $FSTYP in
xfs)
;;
*)
perl -e 'print STDERR "dbsize=4096\nisize=256\n"'
+ rm -f $tmp
return ;;
esac
- set -
- perl -ne '
+ cat $tmp | perl -ne '
if (/^meta-data=([\w,|\/.-]+)\s+isize=(\d+)\s+agcount=(\d+), agsize=(\d+) blks/) {
print STDERR "ddev=$1\nisize=$2\nagcount=$3\nagsize=$4\n";
print STDOUT "meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks\n";
@@ -175,6 +178,7 @@ _filter_mkfs()
print STDERR "rtdev=$1\nrtextsz=$2\nrtblocks=$3\nrtextents=$4\n";
print STDOUT "realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX\n";
}'
+ rm -f $tmp
}
--
1.8.3.1
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next reply other threads:[~2013-11-12 4:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-12 4:17 Eryu Guan [this message]
2013-11-12 4:55 ` [PATCH RESEND] xfstests: _filter_mkfs should consume input from stdin first to avoid EPIPE Dave Chinner
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=1384229874-30656-1-git-send-email-eguan@redhat.com \
--to=eguan@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox