[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH nbdkit] tests/test-exportname.sh: Fix test.



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

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]