[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 2/2] iotests: avoid broken pipe with certtool
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2 2/2] iotests: avoid broken pipe with certtool |
Date: |
Wed, 20 Feb 2019 10:11:40 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 |
On 2/20/19 8:58 AM, 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
A bit of a mismatch: had we actually used only 'certtool | head -1', it
would be early death before writing all it wants to stdout (not stderr).
But since the patch itself is replacing 'certtool 2>&1 | head -1',
where stderr is also in the picture due to the additional fd
redirection, I'm not sure if it is better to just s/"certtool
|/"certtool 2>&1 |/ to match the patch, or to s/stderr/stdout/ for
brevity, or to just leave things as written. Your call.
> 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
s/loose/lose/
> 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 <address@hidden>
> Signed-off-by: Daniel P. Berrangé <address@hidden>
> ---
> tests/qemu-iotests/common.tls | 48 +++++++++++++++++++++++------------
> 1 file changed, 32 insertions(+), 16 deletions(-)
>
Reviewed-by: Eric Blake <address@hidden>
As the fix is for an iotest using NBD, I can take this through my tree
if no one else picks it up through some other block or iotests tree first.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org