]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemustatusxml2xmltest: Demonstrate use of VIR_DOMAIN_DEF_(PARSE|FORMAT)_VOLUME_TRANSLATED
authorPeter Krempa <pkrempa@redhat.com>
Thu, 12 Oct 2023 13:56:59 +0000 (15:56 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 17 Oct 2023 12:16:14 +0000 (14:16 +0200)
Enable the flags in the status xml2xmtest and add an exaple to the test
data.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/qemustatusxml2xmldata/modern-in.xml
tests/qemustatusxml2xmltest.c

index e139c8d38caa2382552b2b0b587622e6c2580915..67e0aa4952feb4b1172a7bb89c5f71d3c6c3e096 100644 (file)
         <target dev='vdc' bus='virtio'/>
         <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/>
       </disk>
-      <disk type='file' device='cdrom'>
+      <disk type='volume' device='cdrom'>
         <driver name='qemu' type='raw'/>
-        <source file='/var/lib/libvirt/images/systemrescuecd-x86-4.9.5.iso'/>
+        <source pool='testpool' volume='testvolume' actualType='file' file='/var/lib/libvirt/images/systemrescuecd-x86-4.9.5.iso'/>
         <backingStore/>
         <target dev='hda' bus='ide'/>
         <readonly/>
index 418a724b94f95fcbe833746ae384e98f1a29f6bc..f1589345c3d8b47a4a328e52a9df4f39c5852172 100644 (file)
@@ -30,7 +30,8 @@ testCompareStatusXMLToXMLFiles(const void *opaque)
                                       VIR_DOMAIN_DEF_PARSE_ACTUAL_NET |
                                       VIR_DOMAIN_DEF_PARSE_PCI_ORIG_STATES |
                                       VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE |
-                                      VIR_DOMAIN_DEF_PARSE_ALLOW_POST_PARSE_FAIL))) {
+                                      VIR_DOMAIN_DEF_PARSE_ALLOW_POST_PARSE_FAIL |
+                                      VIR_DOMAIN_DEF_PARSE_VOLUME_TRANSLATED))) {
         VIR_TEST_DEBUG("\nfailed to parse '%s'", data->infile);
         goto cleanup;
     }
@@ -40,7 +41,8 @@ testCompareStatusXMLToXMLFiles(const void *opaque)
                                       VIR_DOMAIN_DEF_FORMAT_STATUS |
                                       VIR_DOMAIN_DEF_FORMAT_ACTUAL_NET |
                                       VIR_DOMAIN_DEF_FORMAT_PCI_ORIG_STATES |
-                                      VIR_DOMAIN_DEF_FORMAT_CLOCK_ADJUST))) {
+                                      VIR_DOMAIN_DEF_FORMAT_CLOCK_ADJUST |
+                                      VIR_DOMAIN_DEF_FORMAT_VOLUME_TRANSLATED))) {
         VIR_TEST_DEBUG("\nfailed to format back '%s'", data->infile);
         goto cleanup;
     }