[PATCH 11/23] qemuxml2xmltest: Parse all input files as inactive

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

 



In previous patches we've added testing of XML's explicitly parsed as
active (ensuring that it e.g. has a domain id) formatted into both
active and inactive versions.

Now qemuxml2xmltest can be simplified by making it test only XMLs parsed
as inactive.

To do this we pass VIR_DOMAIN_DEF_PARSE_INACTIVE in parseFlags. This
will also cause that all output files will become identical so the setup
of the test cases can be simplified by using the non-split output file
name.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 ...-unix-source-path-active.x86_64-latest.xml |  62 -------
 ...hannel-unix-source-path.x86_64-latest.xml} |   0
 ...nnel-virtio-state-active.x86_64-latest.xml |  55 ------
 ...=> channel-virtio-state.x86_64-latest.xml} |   0
 ...isk-active-commit-active.x86_64-latest.xml |  49 ------
 ...l => disk-active-commit.x86_64-latest.xml} |   0
 ...king-chains-index-active.x86_64-latest.xml | 164 ------------------
 ...sk-backing-chains-index.x86_64-latest.xml} |   0
 .../disk-mirror-active.x86_64-latest.xml      |  97 -----------
 .../disk-mirror-old-active.x86_64-latest.xml  |  71 --------
 ....xml => disk-mirror-old.x86_64-latest.xml} |   0
 ...test.xml => disk-mirror.x86_64-latest.xml} |   0
 .../genid-active.x86_64-latest.xml            |  36 ----
 .../genid-auto-active.x86_64-latest.xml       |  36 ----
 ...atest.xml => genid-auto.x86_64-latest.xml} |   0
 ..._64-latest.xml => genid.x86_64-latest.xml} |   0
 ...-generated-socket-active.x86_64-latest.xml |  45 -----
 ...remove-generated-socket.x86_64-latest.xml} |   0
 ...label-dynamic-baselabel.x86_64-latest.xml} |   0
 ...label-dynamic-labelskip.x86_64-latest.xml} |   0
 ...el-dynamic-none-relabel.x86_64-latest.xml} |   0
 ...clabel-dynamic-override.x86_64-latest.xml} |   0
 ...eclabel-dynamic-relabel.x86_64-latest.xml} |   0
 ...-static-labelskip-active.x86_64-latest.xml |  47 -----
 ...clabel-static-labelskip.x86_64-latest.xml} |   0
 tests/qemuxml2xmltest.c                       |  47 +----
 26 files changed, 6 insertions(+), 703 deletions(-)
 delete mode 100644 tests/qemuxml2xmloutdata/channel-unix-source-path-active.x86_64-latest.xml
 rename tests/qemuxml2xmloutdata/{channel-unix-source-path-inactive.x86_64-latest.xml => channel-unix-source-path.x86_64-latest.xml} (100%)
 delete mode 100644 tests/qemuxml2xmloutdata/channel-virtio-state-active.x86_64-latest.xml
 rename tests/qemuxml2xmloutdata/{channel-virtio-state-inactive.x86_64-latest.xml => channel-virtio-state.x86_64-latest.xml} (100%)
 delete mode 100644 tests/qemuxml2xmloutdata/disk-active-commit-active.x86_64-latest.xml
 rename tests/qemuxml2xmloutdata/{disk-active-commit-inactive.x86_64-latest.xml => disk-active-commit.x86_64-latest.xml} (100%)
 delete mode 100644 tests/qemuxml2xmloutdata/disk-backing-chains-index-active.x86_64-latest.xml
 rename tests/qemuxml2xmloutdata/{disk-backing-chains-index-inactive.x86_64-latest.xml => disk-backing-chains-index.x86_64-latest.xml} (100%)
 delete mode 100644 tests/qemuxml2xmloutdata/disk-mirror-active.x86_64-latest.xml
 delete mode 100644 tests/qemuxml2xmloutdata/disk-mirror-old-active.x86_64-latest.xml
 rename tests/qemuxml2xmloutdata/{disk-mirror-old-inactive.x86_64-latest.xml => disk-mirror-old.x86_64-latest.xml} (100%)
 rename tests/qemuxml2xmloutdata/{disk-mirror-inactive.x86_64-latest.xml => disk-mirror.x86_64-latest.xml} (100%)
 delete mode 100644 tests/qemuxml2xmloutdata/genid-active.x86_64-latest.xml
 delete mode 100644 tests/qemuxml2xmloutdata/genid-auto-active.x86_64-latest.xml
 rename tests/qemuxml2xmloutdata/{genid-auto-inactive.x86_64-latest.xml => genid-auto.x86_64-latest.xml} (100%)
 rename tests/qemuxml2xmloutdata/{genid-inactive.x86_64-latest.xml => genid.x86_64-latest.xml} (100%)
 delete mode 100644 tests/qemuxml2xmloutdata/graphics-vnc-remove-generated-socket-active.x86_64-latest.xml
 rename tests/qemuxml2xmloutdata/{graphics-vnc-remove-generated-socket-inactive.x86_64-latest.xml => graphics-vnc-remove-generated-socket.x86_64-latest.xml} (100%)
 rename tests/qemuxml2xmloutdata/{seclabel-dynamic-baselabel-inactive.x86_64-latest.xml => seclabel-dynamic-baselabel.x86_64-latest.xml} (100%)
 rename tests/qemuxml2xmloutdata/{seclabel-dynamic-labelskip-inactive.x86_64-latest.xml => seclabel-dynamic-labelskip.x86_64-latest.xml} (100%)
 rename tests/qemuxml2xmloutdata/{seclabel-dynamic-none-relabel-inactive.x86_64-latest.xml => seclabel-dynamic-none-relabel.x86_64-latest.xml} (100%)
 rename tests/qemuxml2xmloutdata/{seclabel-dynamic-override-inactive.x86_64-latest.xml => seclabel-dynamic-override.x86_64-latest.xml} (100%)
 rename tests/qemuxml2xmloutdata/{seclabel-dynamic-relabel-inactive.x86_64-latest.xml => seclabel-dynamic-relabel.x86_64-latest.xml} (100%)
 delete mode 100644 tests/qemuxml2xmloutdata/seclabel-static-labelskip-active.x86_64-latest.xml
 rename tests/qemuxml2xmloutdata/{seclabel-static-labelskip-inactive.x86_64-latest.xml => seclabel-static-labelskip.x86_64-latest.xml} (100%)

diff --git a/tests/qemuxml2xmloutdata/channel-unix-source-path-active.x86_64-latest.xml b/tests/qemuxml2xmloutdata/channel-unix-source-path-active.x86_64-latest.xml
deleted file mode 100644
index 022ad7025a..0000000000
--- a/tests/qemuxml2xmloutdata/channel-unix-source-path-active.x86_64-latest.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<domain type='qemu'>
-  <name>QEMUGuest1</name>
-  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory unit='KiB'>219100</memory>
-  <currentMemory unit='KiB'>219100</currentMemory>
-  <vcpu placement='static'>1</vcpu>
-  <os>
-    <type arch='x86_64' machine='pc'>hvm</type>
-    <boot dev='hd'/>
-  </os>
-  <cpu mode='custom' match='exact' check='none'>
-    <model fallback='forbid'>qemu64</model>
-  </cpu>
-  <clock offset='utc'/>
-  <on_poweroff>destroy</on_poweroff>
-  <on_reboot>restart</on_reboot>
-  <on_crash>destroy</on_crash>
-  <devices>
-    <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <controller type='usb' index='0' model='piix3-uhci'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
-    </controller>
-    <controller type='pci' index='0' model='pci-root'/>
-    <controller type='virtio-serial' index='0'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
-    </controller>
-    <channel type='unix'>
-      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/QEMUGuest1.org.qemu.guest_agent.0'/>
-      <target type='virtio' name='org.qemu.guest_agent.0'/>
-      <address type='virtio-serial' controller='0' bus='0' port='1'/>
-    </channel>
-    <channel type='unix'>
-      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-QEMUGuest1/org.qemu.guest_agent.1'/>
-      <target type='virtio' name='org.qemu.guest_agent.1'/>
-      <address type='virtio-serial' controller='0' bus='0' port='2'/>
-    </channel>
-    <channel type='unix'>
-      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-1-QEMUGuest1/org.qemu.guest_agent.2'/>
-      <target type='virtio' name='org.qemu.guest_agent.2'/>
-      <address type='virtio-serial' controller='0' bus='0' port='3'/>
-    </channel>
-    <channel type='unix'>
-      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/QEMUGuest1/org.qemu.guest_agent.3'/>
-      <target type='virtio' name='org.qemu.guest_agent.3'/>
-      <address type='virtio-serial' controller='0' bus='0' port='4'/>
-    </channel>
-    <channel type='unix'>
-      <source mode='bind' path='/var/lib/libvirt/qemu/channel/1-QEMUGuest1/org.qemu.guest_agent.4'/>
-      <target type='virtio' name='org.qemu.guest_agent.4'/>
-      <address type='virtio-serial' controller='0' bus='0' port='5'/>
-    </channel>
-    <channel type='unix'>
-      <source mode='bind' path='/var/run/libvirt/qemu/channel/1-QEMUGuest1/org.qemu.guest_agent.5'/>
-      <target type='virtio' name='org.qemu.guest_agent.5'/>
-      <address type='virtio-serial' controller='0' bus='0' port='6'/>
-    </channel>
-    <input type='mouse' bus='ps2'/>
-    <input type='keyboard' bus='ps2'/>
-    <audio id='1' type='none'/>
-    <memballoon model='none'/>
-  </devices>
-</domain>
diff --git a/tests/qemuxml2xmloutdata/channel-unix-source-path-inactive.x86_64-latest.xml b/tests/qemuxml2xmloutdata/channel-unix-source-path.x86_64-latest.xml
similarity index 100%
rename from tests/qemuxml2xmloutdata/channel-unix-source-path-inactive.x86_64-latest.xml
rename to tests/qemuxml2xmloutdata/channel-unix-source-path.x86_64-latest.xml
diff --git a/tests/qemuxml2xmloutdata/channel-virtio-state-active.x86_64-latest.xml b/tests/qemuxml2xmloutdata/channel-virtio-state-active.x86_64-latest.xml
deleted file mode 100644
index a4ffae81e8..0000000000
--- a/tests/qemuxml2xmloutdata/channel-virtio-state-active.x86_64-latest.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<domain type='qemu' id='2'>
-  <name>QEMUGuest1</name>
-  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory unit='KiB'>219100</memory>
-  <currentMemory unit='KiB'>219100</currentMemory>
-  <vcpu placement='static' cpuset='1-4,8-20,525'>1</vcpu>
-  <os>
-    <type arch='x86_64' machine='pc'>hvm</type>
-    <boot dev='hd'/>
-  </os>
-  <cpu mode='custom' match='exact' check='none'>
-    <model fallback='forbid'>qemu64</model>
-  </cpu>
-  <clock offset='utc'/>
-  <on_poweroff>destroy</on_poweroff>
-  <on_reboot>restart</on_reboot>
-  <on_crash>destroy</on_crash>
-  <devices>
-    <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <disk type='block' device='disk'>
-      <driver name='qemu' type='raw'/>
-      <source dev='/dev/HostVG/QEMUGuest1'/>
-      <target dev='hda' bus='ide'/>
-      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
-    </disk>
-    <controller type='usb' index='0' model='piix3-uhci'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
-    </controller>
-    <controller type='ide' index='0'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
-    </controller>
-    <controller type='virtio-serial' index='1'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
-    </controller>
-    <controller type='pci' index='0' model='pci-root'/>
-    <channel type='pty'>
-      <target type='virtio' name='org.linux-kvm.port.foo' state='connected'/>
-      <address type='virtio-serial' controller='1' bus='0' port='3'/>
-    </channel>
-    <channel type='pty'>
-      <target type='virtio' name='org.linux-kvm.port.foo1' state='disconnected'/>
-      <address type='virtio-serial' controller='1' bus='0' port='4'/>
-    </channel>
-    <channel type='pty'>
-      <target type='virtio' name='org.linux-kvm.port.foo2'/>
-      <address type='virtio-serial' controller='1' bus='0' port='5'/>
-    </channel>
-    <input type='mouse' bus='ps2'/>
-    <input type='keyboard' bus='ps2'/>
-    <audio id='1' type='none'/>
-    <memballoon model='virtio'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
-    </memballoon>
-  </devices>
-</domain>
diff --git a/tests/qemuxml2xmloutdata/channel-virtio-state-inactive.x86_64-latest.xml b/tests/qemuxml2xmloutdata/channel-virtio-state.x86_64-latest.xml
similarity index 100%
rename from tests/qemuxml2xmloutdata/channel-virtio-state-inactive.x86_64-latest.xml
rename to tests/qemuxml2xmloutdata/channel-virtio-state.x86_64-latest.xml
diff --git a/tests/qemuxml2xmloutdata/disk-active-commit-active.x86_64-latest.xml b/tests/qemuxml2xmloutdata/disk-active-commit-active.x86_64-latest.xml
deleted file mode 100644
index cbe47150a9..0000000000
--- a/tests/qemuxml2xmloutdata/disk-active-commit-active.x86_64-latest.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<domain type='qemu' id='1'>
-  <name>QEMUGuest1</name>
-  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory unit='KiB'>219136</memory>
-  <currentMemory unit='KiB'>219136</currentMemory>
-  <vcpu placement='static'>1</vcpu>
-  <os>
-    <type arch='x86_64' machine='pc'>hvm</type>
-    <boot dev='hd'/>
-  </os>
-  <cpu mode='custom' match='exact' check='none'>
-    <model fallback='forbid'>qemu64</model>
-  </cpu>
-  <clock offset='utc'/>
-  <on_poweroff>destroy</on_poweroff>
-  <on_reboot>restart</on_reboot>
-  <on_crash>destroy</on_crash>
-  <devices>
-    <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <disk type='file' device='disk'>
-      <driver name='qemu' type='qcow2'/>
-      <source file='/tmp/HostVG/QEMUGuest1-snap'/>
-      <backingStore type='block' index='1'>
-        <format type='raw'/>
-        <source dev='/dev/HostVG/QEMUGuest1'/>
-        <backingStore/>
-      </backingStore>
-      <mirror type='block' job='active-commit'>
-        <format type='raw'/>
-        <source dev='/dev/HostVG/QEMUGuest1'/>
-      </mirror>
-      <target dev='hda' bus='ide'/>
-      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
-    </disk>
-    <controller type='usb' index='0' model='piix3-uhci'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
-    </controller>
-    <controller type='ide' index='0'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
-    </controller>
-    <controller type='pci' index='0' model='pci-root'/>
-    <input type='mouse' bus='ps2'/>
-    <input type='keyboard' bus='ps2'/>
-    <audio id='1' type='none'/>
-    <memballoon model='virtio'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
-    </memballoon>
-  </devices>
-</domain>
diff --git a/tests/qemuxml2xmloutdata/disk-active-commit-inactive.x86_64-latest.xml b/tests/qemuxml2xmloutdata/disk-active-commit.x86_64-latest.xml
similarity index 100%
rename from tests/qemuxml2xmloutdata/disk-active-commit-inactive.x86_64-latest.xml
rename to tests/qemuxml2xmloutdata/disk-active-commit.x86_64-latest.xml
diff --git a/tests/qemuxml2xmloutdata/disk-backing-chains-index-active.x86_64-latest.xml b/tests/qemuxml2xmloutdata/disk-backing-chains-index-active.x86_64-latest.xml
deleted file mode 100644
index 52c8ad6f29..0000000000
--- a/tests/qemuxml2xmloutdata/disk-backing-chains-index-active.x86_64-latest.xml
+++ /dev/null
@@ -1,164 +0,0 @@
-<domain type='qemu'>
-  <name>QEMUGuest1</name>
-  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory unit='KiB'>219136</memory>
-  <currentMemory unit='KiB'>219136</currentMemory>
-  <vcpu placement='static'>1</vcpu>
-  <os>
-    <type arch='x86_64' machine='pc'>hvm</type>
-    <boot dev='hd'/>
-  </os>
-  <cpu mode='custom' match='exact' check='none'>
-    <model fallback='forbid'>qemu64</model>
-  </cpu>
-  <clock offset='utc'/>
-  <on_poweroff>destroy</on_poweroff>
-  <on_reboot>restart</on_reboot>
-  <on_crash>destroy</on_crash>
-  <devices>
-    <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <disk type='network' device='disk'>
-      <driver name='qemu' type='qcow2'/>
-      <source protocol='gluster' name='Volume2/Image' index='2'>
-        <host transport='unix' socket='/path/to/sock'/>
-      </source>
-      <backingStore type='file' index='1'>
-        <format type='qcow2'/>
-        <source file='/tmp/missing-backing-store.qcow'/>
-      </backingStore>
-      <target dev='vda' bus='virtio'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
-    </disk>
-    <disk type='network' device='disk'>
-      <driver name='qemu' type='qcow2'/>
-      <source protocol='nbd' name='bar' index='9'>
-        <host transport='unix' socket='/var/run/nbdsock'/>
-      </source>
-      <backingStore type='block' index='8'>
-        <format type='qcow2'/>
-        <source dev='/dev/HostVG/QEMUGuest1'/>
-        <backingStore type='file' index='7'>
-          <format type='vmdk'/>
-          <source file='/tmp/image2'/>
-          <backingStore type='file' index='6'>
-            <format type='qcow2'/>
-            <source file='/tmp/image3.qcow'>
-              <seclabel model='selinux' relabel='yes'>
-                <label>system_u:system_r:public_content_t:s0</label>
-              </seclabel>
-            </source>
-            <backingStore type='file' index='5'>
-              <format type='qcow2'/>
-              <source file='/tmp/image4.qcow'/>
-              <backingStore type='file' index='4'>
-                <format type='qcow2'/>
-                <source file='/tmp/image5.qcow'/>
-                <backingStore type='file' index='3'>
-                  <format type='raw'/>
-                  <source file='/tmp/Fedora-17-x86_64-Live-KDE.iso'/>
-                  <backingStore/>
-                </backingStore>
-              </backingStore>
-            </backingStore>
-          </backingStore>
-        </backingStore>
-      </backingStore>
-      <target dev='vdb' bus='virtio'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
-    </disk>
-    <disk type='network' device='disk'>
-      <driver name='qemu' type='raw'/>
-      <source protocol='gluster' name='Volume1/Image' index='10'>
-        <host name='example.org' port='6000'/>
-      </source>
-      <backingStore/>
-      <target dev='vdc' bus='virtio'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
-    </disk>
-    <disk type='network' device='disk'>
-      <driver name='qemu' type='qcow2'/>
-      <auth username='myname'>
-        <secret type='ceph' usage='mycluster_myname'/>
-      </auth>
-      <source protocol='rbd' name='pool/image' index='12'>
-        <host name='mon1.example.org' port='6321'/>
-        <host name='mon2.example.org' port='6322'/>
-        <host name='mon3.example.org' port='6322'/>
-      </source>
-      <backingStore type='file' index='11'>
-        <format type='qcow2'/>
-        <source file='/tmp/image.qcow'/>
-        <backingStore/>
-      </backingStore>
-      <target dev='vdd' bus='virtio'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
-    </disk>
-    <disk type='block' device='disk'>
-      <driver name='qemu' type='qcow2'/>
-      <source dev='/dev/HostVG/QEMUGuest11' index='13'/>
-      <target dev='vde' bus='virtio'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
-    </disk>
-    <disk type='file' device='disk'>
-      <driver name='qemu' type='qcow2'/>
-      <source file='/var/lib/libvirt/images/rhel7.1484071880' index='25'/>
-      <backingStore type='file' index='24'>
-        <format type='qcow2'/>
-        <source file='/var/lib/libvirt/images/rhel7.1484071877'/>
-        <backingStore type='file' index='23'>
-          <format type='qcow2'/>
-          <source file='/var/lib/libvirt/images/rhel7.1484071876'/>
-          <backingStore type='file' index='22'>
-            <format type='qcow2'/>
-            <source file='/var/lib/libvirt/images/rhel7.1484071872'/>
-            <backingStore type='file' index='21'>
-              <format type='qcow2'/>
-              <source file='/var/lib/libvirt/images/rhel7.1483615252'/>
-              <backingStore type='file' index='20'>
-                <format type='qcow2'/>
-                <source file='/var/lib/libvirt/images/rhel7.1483605924'/>
-                <backingStore type='file' index='19'>
-                  <format type='qcow2'/>
-                  <source file='/var/lib/libvirt/images/rhel7.1483605920'/>
-                  <backingStore type='file' index='18'>
-                    <format type='qcow2'/>
-                    <source file='/var/lib/libvirt/images/rhel7.1483546244'/>
-                    <backingStore type='file' index='17'>
-                      <format type='qcow2'/>
-                      <source file='/var/lib/libvirt/images/rhel7.1483545901'/>
-                      <backingStore type='file' index='16'>
-                        <format type='qcow2'/>
-                        <source file='/var/lib/libvirt/images/rhel7.1483545313'/>
-                        <backingStore type='file' index='15'>
-                          <format type='qcow2'/>
-                          <source file='/var/lib/libvirt/images/rhel7.1483536402'/>
-                          <backingStore type='file' index='14'>
-                            <format type='qcow2'/>
-                            <source file='/var/lib/libvirt/images/rhel7.qcow2'/>
-                            <backingStore/>
-                          </backingStore>
-                        </backingStore>
-                      </backingStore>
-                    </backingStore>
-                  </backingStore>
-                </backingStore>
-              </backingStore>
-            </backingStore>
-          </backingStore>
-        </backingStore>
-      </backingStore>
-      <target dev='vdf' bus='virtio'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
-    </disk>
-    <controller type='usb' index='0' model='piix3-uhci'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
-    </controller>
-    <controller type='pci' index='0' model='pci-root'/>
-    <input type='mouse' bus='ps2'/>
-    <input type='keyboard' bus='ps2'/>
-    <audio id='1' type='none'/>
-    <memballoon model='virtio'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
-    </memballoon>
-  </devices>
-</domain>
diff --git a/tests/qemuxml2xmloutdata/disk-backing-chains-index-inactive.x86_64-latest.xml b/tests/qemuxml2xmloutdata/disk-backing-chains-index.x86_64-latest.xml
similarity index 100%
rename from tests/qemuxml2xmloutdata/disk-backing-chains-index-inactive.x86_64-latest.xml
rename to tests/qemuxml2xmloutdata/disk-backing-chains-index.x86_64-latest.xml
diff --git a/tests/qemuxml2xmloutdata/disk-mirror-active.x86_64-latest.xml b/tests/qemuxml2xmloutdata/disk-mirror-active.x86_64-latest.xml
deleted file mode 100644
index 0cd61afa5c..0000000000
--- a/tests/qemuxml2xmloutdata/disk-mirror-active.x86_64-latest.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<domain type='qemu' id='1'>
-  <name>QEMUGuest1</name>
-  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory unit='KiB'>219136</memory>
-  <currentMemory unit='KiB'>219136</currentMemory>
-  <vcpu placement='static'>1</vcpu>
-  <os>
-    <type arch='x86_64' machine='pc'>hvm</type>
-    <boot dev='hd'/>
-  </os>
-  <cpu mode='custom' match='exact' check='none'>
-    <model fallback='forbid'>qemu64</model>
-  </cpu>
-  <clock offset='utc'/>
-  <on_poweroff>destroy</on_poweroff>
-  <on_reboot>restart</on_reboot>
-  <on_crash>destroy</on_crash>
-  <devices>
-    <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <disk type='block' device='disk'>
-      <driver name='qemu' type='raw'/>
-      <source dev='/dev/HostVG/QEMUGuest1'/>
-      <backingStore/>
-      <mirror type='block' job='copy' ready='yes'>
-        <format type='raw'/>
-        <source dev='/dev/HostVG/QEMUGuest1Copy'/>
-      </mirror>
-      <target dev='hda' bus='ide'/>
-      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
-    </disk>
-    <disk type='block' device='cdrom'>
-      <driver name='qemu' type='raw'/>
-      <source dev='/dev/HostVG/QEMUGuest2'/>
-      <backingStore/>
-      <target dev='hdc' bus='ide'/>
-      <readonly/>
-      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
-    </disk>
-    <disk type='file' device='disk'>
-      <driver name='qemu' type='raw'/>
-      <source file='/tmp/data.img'/>
-      <backingStore/>
-      <mirror type='file' file='/tmp/copy.img' format='qcow2' job='copy'>
-        <format type='qcow2'/>
-        <source file='/tmp/copy.img'/>
-        <backingStore/>
-      </mirror>
-      <target dev='vda' bus='virtio'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
-    </disk>
-    <disk type='file' device='disk'>
-      <driver name='qemu' type='raw'/>
-      <source file='/tmp/logs.img'/>
-      <backingStore/>
-      <mirror type='file' file='/tmp/logcopy.img' format='qcow2' job='copy' ready='abort'>
-        <format type='qcow2'/>
-        <source file='/tmp/logcopy.img' index='1'/>
-        <backingStore type='block' index='2'>
-          <format type='raw'/>
-          <source dev='/dev/HostVG/backing'/>
-          <backingStore/>
-        </backingStore>
-      </mirror>
-      <target dev='vdb' bus='virtio'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
-    </disk>
-    <disk type='file' device='disk'>
-      <driver name='qemu' type='raw'/>
-      <source file='/tmp/data2.img'/>
-      <backingStore/>
-      <mirror type='file' file='/tmp/copy2.img' format='qcow2' job='copy'>
-        <format type='qcow2'>
-          <metadata_cache>
-            <max_size unit='bytes'>1234</max_size>
-          </metadata_cache>
-        </format>
-        <source file='/tmp/copy2.img'/>
-        <backingStore/>
-      </mirror>
-      <target dev='vdc' bus='virtio'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
-    </disk>
-    <controller type='usb' index='0' model='piix3-uhci'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
-    </controller>
-    <controller type='ide' index='0'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
-    </controller>
-    <controller type='pci' index='0' model='pci-root'/>
-    <input type='mouse' bus='ps2'/>
-    <input type='keyboard' bus='ps2'/>
-    <audio id='1' type='none'/>
-    <memballoon model='virtio'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
-    </memballoon>
-  </devices>
-</domain>
diff --git a/tests/qemuxml2xmloutdata/disk-mirror-old-active.x86_64-latest.xml b/tests/qemuxml2xmloutdata/disk-mirror-old-active.x86_64-latest.xml
deleted file mode 100644
index 0732cf9e9c..0000000000
--- a/tests/qemuxml2xmloutdata/disk-mirror-old-active.x86_64-latest.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<domain type='qemu' id='1'>
-  <name>QEMUGuest1</name>
-  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory unit='KiB'>219136</memory>
-  <currentMemory unit='KiB'>219136</currentMemory>
-  <vcpu placement='static'>1</vcpu>
-  <os>
-    <type arch='x86_64' machine='pc'>hvm</type>
-    <boot dev='hd'/>
-  </os>
-  <cpu mode='custom' match='exact' check='none'>
-    <model fallback='forbid'>qemu64</model>
-  </cpu>
-  <clock offset='utc'/>
-  <on_poweroff>destroy</on_poweroff>
-  <on_reboot>restart</on_reboot>
-  <on_crash>destroy</on_crash>
-  <devices>
-    <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <disk type='block' device='disk'>
-      <driver name='qemu' type='raw'/>
-      <source dev='/dev/HostVG/QEMUGuest1'/>
-      <backingStore/>
-      <mirror type='file' file='/dev/HostVG/QEMUGuest1Copy' format='raw' job='copy' ready='yes'>
-        <format type='raw'/>
-        <source file='/dev/HostVG/QEMUGuest1Copy'/>
-      </mirror>
-      <target dev='hda' bus='ide'/>
-      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
-    </disk>
-    <disk type='block' device='cdrom'>
-      <driver name='qemu' type='raw'/>
-      <source dev='/dev/HostVG/QEMUGuest2'/>
-      <backingStore/>
-      <target dev='hdc' bus='ide'/>
-      <readonly/>
-      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
-    </disk>
-    <disk type='file' device='disk'>
-      <driver name='qemu' type='raw'/>
-      <source file='/tmp/data.img'/>
-      <backingStore/>
-      <mirror type='file' file='/tmp/copy.img' format='qcow2' job='copy'>
-        <format type='qcow2'/>
-        <source file='/tmp/copy.img'/>
-      </mirror>
-      <target dev='vda' bus='virtio'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
-    </disk>
-    <disk type='file' device='disk'>
-      <driver name='qemu' type='raw'/>
-      <source file='/tmp/logs.img'/>
-      <backingStore/>
-      <target dev='vdb' bus='virtio'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
-    </disk>
-    <controller type='usb' index='0' model='piix3-uhci'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
-    </controller>
-    <controller type='ide' index='0'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
-    </controller>
-    <controller type='pci' index='0' model='pci-root'/>
-    <input type='mouse' bus='ps2'/>
-    <input type='keyboard' bus='ps2'/>
-    <audio id='1' type='none'/>
-    <memballoon model='virtio'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
-    </memballoon>
-  </devices>
-</domain>
diff --git a/tests/qemuxml2xmloutdata/disk-mirror-old-inactive.x86_64-latest.xml b/tests/qemuxml2xmloutdata/disk-mirror-old.x86_64-latest.xml
similarity index 100%
rename from tests/qemuxml2xmloutdata/disk-mirror-old-inactive.x86_64-latest.xml
rename to tests/qemuxml2xmloutdata/disk-mirror-old.x86_64-latest.xml
diff --git a/tests/qemuxml2xmloutdata/disk-mirror-inactive.x86_64-latest.xml b/tests/qemuxml2xmloutdata/disk-mirror.x86_64-latest.xml
similarity index 100%
rename from tests/qemuxml2xmloutdata/disk-mirror-inactive.x86_64-latest.xml
rename to tests/qemuxml2xmloutdata/disk-mirror.x86_64-latest.xml
diff --git a/tests/qemuxml2xmloutdata/genid-active.x86_64-latest.xml b/tests/qemuxml2xmloutdata/genid-active.x86_64-latest.xml
deleted file mode 100644
index 06a01bb688..0000000000
--- a/tests/qemuxml2xmloutdata/genid-active.x86_64-latest.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<domain type='qemu' id='1'>
-  <name>QEMUGuest1</name>
-  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <genid>e9392370-2917-565e-692b-d057f46512d6</genid>
-  <memory unit='KiB'>219136</memory>
-  <currentMemory unit='KiB'>219136</currentMemory>
-  <vcpu placement='static'>1</vcpu>
-  <os>
-    <type arch='x86_64' machine='pc'>hvm</type>
-    <boot dev='hd'/>
-  </os>
-  <features>
-    <acpi/>
-  </features>
-  <cpu mode='custom' match='exact' check='none'>
-    <model fallback='forbid'>qemu64</model>
-  </cpu>
-  <clock offset='utc'/>
-  <on_poweroff>destroy</on_poweroff>
-  <on_reboot>restart</on_reboot>
-  <on_crash>destroy</on_crash>
-  <devices>
-    <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <controller type='usb' index='0' model='piix3-uhci'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
-    </controller>
-    <controller type='ide' index='0'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
-    </controller>
-    <controller type='pci' index='0' model='pci-root'/>
-    <input type='mouse' bus='ps2'/>
-    <input type='keyboard' bus='ps2'/>
-    <audio id='1' type='none'/>
-    <memballoon model='none'/>
-  </devices>
-</domain>
diff --git a/tests/qemuxml2xmloutdata/genid-auto-active.x86_64-latest.xml b/tests/qemuxml2xmloutdata/genid-auto-active.x86_64-latest.xml
deleted file mode 100644
index ce3af24282..0000000000
--- a/tests/qemuxml2xmloutdata/genid-auto-active.x86_64-latest.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<domain type='qemu' id='1'>
-  <name>QEMUGuest1</name>
-  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <genid>00010203-0405-4607-8809-0a0b0c0d0e0f</genid>
-  <memory unit='KiB'>219136</memory>
-  <currentMemory unit='KiB'>219136</currentMemory>
-  <vcpu placement='static'>1</vcpu>
-  <os>
-    <type arch='x86_64' machine='pc'>hvm</type>
-    <boot dev='hd'/>
-  </os>
-  <features>
-    <acpi/>
-  </features>
-  <cpu mode='custom' match='exact' check='none'>
-    <model fallback='forbid'>qemu64</model>
-  </cpu>
-  <clock offset='utc'/>
-  <on_poweroff>destroy</on_poweroff>
-  <on_reboot>restart</on_reboot>
-  <on_crash>destroy</on_crash>
-  <devices>
-    <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <controller type='usb' index='0' model='piix3-uhci'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
-    </controller>
-    <controller type='ide' index='0'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
-    </controller>
-    <controller type='pci' index='0' model='pci-root'/>
-    <input type='mouse' bus='ps2'/>
-    <input type='keyboard' bus='ps2'/>
-    <audio id='1' type='none'/>
-    <memballoon model='none'/>
-  </devices>
-</domain>
diff --git a/tests/qemuxml2xmloutdata/genid-auto-inactive.x86_64-latest.xml b/tests/qemuxml2xmloutdata/genid-auto.x86_64-latest.xml
similarity index 100%
rename from tests/qemuxml2xmloutdata/genid-auto-inactive.x86_64-latest.xml
rename to tests/qemuxml2xmloutdata/genid-auto.x86_64-latest.xml
diff --git a/tests/qemuxml2xmloutdata/genid-inactive.x86_64-latest.xml b/tests/qemuxml2xmloutdata/genid.x86_64-latest.xml
similarity index 100%
rename from tests/qemuxml2xmloutdata/genid-inactive.x86_64-latest.xml
rename to tests/qemuxml2xmloutdata/genid.x86_64-latest.xml
diff --git a/tests/qemuxml2xmloutdata/graphics-vnc-remove-generated-socket-active.x86_64-latest.xml b/tests/qemuxml2xmloutdata/graphics-vnc-remove-generated-socket-active.x86_64-latest.xml
deleted file mode 100644
index f61470a339..0000000000
--- a/tests/qemuxml2xmloutdata/graphics-vnc-remove-generated-socket-active.x86_64-latest.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<domain type='qemu'>
-  <name>QEMUGuest1</name>
-  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory unit='KiB'>219100</memory>
-  <currentMemory unit='KiB'>219100</currentMemory>
-  <vcpu placement='static'>1</vcpu>
-  <os>
-    <type arch='x86_64' machine='pc'>hvm</type>
-    <boot dev='hd'/>
-  </os>
-  <cpu mode='custom' match='exact' check='none'>
-    <model fallback='forbid'>qemu64</model>
-  </cpu>
-  <clock offset='utc'/>
-  <on_poweroff>destroy</on_poweroff>
-  <on_reboot>restart</on_reboot>
-  <on_crash>destroy</on_crash>
-  <devices>
-    <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <disk type='block' device='disk'>
-      <driver name='qemu' type='raw'/>
-      <source dev='/dev/HostVG/QEMUGuest1'/>
-      <target dev='hda' bus='ide'/>
-      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
-    </disk>
-    <controller type='usb' index='0' model='piix3-uhci'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
-    </controller>
-    <controller type='ide' index='0'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
-    </controller>
-    <controller type='pci' index='0' model='pci-root'/>
-    <input type='mouse' bus='ps2'/>
-    <input type='keyboard' bus='ps2'/>
-    <graphics type='vnc' socket='/var/lib/libvirt/qemu/domain-99-QEMUGuest1/delete.this.socket'>
-      <listen type='socket' socket='/var/lib/libvirt/qemu/domain-99-QEMUGuest1/delete.this.socket'/>
-    </graphics>
-    <audio id='1' type='none'/>
-    <video>
-      <model type='cirrus' vram='16384' heads='1' primary='yes'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
-    </video>
-    <memballoon model='none'/>
-  </devices>
-</domain>
diff --git a/tests/qemuxml2xmloutdata/graphics-vnc-remove-generated-socket-inactive.x86_64-latest.xml b/tests/qemuxml2xmloutdata/graphics-vnc-remove-generated-socket.x86_64-latest.xml
similarity index 100%
rename from tests/qemuxml2xmloutdata/graphics-vnc-remove-generated-socket-inactive.x86_64-latest.xml
rename to tests/qemuxml2xmloutdata/graphics-vnc-remove-generated-socket.x86_64-latest.xml
diff --git a/tests/qemuxml2xmloutdata/seclabel-dynamic-baselabel-inactive.x86_64-latest.xml b/tests/qemuxml2xmloutdata/seclabel-dynamic-baselabel.x86_64-latest.xml
similarity index 100%
rename from tests/qemuxml2xmloutdata/seclabel-dynamic-baselabel-inactive.x86_64-latest.xml
rename to tests/qemuxml2xmloutdata/seclabel-dynamic-baselabel.x86_64-latest.xml
diff --git a/tests/qemuxml2xmloutdata/seclabel-dynamic-labelskip-inactive.x86_64-latest.xml b/tests/qemuxml2xmloutdata/seclabel-dynamic-labelskip.x86_64-latest.xml
similarity index 100%
rename from tests/qemuxml2xmloutdata/seclabel-dynamic-labelskip-inactive.x86_64-latest.xml
rename to tests/qemuxml2xmloutdata/seclabel-dynamic-labelskip.x86_64-latest.xml
diff --git a/tests/qemuxml2xmloutdata/seclabel-dynamic-none-relabel-inactive.x86_64-latest.xml b/tests/qemuxml2xmloutdata/seclabel-dynamic-none-relabel.x86_64-latest.xml
similarity index 100%
rename from tests/qemuxml2xmloutdata/seclabel-dynamic-none-relabel-inactive.x86_64-latest.xml
rename to tests/qemuxml2xmloutdata/seclabel-dynamic-none-relabel.x86_64-latest.xml
diff --git a/tests/qemuxml2xmloutdata/seclabel-dynamic-override-inactive.x86_64-latest.xml b/tests/qemuxml2xmloutdata/seclabel-dynamic-override.x86_64-latest.xml
similarity index 100%
rename from tests/qemuxml2xmloutdata/seclabel-dynamic-override-inactive.x86_64-latest.xml
rename to tests/qemuxml2xmloutdata/seclabel-dynamic-override.x86_64-latest.xml
diff --git a/tests/qemuxml2xmloutdata/seclabel-dynamic-relabel-inactive.x86_64-latest.xml b/tests/qemuxml2xmloutdata/seclabel-dynamic-relabel.x86_64-latest.xml
similarity index 100%
rename from tests/qemuxml2xmloutdata/seclabel-dynamic-relabel-inactive.x86_64-latest.xml
rename to tests/qemuxml2xmloutdata/seclabel-dynamic-relabel.x86_64-latest.xml
diff --git a/tests/qemuxml2xmloutdata/seclabel-static-labelskip-active.x86_64-latest.xml b/tests/qemuxml2xmloutdata/seclabel-static-labelskip-active.x86_64-latest.xml
deleted file mode 100644
index 986bf3db4e..0000000000
--- a/tests/qemuxml2xmloutdata/seclabel-static-labelskip-active.x86_64-latest.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<domain type='qemu' id='1'>
-  <name>QEMUGuest1</name>
-  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory unit='KiB'>219100</memory>
-  <currentMemory unit='KiB'>219100</currentMemory>
-  <vcpu placement='static' cpuset='1-4,8-20,525'>1</vcpu>
-  <os>
-    <type arch='x86_64' machine='pc'>hvm</type>
-    <boot dev='hd'/>
-  </os>
-  <cpu mode='custom' match='exact' check='none'>
-    <model fallback='forbid'>qemu64</model>
-  </cpu>
-  <clock offset='utc'/>
-  <on_poweroff>destroy</on_poweroff>
-  <on_reboot>restart</on_reboot>
-  <on_crash>destroy</on_crash>
-  <devices>
-    <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <disk type='block' device='disk'>
-      <driver name='qemu' type='raw'/>
-      <source dev='/dev/HostVG/QEMUGuest1'>
-        <seclabel model='selinux' labelskip='yes'/>
-      </source>
-      <backingStore/>
-      <target dev='hda' bus='ide'/>
-      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
-    </disk>
-    <controller type='usb' index='0' model='piix3-uhci'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
-    </controller>
-    <controller type='ide' index='0'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
-    </controller>
-    <controller type='pci' index='0' model='pci-root'/>
-    <input type='mouse' bus='ps2'/>
-    <input type='keyboard' bus='ps2'/>
-    <audio id='1' type='none'/>
-    <memballoon model='virtio'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
-    </memballoon>
-  </devices>
-  <seclabel type='static' model='selinux' relabel='yes'>
-    <label>system_u:system_r:svirt_custom_t:s0:c192,c392</label>
-    <imagelabel>system_u:system_r:svirt_custom_t:s0:c192,c392</imagelabel>
-  </seclabel>
-</domain>
diff --git a/tests/qemuxml2xmloutdata/seclabel-static-labelskip-inactive.x86_64-latest.xml b/tests/qemuxml2xmloutdata/seclabel-static-labelskip.x86_64-latest.xml
similarity index 100%
rename from tests/qemuxml2xmloutdata/seclabel-static-labelskip-inactive.x86_64-latest.xml
rename to tests/qemuxml2xmloutdata/seclabel-static-labelskip.x86_64-latest.xml
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 2e384e76aa..1b534aa8d0 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -45,7 +45,7 @@ testXML2XMLActive(const void *opaque)
     if (testXML2XMLCommon(info) < 0 ||
         testCompareDomXML2XMLFiles(driver.caps, driver.xmlopt,
                                    info->infile, info->outfile, true,
-                                   info->parseFlags,
+                                   info->parseFlags | VIR_DOMAIN_DEF_PARSE_INACTIVE,
                                    TEST_COMPARE_DOM_XML2XML_RESULT_SUCCESS) < 0) {
         return -1;
     }
@@ -62,7 +62,7 @@ testXML2XMLInactive(const void *opaque)
     if (testXML2XMLCommon(info) < 0 ||
         testCompareDomXML2XMLFiles(driver.caps, driver.xmlopt,
                                    info->infile, info->outfile, false,
-                                   info->parseFlags,
+                                   info->parseFlags | VIR_DOMAIN_DEF_PARSE_INACTIVE,
                                    TEST_COMPARE_DOM_XML2XML_RESULT_SUCCESS) < 0) {
         return -1;
     }
@@ -71,42 +71,6 @@ testXML2XMLInactive(const void *opaque)
 }


-/**
- * testInfoSetPaths:
- * @info: test info structure to populate
- * @suffix: suffix used to create output file name e.g. ".x86-64_latest"
- * @statesuffix: suffix to create output file name based on tested state ("active" | "inactive")
- *
- * This function populates @info with the correct input and output file paths.
- *
- * The output file is chosen based on whether a version with @statesuffix exists.
- * If yes, it's used, if no the @statesuffix is omitted and it's expected that
- * both the "active" and "inactive" versions are the same.
- */
-static void
-testInfoSetPaths(testQemuInfo *info,
-                 const char *suffix,
-                 const char *statesuffix)
-{
-    VIR_FREE(info->infile);
-    VIR_FREE(info->outfile);
-
-    info->infile = g_strdup_printf("%s/qemuxml2argvdata/%s.xml", abs_srcdir,
-                                   info->name);
-
-    info->outfile = g_strdup_printf("%s/qemuxml2xmloutdata/%s-%s%s.xml",
-                                    abs_srcdir, info->name,
-                                    statesuffix, suffix);
-
-    if (!virFileExists(info->outfile)) {
-        VIR_FREE(info->outfile);
-
-        info->outfile = g_strdup_printf("%s/qemuxml2xmloutdata/%s%s.xml",
-                                        abs_srcdir, info->name, suffix);
-    }
-}
-
-
 static void
 testRun(const char *name,
         const char *suffix,
@@ -126,11 +90,12 @@ testRun(const char *name,
     testQemuInfoSetArgs(info, ap);
     va_end(ap);

+    info->infile = g_strdup_printf("%s/qemuxml2argvdata/%s.xml", abs_srcdir,
+                                   info->name);
+    info->outfile = g_strdup_printf("%s/qemuxml2xmloutdata/%s%s.xml",
+                                    abs_srcdir, info->name, suffix);

-    testInfoSetPaths(info, suffix, "inactive");
     virTestRunLog(ret, name_inactive, testXML2XMLInactive, info);
-
-    testInfoSetPaths(info, suffix, "active");
     virTestRunLog(ret, name_active, testXML2XMLActive, info);
 }

-- 
2.43.0
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[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