[Libguestfs] [nbdkit PATCH 3/3] python: Test implementation of zero callback

Richard W.M. Jones rjones at redhat.com
Fri Apr 6 09:28:11 UTC 2018


On Thu, Apr 05, 2018 at 01:54:36PM -0500, Eric Blake wrote:
> The previous commit enabled testing of the fallback when a
> zero callback is not present; but even better is testing
> that the zero callback is called correctly.
> 
> Signed-off-by: Eric Blake <eblake at redhat.com>
> ---
>  tests/test.py | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/tests/test.py b/tests/test.py
> index 015b20f..630ac2f 100644
> --- a/tests/test.py
> +++ b/tests/test.py
> @@ -41,6 +41,11 @@ def pwrite(h, buf, offset):
>      disk[offset:end] = buf
> 
> 
> +def zero(h, count, offset, may_trim=False):
> +    global disk
> +    disk[offset:offset+count] = bytearray(count)
> +
> +
>  def flush(h):
>      pass
> 

ACK series (with the obvious 01 => 1 change).

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW




More information about the Libguestfs mailing list