[prev in list] [next in list] [prev in thread] [next in thread] 

List:       libguestfs
Subject:    Re: [Libguestfs] [PATCH nbdkit] tests/test-exportname.sh: Fix test.
From:       Eric Blake <eblake () redhat ! com>
Date:       2020-10-05 19:58:55
Message-ID: ee68fe6a-a8f0-4bb9-2f9a-0426e83d990c () redhat ! com
[Download RAW message or body]

[Attachment #2 (multipart/signed)]

[Attachment #4 (multipart/mixed)]


On 10/5/20 2:52 PM, Richard W.M. Jones wrote:
> When "nbdkit ... --run 'nbdinfo ...' > out" is expected to fail, we
> cannot be sure of the content of the "out" file.  In particular
> nbdinfo produces its output incrementally, so in JSON mode there's
> usually a stray "{" in the output, and in non-JSON mode it usually
> prints the "protocol: " line.
> 
> Thus it's not correct to test for the output file being non-empty.
> 
> Remove these lines which caused the test to fail.  However I replaced
> them with "cat" for diagnostic purposes.
> 
> Fixes: commit 7623b2cc45078cca88fdd2d96c70c7f82a0db49d
> ---
>  tests/test-exportname.sh | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Looks good to me. Maybe we should try harder in nbdinfo to produce no
output on stdout except on success, but we'll need this workaround for
released versions regardless of whether we make that effort in libnbd.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org


["signature.asc" (application/pgp-signature)]

_______________________________________________
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic