Add explicit test cases for XMLs from qemuxml2argvdata which historically had different output in qemuxml2xmltest. qemuxmlactivetest explicitly ensures that the input XMLs are parsed in 'live' state and formatted both in inactive as well as live state, rather than the previously present inactive->inactive, live->live tests only. The XMLs picked in this case are those which had separate output files in qemuxml2argvtest. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- ...-unix-source-path-active.x86_64-latest.xml | 62 +++++++ ...nix-source-path-inactive.x86_64-latest.xml | 62 +++++++ ...nnel-virtio-state-active.x86_64-latest.xml | 55 ++++++ ...el-virtio-state-inactive.x86_64-latest.xml | 55 ++++++ ...isk-active-commit-active.x86_64-latest.xml | 49 ++++++ ...k-active-commit-inactive.x86_64-latest.xml | 45 +++++ ...king-chains-index-active.x86_64-latest.xml | 164 ++++++++++++++++++ ...ng-chains-index-inactive.x86_64-latest.xml | 164 ++++++++++++++++++ .../disk-mirror-active.x86_64-latest.xml | 97 +++++++++++ .../disk-mirror-inactive.x86_64-latest.xml | 70 ++++++++ .../disk-mirror-old-active.x86_64-latest.xml | 71 ++++++++ ...disk-mirror-old-inactive.x86_64-latest.xml | 63 +++++++ .../genid-active.x86_64-latest.xml | 36 ++++ .../genid-auto-active.x86_64-latest.xml | 36 ++++ .../genid-auto-inactive.x86_64-latest.xml | 36 ++++ .../genid-inactive.x86_64-latest.xml | 36 ++++ ...-generated-socket-active.x86_64-latest.xml | 45 +++++ ...enerated-socket-inactive.x86_64-latest.xml | 45 +++++ ...-static-labelskip-active.x86_64-latest.xml | 47 +++++ ...tatic-labelskip-inactive.x86_64-latest.xml | 45 +++++ tests/qemuxmlactivetest.c | 13 +- 21 files changed, 1295 insertions(+), 1 deletion(-) create mode 100644 tests/qemuxmlactive2xmldata/channel-unix-source-path-active.x86_64-latest.xml create mode 100644 tests/qemuxmlactive2xmldata/channel-unix-source-path-inactive.x86_64-latest.xml create mode 100644 tests/qemuxmlactive2xmldata/channel-virtio-state-active.x86_64-latest.xml create mode 100644 tests/qemuxmlactive2xmldata/channel-virtio-state-inactive.x86_64-latest.xml create mode 100644 tests/qemuxmlactive2xmldata/disk-active-commit-active.x86_64-latest.xml create mode 100644 tests/qemuxmlactive2xmldata/disk-active-commit-inactive.x86_64-latest.xml create mode 100644 tests/qemuxmlactive2xmldata/disk-backing-chains-index-active.x86_64-latest.xml create mode 100644 tests/qemuxmlactive2xmldata/disk-backing-chains-index-inactive.x86_64-latest.xml create mode 100644 tests/qemuxmlactive2xmldata/disk-mirror-active.x86_64-latest.xml create mode 100644 tests/qemuxmlactive2xmldata/disk-mirror-inactive.x86_64-latest.xml create mode 100644 tests/qemuxmlactive2xmldata/disk-mirror-old-active.x86_64-latest.xml create mode 100644 tests/qemuxmlactive2xmldata/disk-mirror-old-inactive.x86_64-latest.xml create mode 100644 tests/qemuxmlactive2xmldata/genid-active.x86_64-latest.xml create mode 100644 tests/qemuxmlactive2xmldata/genid-auto-active.x86_64-latest.xml create mode 100644 tests/qemuxmlactive2xmldata/genid-auto-inactive.x86_64-latest.xml create mode 100644 tests/qemuxmlactive2xmldata/genid-inactive.x86_64-latest.xml create mode 100644 tests/qemuxmlactive2xmldata/graphics-vnc-remove-generated-socket-active.x86_64-latest.xml create mode 100644 tests/qemuxmlactive2xmldata/graphics-vnc-remove-generated-socket-inactive.x86_64-latest.xml create mode 100644 tests/qemuxmlactive2xmldata/seclabel-static-labelskip-active.x86_64-latest.xml create mode 100644 tests/qemuxmlactive2xmldata/seclabel-static-labelskip-inactive.x86_64-latest.xml diff --git a/tests/qemuxmlactive2xmldata/channel-unix-source-path-active.x86_64-latest.xml b/tests/qemuxmlactive2xmldata/channel-unix-source-path-active.x86_64-latest.xml new file mode 100644 index 0000000000..a055cee79c --- /dev/null +++ b/tests/qemuxmlactive2xmldata/channel-unix-source-path-active.x86_64-latest.xml @@ -0,0 +1,62 @@ +<domain type='qemu' id='1337'> + <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/qemuxmlactive2xmldata/channel-unix-source-path-inactive.x86_64-latest.xml b/tests/qemuxmlactive2xmldata/channel-unix-source-path-inactive.x86_64-latest.xml new file mode 100644 index 0000000000..022ad7025a --- /dev/null +++ b/tests/qemuxmlactive2xmldata/channel-unix-source-path-inactive.x86_64-latest.xml @@ -0,0 +1,62 @@ +<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/qemuxmlactive2xmldata/channel-virtio-state-active.x86_64-latest.xml b/tests/qemuxmlactive2xmldata/channel-virtio-state-active.x86_64-latest.xml new file mode 100644 index 0000000000..a4ffae81e8 --- /dev/null +++ b/tests/qemuxmlactive2xmldata/channel-virtio-state-active.x86_64-latest.xml @@ -0,0 +1,55 @@ +<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/qemuxmlactive2xmldata/channel-virtio-state-inactive.x86_64-latest.xml b/tests/qemuxmlactive2xmldata/channel-virtio-state-inactive.x86_64-latest.xml new file mode 100644 index 0000000000..40bd003c59 --- /dev/null +++ b/tests/qemuxmlactive2xmldata/channel-virtio-state-inactive.x86_64-latest.xml @@ -0,0 +1,55 @@ +<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' 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'/> + <address type='virtio-serial' controller='1' bus='0' port='3'/> + </channel> + <channel type='pty'> + <target type='virtio' name='org.linux-kvm.port.foo1'/> + <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/qemuxmlactive2xmldata/disk-active-commit-active.x86_64-latest.xml b/tests/qemuxmlactive2xmldata/disk-active-commit-active.x86_64-latest.xml new file mode 100644 index 0000000000..cbe47150a9 --- /dev/null +++ b/tests/qemuxmlactive2xmldata/disk-active-commit-active.x86_64-latest.xml @@ -0,0 +1,49 @@ +<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/qemuxmlactive2xmldata/disk-active-commit-inactive.x86_64-latest.xml b/tests/qemuxmlactive2xmldata/disk-active-commit-inactive.x86_64-latest.xml new file mode 100644 index 0000000000..60e6a690af --- /dev/null +++ b/tests/qemuxmlactive2xmldata/disk-active-commit-inactive.x86_64-latest.xml @@ -0,0 +1,45 @@ +<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='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> + <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/qemuxmlactive2xmldata/disk-backing-chains-index-active.x86_64-latest.xml b/tests/qemuxmlactive2xmldata/disk-backing-chains-index-active.x86_64-latest.xml new file mode 100644 index 0000000000..fec48e863b --- /dev/null +++ b/tests/qemuxmlactive2xmldata/disk-backing-chains-index-active.x86_64-latest.xml @@ -0,0 +1,164 @@ +<domain type='qemu' id='1337'> + <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/qemuxmlactive2xmldata/disk-backing-chains-index-inactive.x86_64-latest.xml b/tests/qemuxmlactive2xmldata/disk-backing-chains-index-inactive.x86_64-latest.xml new file mode 100644 index 0000000000..52c8ad6f29 --- /dev/null +++ b/tests/qemuxmlactive2xmldata/disk-backing-chains-index-inactive.x86_64-latest.xml @@ -0,0 +1,164 @@ +<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/qemuxmlactive2xmldata/disk-mirror-active.x86_64-latest.xml b/tests/qemuxmlactive2xmldata/disk-mirror-active.x86_64-latest.xml new file mode 100644 index 0000000000..0cd61afa5c --- /dev/null +++ b/tests/qemuxmlactive2xmldata/disk-mirror-active.x86_64-latest.xml @@ -0,0 +1,97 @@ +<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/qemuxmlactive2xmldata/disk-mirror-inactive.x86_64-latest.xml b/tests/qemuxmlactive2xmldata/disk-mirror-inactive.x86_64-latest.xml new file mode 100644 index 0000000000..f94cd6519f --- /dev/null +++ b/tests/qemuxmlactive2xmldata/disk-mirror-inactive.x86_64-latest.xml @@ -0,0 +1,70 @@ +<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='block' device='disk'> + <driver name='qemu' type='raw'/> + <source dev='/dev/HostVG/QEMUGuest1'/> + <backingStore/> + <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/> + <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> + <disk type='file' device='disk'> + <driver name='qemu' type='raw'/> + <source file='/tmp/data2.img'/> + <backingStore/> + <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/qemuxmlactive2xmldata/disk-mirror-old-active.x86_64-latest.xml b/tests/qemuxmlactive2xmldata/disk-mirror-old-active.x86_64-latest.xml new file mode 100644 index 0000000000..0732cf9e9c --- /dev/null +++ b/tests/qemuxmlactive2xmldata/disk-mirror-old-active.x86_64-latest.xml @@ -0,0 +1,71 @@ +<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/qemuxmlactive2xmldata/disk-mirror-old-inactive.x86_64-latest.xml b/tests/qemuxmlactive2xmldata/disk-mirror-old-inactive.x86_64-latest.xml new file mode 100644 index 0000000000..ec598bfdbd --- /dev/null +++ b/tests/qemuxmlactive2xmldata/disk-mirror-old-inactive.x86_64-latest.xml @@ -0,0 +1,63 @@ +<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='block' device='disk'> + <driver name='qemu' type='raw'/> + <source dev='/dev/HostVG/QEMUGuest1'/> + <backingStore/> + <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/> + <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/qemuxmlactive2xmldata/genid-active.x86_64-latest.xml b/tests/qemuxmlactive2xmldata/genid-active.x86_64-latest.xml new file mode 100644 index 0000000000..06a01bb688 --- /dev/null +++ b/tests/qemuxmlactive2xmldata/genid-active.x86_64-latest.xml @@ -0,0 +1,36 @@ +<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/qemuxmlactive2xmldata/genid-auto-active.x86_64-latest.xml b/tests/qemuxmlactive2xmldata/genid-auto-active.x86_64-latest.xml new file mode 100644 index 0000000000..ce3af24282 --- /dev/null +++ b/tests/qemuxmlactive2xmldata/genid-auto-active.x86_64-latest.xml @@ -0,0 +1,36 @@ +<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/qemuxmlactive2xmldata/genid-auto-inactive.x86_64-latest.xml b/tests/qemuxmlactive2xmldata/genid-auto-inactive.x86_64-latest.xml new file mode 100644 index 0000000000..a0b9e156b7 --- /dev/null +++ b/tests/qemuxmlactive2xmldata/genid-auto-inactive.x86_64-latest.xml @@ -0,0 +1,36 @@ +<domain type='qemu'> + <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/qemuxmlactive2xmldata/genid-inactive.x86_64-latest.xml b/tests/qemuxmlactive2xmldata/genid-inactive.x86_64-latest.xml new file mode 100644 index 0000000000..9406c6e48a --- /dev/null +++ b/tests/qemuxmlactive2xmldata/genid-inactive.x86_64-latest.xml @@ -0,0 +1,36 @@ +<domain type='qemu'> + <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/qemuxmlactive2xmldata/graphics-vnc-remove-generated-socket-active.x86_64-latest.xml b/tests/qemuxmlactive2xmldata/graphics-vnc-remove-generated-socket-active.x86_64-latest.xml new file mode 100644 index 0000000000..60508b2c39 --- /dev/null +++ b/tests/qemuxmlactive2xmldata/graphics-vnc-remove-generated-socket-active.x86_64-latest.xml @@ -0,0 +1,45 @@ +<domain type='qemu' id='1337'> + <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/qemuxmlactive2xmldata/graphics-vnc-remove-generated-socket-inactive.x86_64-latest.xml b/tests/qemuxmlactive2xmldata/graphics-vnc-remove-generated-socket-inactive.x86_64-latest.xml new file mode 100644 index 0000000000..f61470a339 --- /dev/null +++ b/tests/qemuxmlactive2xmldata/graphics-vnc-remove-generated-socket-inactive.x86_64-latest.xml @@ -0,0 +1,45 @@ +<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/qemuxmlactive2xmldata/seclabel-static-labelskip-active.x86_64-latest.xml b/tests/qemuxmlactive2xmldata/seclabel-static-labelskip-active.x86_64-latest.xml new file mode 100644 index 0000000000..986bf3db4e --- /dev/null +++ b/tests/qemuxmlactive2xmldata/seclabel-static-labelskip-active.x86_64-latest.xml @@ -0,0 +1,47 @@ +<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/qemuxmlactive2xmldata/seclabel-static-labelskip-inactive.x86_64-latest.xml b/tests/qemuxmlactive2xmldata/seclabel-static-labelskip-inactive.x86_64-latest.xml new file mode 100644 index 0000000000..3496414adb --- /dev/null +++ b/tests/qemuxmlactive2xmldata/seclabel-static-labelskip-inactive.x86_64-latest.xml @@ -0,0 +1,45 @@ +<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' 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'/> + <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/qemuxmlactivetest.c b/tests/qemuxmlactivetest.c index f892a1fbbe..a8946fb57e 100644 --- a/tests/qemuxmlactivetest.c +++ b/tests/qemuxmlactivetest.c @@ -156,7 +156,7 @@ testqemuActiveXML2XMLInactive(const void *opaque) } -static void G_GNUC_UNUSED +static void testRunActive(const char *name, const char *suffix, struct testQemuConf *testConf, @@ -217,6 +217,17 @@ mymain(void) testRunActive(_name, ".x86_64-latest", &testConf, &ret, \ ARG_CAPS_ARCH, "x86_64", ARG_CAPS_VER, "latest", ARG_END); + DO_TEST_ACTIVE_CAPS_LATEST("channel-unix-source-path"); + DO_TEST_ACTIVE_CAPS_LATEST("channel-virtio-state"); + DO_TEST_ACTIVE_CAPS_LATEST("disk-active-commit"); + DO_TEST_ACTIVE_CAPS_LATEST("disk-backing-chains-index"); + DO_TEST_ACTIVE_CAPS_LATEST("disk-mirror"); + DO_TEST_ACTIVE_CAPS_LATEST("disk-mirror-old"); + DO_TEST_ACTIVE_CAPS_LATEST("genid"); + DO_TEST_ACTIVE_CAPS_LATEST("genid-auto"); + DO_TEST_ACTIVE_CAPS_LATEST("graphics-vnc-remove-generated-socket"); + DO_TEST_ACTIVE_CAPS_LATEST("seclabel-static-labelskip"); + #define DO_TEST_STATUS(_name) \ do { \ if (testRunStatus(_name, &testConf, ARG_END) < 0) \ -- 2.43.0 _______________________________________________ Devel mailing list -- devel@xxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx