From: Eryu Guan <eguan@redhat.com>
To: Jan Kara <jack@suse.cz>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH] Ignore "yes: standard output: Broken pipe" errors
Date: Wed, 26 Jul 2017 18:22:21 +0800 [thread overview]
Message-ID: <20170726102221.GY9167@eguan.usersys.redhat.com> (raw)
In-Reply-To: <20170726082213.GA13488@quack2.suse.cz>
On Wed, Jul 26, 2017 at 10:22:13AM +0200, Jan Kara wrote:
> On Wed 26-07-17 15:47:19, Eryu Guan wrote:
> > On Tue, Jul 25, 2017 at 04:33:20PM +0200, Jan Kara wrote:
> > > Recently, some tests started failing because they had
> > >
> > > yes: standard output: Broken pipe
> > >
> > > in their output. Fix the problem by discarding errors from yes(1)
> > > program.
> > >
> > > Signed-off-by: Jan Kara <jack@suse.cz>
> > > ---
> > > common/rc | 12 ++++++------
> > > tests/generic/081 | 2 +-
> > > tests/generic/108 | 2 +-
> > > 3 files changed, 8 insertions(+), 8 deletions(-)
> >
> > I'm wondering which case failed for you and what's the diff output and
> > .full file? And what change caused the failure for you? Because I didn't
> > see any failure on my RHEL7 box nor Fedora rawhide box. I compiled
> > latest yes from coreutils git repo and didn't hit the error either.
> >
> > So I suspect that it might be other commands in the pipeline that failed
> > and caused the broken pipe.
>
> I've started seeing failures after I've updated the testing VM to openSUSE
> Leap 42.2. And yes(1) failing with this error is "normal" if SIGPIPE is
> ignored - just try ( trap "" PIPE; yes | exit; ) and observe the error.
> So it is just that in the new VM something makes yes(1) ignore SIGPIPE and
> honestly I'm not sure what that is even though I've looked for a while. But
> regardless of that, ignoring stderr from yes(1) seems like a safe thing to
> do.
Ahh, I see the problem. Actually Eric Biggers has fixed a very similar
problem in commit 9bcb266cd778 ("generic/397: be compatible with ignored
SIGPIPE"), but at that time he only saw generic/397 failure, so he
decided to fix that test only.
How about print out warnings and exit if check finds SIGPIPE is ignored?
Because seems we can't un-ignore it in a sub-shell, if it's already
ignored on start. e.g.
if trap -p | grep -q "'' SIGPIPE"; then
echo "SIGPIPE is ignored by current shell, this will cause unexpected"
echo "broken pipe error in tests. Please unignore SIGPIPE and rerun."
echo "For bash, just run 'trap - SIGPIPE'"
exit
fi
Because I think ignoring SIGPIPE indicates bugs/issues somewhere, as the
python bug mentioned in comment 9bcb266cd778.
>
> Regarding your question about failed tests: Tests generic/081, generic/347,
> generic/361, shared/298, xfs/074 failed due to this and they all just had
> this additional line in the output.
Thanks,
Eryu
>
> --
> Jan Kara <jack@suse.com>
> SUSE Labs, CR
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-07-26 10:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-25 14:33 [PATCH] Ignore "yes: standard output: Broken pipe" errors Jan Kara
2017-07-26 7:47 ` Eryu Guan
2017-07-26 8:22 ` Jan Kara
2017-07-26 10:22 ` Eryu Guan [this message]
2017-07-26 11:06 ` Jan Kara
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=20170726102221.GY9167@eguan.usersys.redhat.com \
--to=eguan@redhat.com \
--cc=fstests@vger.kernel.org \
--cc=jack@suse.cz \
/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