[Libguestfs] [PATCH nbdkit 1/2] tests/test-python-plugin.py: Allow test to use large disks

Richard W.M. Jones
Tue, 21 Dec 2021 22:36:21 -0000

On Tue, Dec 21, 2021 at 10:25:35PM +0000, Richard W.M. Jones
wrote:
> On Wed, Dec 22, 2021 at 12:21:25AM +0200, Nir Soffer wrote:
> > It would be help also if we can test extents argument, currently the
> > plugin ignores the argument so we did not detect the issue with the
> > wrong format string.
>
> OK, I'll take a look.

I see - the plugin function is defined just to return the extents sent
in (for testing):

  def extents(h, count, offset, flags):
      return cfg.get('extents', [])

This means we don't test the parameters.  However to test those
realistically I suppose we would really need to support sparse disks
in this test plugin, which seems quite tricky.

Rich.

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org