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 <[email protected]> --- 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 -- 2.14.3 _______________________________________________ Libguestfs mailing list [email protected] https://www.redhat.com/mailman/listinfo/libguestfs
