[Libguestfs] [PATCH nbdkit v2 3/3] tests: Add a simple test of nbdkit_export_name.

Eric Blake eblake at redhat.com
Thu Sep 12 22:20:51 UTC 2019


On 9/12/19 4:41 PM, Eric Blake wrote:

> 
> Hmm - instead of making the handle be the name of a temporary file that
> contains the export name, you could just make the handle _be_ the export
> name:
> 

> or bypass dd by exploiting your knowledge of the client:
> pread)
>   if test $4.$3 = "0.${#2}"; then
>     printf %s "$2"
>   else
>     echo "EINVAL unexpected alignment" >&2
>   fi

Now that I actually tested my ideas, I see I missed an 'exit 1' on the
unexpected alignment branch.

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20190912/661c5604/attachment.sig>


More information about the Libguestfs mailing list