Re: [PATCH v3 12/15] tests: qemublock: Add cases for creating image overlays on top of disks with <slice>

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
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@xxxxxxxxxx>

Jano

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux