[PATCH 14/32] qemublocktest: Replace 'basic' bitmap detection test case data

Eric Blake eblake at redhat.com
Thu Jun 18 14:07:27 UTC 2020


On 6/15/20 12:10 PM, Peter Krempa wrote:
> Use test data which conforms to the new semantics which changed in the
> previous patch.
> 
> The test data was created by the same set of commands as originally in
> commit 9aac9d5bdab039a50de2d8c627b3a1f1578ed471
> 
> Signed-off-by: Peter Krempa <pkrempa at redhat.com>
> ---
>   tests/qemublocktestdata/bitmap/basic.json | 229 +++++++++++-----------
>   tests/qemublocktestdata/bitmap/basic.out  |   8 +-
>   2 files changed, 119 insertions(+), 118 deletions(-)
> 

> -        "dirty-bitmaps": [
> -            {
> -                "name": "current",
> -                "recording": true,
> -                "persistent": true,
> -                "busy": false,
> -                "status": "active",
> -                "granularity": 65536,
> -                "count": 0
> -            },
> -            {
> -                "name": "d",
> -                "recording": false,
> -                "persistent": true,
> -                "busy": false,
> -                "status": "disabled",
> -                "granularity": 65536,
> -                "count": 0

The old code showed "recording":false for past bitmaps;

> +      "format-specific": {
> +        "type": "qcow2",
> +        "data": {
> +          "compat": "1.1",
> +          "compression-type": "zlib",

The new output is built with a newer qemu that understands different 
compression types (doesn't change correctness of the patch), and...


> +    "dirty-bitmaps": [
> +      {
> +        "name": "current",
> +        "recording": true,
> +        "persistent": true,
> +        "busy": false,
> +        "status": "active",
> +        "granularity": 65536,
> +        "count": 0
> +      },
> +      {
> +        "name": "d",
> +        "recording": true,
> +        "persistent": true,
> +        "busy": false,
> +        "status": "active",
> +        "granularity": 65536,
> +        "count": 0

...shows that even the past bitmaps are still active.  If qemu has 
performance problems with multiple active bitmaps, I agree that 
addressing that in qemu is reasonable.


> +++ b/tests/qemublocktestdata/bitmap/basic.out
> @@ -1,6 +1,6 @@
>   libvirt-1-format:
>     current: record:1 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
> -        d: record:0 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
> -        c: record:0 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
> -        b: record:0 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
> -        a: record:0 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
> +        d: record:1 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
> +        c: record:1 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
> +        b: record:1 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
> +        a: record:1 busy:0 persist:1 inconsist:0 gran:65536 dirty:0

And this reflects that libvirt is parsing the qemu output according to 
libvirt's new paradigm.

Reviewed-by: Eric Blake <eblake at redhat.com>

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




More information about the libvir-list mailing list