[PATCH v3 12/15] tests: qemublock: Add cases for creating image overlays on top of disks with <slice>
Ján Tomko
jtomko at redhat.com
Thu Feb 13 14:54:53 UTC 2020
On Wed, Feb 12, 2020 at 07:03:23PM +0100, Peter Krempa wrote:
>Add a set of test data to see whether the backing store strings are
>formatted reasonably. Note that we don't support direct creation of such
>images so those tests are not enabled.
>
>Signed-off-by: Peter Krempa <pkrempa at redhat.com>
>---
> tests/qemublocktest.c | 2 ++
> .../imagecreate/qcow2-backing-qcow2-slice.json | 15 +++++++++++++++
> .../imagecreate/qcow2-backing-qcow2-slice.xml | 1 +
> .../imagecreate/qcow2-backing-raw-slice.json | 15 +++++++++++++++
> .../imagecreate/qcow2-backing-raw-slice.xml | 1 +
> .../qemublocktestdata/imagecreate/qcow2-slice.xml | 14 ++++++++++++++
> tests/qemublocktestdata/imagecreate/raw-slice.xml | 14 ++++++++++++++
> 7 files changed, 62 insertions(+)
> create mode 100644 tests/qemublocktestdata/imagecreate/qcow2-backing-qcow2-slice.json
> create mode 120000 tests/qemublocktestdata/imagecreate/qcow2-backing-qcow2-slice.xml
> create mode 100644 tests/qemublocktestdata/imagecreate/qcow2-backing-raw-slice.json
> create mode 120000 tests/qemublocktestdata/imagecreate/qcow2-backing-raw-slice.xml
> create mode 100644 tests/qemublocktestdata/imagecreate/qcow2-slice.xml
> create mode 100644 tests/qemublocktestdata/imagecreate/raw-slice.xml
>
>diff --git a/tests/qemublocktestdata/imagecreate/qcow2-slice.xml b/tests/qemublocktestdata/imagecreate/qcow2-slice.xml
>new file mode 100644
>index 0000000000..6c5ae3107b
>--- /dev/null
>+++ b/tests/qemublocktestdata/imagecreate/qcow2-slice.xml
>@@ -0,0 +1,14 @@
>+<disk device='disk' name='vda'>
>+ <driver type='qcow2'/>
>+ <source file='/var/lib/libvirt/images/i.qcow2'>
>+ <slices>
>+ <slice type='storage' offset='1234' size='5768'/>
>+ </slices>
>+ <privateData>
>+ <nodenames>
>+ <nodename type='storage' name='0123456789ABCDEF0123456789ABCDE'/>
>+ <nodename type='format' name='0123456789ABCDEF0123456789ABCDE'/>
This is not parsed.
>+ </nodenames>
>+ </privateData>
>+ </source>
>+</disk>
>diff --git a/tests/qemublocktestdata/imagecreate/raw-slice.xml b/tests/qemublocktestdata/imagecreate/raw-slice.xml
>new file mode 100644
>index 0000000000..adc7a175ce
>--- /dev/null
>+++ b/tests/qemublocktestdata/imagecreate/raw-slice.xml
>@@ -0,0 +1,14 @@
>+<disk device='disk' name='vda'>
>+ <driver type='raw'/>
>+ <source file='/var/lib/libvirt/images/i.img'>
>+ <slices>
>+ <slice type='storage' offset='9876' size='54321'/>
>+ </slices>
>+ <privateData>
>+ <nodenames>
>+ <nodename type='storage' name='0123456789ABCDEF0123456789ABCDE'/>
>+ <nodename type='format' name='0123456789ABCDEF0123456789ABCDE'/>
This is not parsed either.
>+ </nodenames>
Reviewed-by: Ján Tomko <jtomko at redhat.com>
Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200213/395ec2a3/attachment-0001.sig>
More information about the libvir-list
mailing list