[PATCH 18/32] qemublocktest: Add new 'synthetic' bitmap detection and validation test case
Eric Blake
eblake at redhat.com
Thu Jun 18 16:21:23 UTC 2020
On 6/15/20 12:10 PM, Peter Krempa wrote:
> Based on the 'snapshots' example with manual tweaks to introduce
> inactive, transient, inconsistent and duplicate bitmaps in various parts
> of the chain to excercise detection and new validation code.
exercise
>
> Signed-off-by: Peter Krempa <pkrempa at redhat.com>
> ---
> tests/qemublocktest.c | 11 +
> tests/qemublocktestdata/bitmap/synthetic.json | 506 ++++++++++++++++++
> tests/qemublocktestdata/bitmap/synthetic.out | 15 +
> 3 files changed, 532 insertions(+)
> create mode 100644 tests/qemublocktestdata/bitmap/synthetic.json
> create mode 100644 tests/qemublocktestdata/bitmap/synthetic.out
>
> +++ b/tests/qemublocktestdata/bitmap/synthetic.out
> @@ -0,0 +1,15 @@
> +libvirt-1-format:
> + current: record:1 busy:0 persist:1 inconsist:1 gran:65536 dirty:0
> + top-ok: record:1 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
> + top-inactive: record:0 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
> + top-transient: record:1 busy:0 persist:0 inconsist:0 gran:65536 dirty:0
> + top-transient-inactive: record:0 busy:0 persist:0 inconsist:0 gran:65536 dirty:0
> +libvirt-2-format:
> + d: record:1 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
> +libvirt-3-format:
> + b: record:1 busy:0 persist:0 inconsist:0 gran:65536 dirty:0
> + c: 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
> +libvirt-4-format:
> +libvirt-5-format:
> + a: record:1 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
>
Looks like a pretty decent set of awkward setups; libvirt should not
ever produce these, but being robust to whatever happened to the qcow2
files externally to libvirt is worthwhile.
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