From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org,
Kevin Wolf <kwolf@redhat.com>, Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 2/2] iotests: avoid broken pipe with certtool
Date: Tue, 19 Feb 2019 16:21:14 +0000 [thread overview]
Message-ID: <20190219162114.GQ7154@redhat.com> (raw)
In-Reply-To: <d50a19fd-b869-e7f4-cfc7-80191b01ecbf@redhat.com>
On Tue, Feb 19, 2019 at 05:19:46PM +0100, Thomas Huth wrote:
> On 19/02/2019 17.13, Daniel P. Berrangé wrote:
> > When we run "certtool | head -1" the latter command is likely to
> > complete and exit before certtool has written everything it wants to
> > stderr. In at least the RHEL-7 gnutls 3.3.29 this causes certtool to
> > quit with broken pipe before it has finished writing the desired
> > output file to disk. This causes non-deterministic failures of the
> > iotest 233 because the certs are sometimes zero length files.
> > If certtool fails the "head -1" means we also loose any useful error
> > message it would have printed.
> >
> > Thus this patch gets rid of the pipe and post-processes the output in a
> > more flexible & reliable manner.
> >
> > Reported-by: Thomas Huth <thuth@redhat.com>
> > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> > ---
> > tests/qemu-iotests/common.tls | 48 +++++++++++++++++++++++------------
> > 1 file changed, 32 insertions(+), 16 deletions(-)
> >
> > diff --git a/tests/qemu-iotests/common.tls b/tests/qemu-iotests/common.tls
> > index eae81789bb..6cf11ed383 100644
> > --- a/tests/qemu-iotests/common.tls
> > +++ b/tests/qemu-iotests/common.tls
> > @@ -29,6 +29,17 @@ tls_x509_cleanup()
> > }
> >
> >
> > +tls_certtool()
> > +{
> > + certtool "$@" 1>certtool.log 2>&1
> > + if test "$?" = 0; then
> > + head -1 certtool.log
> > + else
> > + cat certtool.log
> > + fi
> > + rm -f certtool.log
> > +}
>
> I assume this is running in a unique directory so that there can not be
> a clash with a test running in parallel? Otherwise I'd recommend an
> mktemp file name here...
Hmm, could be a problem. Whatever happened to the plan to make every
iotests run in a private directory ? Did that ever get done ?
>
> Anyway, this fixes the issue for me, too, thus:
>
> Tested-by: Thomas Huth <thuth@redhat.com>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2019-02-19 16:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-19 16:13 [Qemu-devel] [PATCH 0/2] Fix NBD TLS iotests on RHEL-7 Daniel P. Berrangé
2019-02-19 16:13 ` [Qemu-devel] [PATCH 1/2] iotests: ensure we print nbd server log on error Daniel P. Berrangé
2019-02-19 16:35 ` Eric Blake
2019-02-19 16:13 ` [Qemu-devel] [PATCH 2/2] iotests: avoid broken pipe with certtool Daniel P. Berrangé
2019-02-19 16:19 ` Thomas Huth
2019-02-19 16:21 ` Daniel P. Berrangé [this message]
2019-02-19 16:37 ` Eric Blake
2019-02-19 16:42 ` Eric Blake
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=20190219162114.GQ7154@redhat.com \
--to=berrange@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.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.