Re: [Libguestfs] [PATCH nbdkit] tests: Convert some tests to use nbdsh instead of qemu-io.

2019-09-11 Thread Richard W.M. Jones
On Wed, Sep 11, 2019 at 02:57:50PM +0100, Richard W.M. Jones wrote: > On Wed, Sep 11, 2019 at 08:48:28AM -0500, Eric Blake wrote: > > On 9/11/19 5:40 AM, Richard W.M. Jones wrote: > > > Very much a work in progress as there are still many tests using > > > qemu-io which are candidates for

Re: [Libguestfs] [PATCH nbdkit] tests: Convert some tests to use nbdsh instead of qemu-io.

2019-09-11 Thread Richard W.M. Jones
On Wed, Sep 11, 2019 at 08:48:28AM -0500, Eric Blake wrote: > On 9/11/19 5:40 AM, Richard W.M. Jones wrote: > > Very much a work in progress as there are still many tests using > > qemu-io which are candidates for conversion. > > > > You'll notice at the end of test-full.sh that the new test has

Re: [Libguestfs] [PATCH nbdkit] tests: Convert some tests to use nbdsh instead of qemu-io.

2019-09-11 Thread Eric Blake
On 9/11/19 5:40 AM, Richard W.M. Jones wrote: > nbdsh has some advantages over qemu-io: > > - scriptable > > - allows us to more finely control NBD commands, such as >making subsector-sized requests and controlling how >many commands are sent on the wire > > - can write controlled

Re: [Libguestfs] [PATCH nbdkit] tests: Convert some tests to use nbdsh instead of qemu-io.

2019-09-11 Thread Eric Blake
On 9/11/19 5:40 AM, Richard W.M. Jones wrote: > Very much a work in progress as there are still many tests using > qemu-io which are candidates for conversion. > > You'll notice at the end of test-full.sh that the new test has some > duplicated code which looks as if it ought to be refactored

[Libguestfs] [PATCH nbdkit] tests: Convert some tests to use nbdsh instead of qemu-io.

2019-09-11 Thread Richard W.M. Jones
nbdsh has some advantages over qemu-io: - scriptable - allows us to more finely control NBD commands, such as making subsector-sized requests and controlling how many commands are sent on the wire - can write controlled patterns - can read NBD export flags --- README

[Libguestfs] [PATCH nbdkit] tests: Convert some tests to use nbdsh instead of qemu-io.

2019-09-11 Thread Richard W.M. Jones
Very much a work in progress as there are still many tests using qemu-io which are candidates for conversion. You'll notice at the end of test-full.sh that the new test has some duplicated code which looks as if it ought to be refactored into a Python function. When I tried to do that, I got