According to commit 52222568490 the test case was added to verify that
the '<address>' element is covered by the schema. The test was not
registered for qemuxml2argvtest though. We can use 'net-server' instead
as it has the same type. On the other hand that one was not registered
for qemuxml2xmltest.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
tests/qemuxml2argvdata/interface-server.xml | 131 -----------------
tests/qemuxml2xmloutdata/interface-server.xml | 138 ------------------
tests/qemuxml2xmloutdata/net-server.xml | 43 ++++++
tests/qemuxml2xmltest.c | 6 +-
4 files changed, 44 insertions(+), 274 deletions(-)
delete mode 100644 tests/qemuxml2argvdata/interface-server.xml
delete mode 100644 tests/qemuxml2xmloutdata/interface-server.xml
create mode 100644 tests/qemuxml2xmloutdata/net-server.xml
diff --git a/tests/qemuxml2argvdata/interface-server.xml
b/tests/qemuxml2argvdata/interface-server.xml
deleted file mode 100644
index 7bf119197a..0000000000
--- a/tests/qemuxml2argvdata/interface-server.xml
+++ /dev/null
@@ -1,131 +0,0 @@
-<domain type='kvm'>
- <name>gentoo</name>
- <uuid>a75aca4b-a02f-2bcb-4a91-c93cd848c34b</uuid>
- <memory unit='KiB'>4194304</memory>
- <currentMemory unit='KiB'>4194304</currentMemory>
- <memoryBacking>
- <hugepages>
- <page size='1048576' unit='KiB' nodeset='0-3'/>
- </hugepages>
- </memoryBacking>
- <vcpu placement='static'>4</vcpu>
- <os>
- <type arch='x86_64' machine='pc-i440fx-1.4'>hvm</type>
- <boot dev='hd'/>
- <boot dev='cdrom'/>
- </os>
- <features>
- <acpi/>
- <apic/>
- <pae/>
- </features>
- <cpu>
- <numa>
- <cell id='0' cpus='0' memory='1048576'
unit='KiB'/>
- <cell id='1' cpus='1' memory='1048576'
unit='KiB'/>
- <cell id='2' cpus='2' memory='1048576'
unit='KiB'/>
- <cell id='3' cpus='3' memory='1048576'
unit='KiB'/>
- </numa>
- </cpu>
- <clock offset='utc'/>
- <on_poweroff>destroy</on_poweroff>
- <on_reboot>restart</on_reboot>
- <on_crash>restart</on_crash>
- <pm>
- <suspend-to-mem enabled='yes'/>
- <suspend-to-disk enabled='yes'/>
- </pm>
- <devices>
- <emulator>/usr/bin/qemu-system-x86_64</emulator>
- <disk type='file' device='floppy'>
- <driver name='qemu' type='raw' cache='none'/>
- <source file='/var/lib/libvirt/images/fd.img'/>
- <target dev='fda' bus='fdc'/>
- <address type='drive' controller='0' bus='0'
target='0' unit='0'/>
- </disk>
- <disk type='file' device='disk'>
- <driver name='qemu' type='qcow2'/>
- <source file='/var/lib/libvirt/images/gentoo.qcow2'/>
- <target dev='vda' bus='virtio'/>
- <address type='pci' domain='0x0000' bus='0x00'
slot='0x05' function='0x0'/>
- </disk>
- <disk type='file' device='disk'>
- <driver name='qemu' type='qcow2'/>
- <source file='/var/lib/libvirt/images/OtherDemo.img'/>
- <target dev='vdb' bus='virtio'/>
- <address type='pci' domain='0x0000' bus='0x00'
slot='0x07' function='0x0'/>
- </disk>
- <disk type='file' device='cdrom'>
- <driver name='qemu' type='raw' cache='none'/>
- <source file='/home/zippy/tmp/install-amd64-minimal-20140619.iso'/>
- <target dev='hdc' bus='ide'/>
- <readonly/>
- <shareable/>
- <address type='drive' controller='0' bus='1'
target='0' unit='0'/>
- </disk>
- <controller type='usb' index='0'>
- <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x2'/>
- </controller>
- <controller type='pci' index='0' model='pci-root'/>
- <controller type='ide' index='0'>
- <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x1'/>
- </controller>
- <controller type='virtio-serial' index='0'>
- <address type='pci' domain='0x0000' bus='0x00'
slot='0x08' function='0x0'/>
- </controller>
- <controller type='fdc' index='0'/>
- <interface type='network'>
- <mac address='52:54:00:d6:c0:0b'/>
- <source network='default'/>
- <bandwidth>
- <inbound average='100'/>
- <outbound average='100'/>
- </bandwidth>
- <model type='virtio'/>
- <address type='pci' domain='0x0000' bus='0x00'
slot='0x03' function='0x0'/>
- </interface>
- <interface type='server'>
- <mac address='52:54:00:22:c9:42'/>
- <source address='127.0.0.1' port='1234'/>
- <bandwidth>
- <inbound average='1234'/>
- <outbound average='5678'/>
- </bandwidth>
- <model type='rtl8139'/>
- <address type='pci' domain='0x0000' bus='0x00'
slot='0x09' function='0x0'/>
- </interface>
- <interface type='client'>
- <mac address='52:54:00:8c:b1:f8'/>
- <source address='127.0.0.1' port='1234'/>
- <model type='rtl8139'/>
- <address type='pci' domain='0x0000' bus='0x00'
slot='0x0a' function='0x0'/>
- </interface>
- <serial type='pty'>
- <target port='0'/>
- </serial>
- <serial type='pty'>
- <target port='1'/>
- </serial>
- <console type='pty'>
- <target type='serial' port='0'/>
- </console>
- <channel type='unix'>
- <source mode='bind'
path='/var/lib/libvirt/qemu/channel/target/gentoo.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>
- <input type='mouse' bus='ps2'/>
- <input type='keyboard' bus='ps2'/>
- <graphics type='vnc' port='-1' autoport='yes'/>
- <sound model='ich6'>
- <address type='pci' domain='0x0000' bus='0x00'
slot='0x04' function='0x0'/>
- </sound>
- <video>
- <model type='cirrus' vram='16384' heads='1'/>
- <address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
- </video>
- <memballoon model='virtio'>
- <address type='pci' domain='0x0000' bus='0x00'
slot='0x06' function='0x0'/>
- </memballoon>
- </devices>
-</domain>
diff --git a/tests/qemuxml2xmloutdata/interface-server.xml
b/tests/qemuxml2xmloutdata/interface-server.xml
deleted file mode 100644
index 442f64afde..0000000000
--- a/tests/qemuxml2xmloutdata/interface-server.xml
+++ /dev/null
@@ -1,138 +0,0 @@
-<domain type='kvm'>
- <name>gentoo</name>
- <uuid>a75aca4b-a02f-2bcb-4a91-c93cd848c34b</uuid>
- <memory unit='KiB'>4194304</memory>
- <currentMemory unit='KiB'>4194304</currentMemory>
- <memoryBacking>
- <hugepages>
- <page size='1048576' unit='KiB' nodeset='0-3'/>
- </hugepages>
- </memoryBacking>
- <vcpu placement='static'>4</vcpu>
- <os>
- <type arch='x86_64' machine='pc-i440fx-1.4'>hvm</type>
- <boot dev='hd'/>
- <boot dev='cdrom'/>
- </os>
- <features>
- <acpi/>
- <apic/>
- <pae/>
- </features>
- <cpu>
- <numa>
- <cell id='0' cpus='0' memory='1048576'
unit='KiB'/>
- <cell id='1' cpus='1' memory='1048576'
unit='KiB'/>
- <cell id='2' cpus='2' memory='1048576'
unit='KiB'/>
- <cell id='3' cpus='3' memory='1048576'
unit='KiB'/>
- </numa>
- </cpu>
- <clock offset='utc'/>
- <on_poweroff>destroy</on_poweroff>
- <on_reboot>restart</on_reboot>
- <on_crash>restart</on_crash>
- <pm>
- <suspend-to-mem enabled='yes'/>
- <suspend-to-disk enabled='yes'/>
- </pm>
- <devices>
- <emulator>/usr/bin/qemu-system-x86_64</emulator>
- <disk type='file' device='floppy'>
- <driver name='qemu' type='raw' cache='none'/>
- <source file='/var/lib/libvirt/images/fd.img'/>
- <target dev='fda' bus='fdc'/>
- <address type='drive' controller='0' bus='0'
target='0' unit='0'/>
- </disk>
- <disk type='file' device='disk'>
- <driver name='qemu' type='qcow2'/>
- <source file='/var/lib/libvirt/images/gentoo.qcow2'/>
- <target dev='vda' bus='virtio'/>
- <address type='pci' domain='0x0000' bus='0x00'
slot='0x05' function='0x0'/>
- </disk>
- <disk type='file' device='disk'>
- <driver name='qemu' type='qcow2'/>
- <source file='/var/lib/libvirt/images/OtherDemo.img'/>
- <target dev='vdb' bus='virtio'/>
- <address type='pci' domain='0x0000' bus='0x00'
slot='0x07' function='0x0'/>
- </disk>
- <disk type='file' device='cdrom'>
- <driver name='qemu' type='raw' cache='none'/>
- <source file='/home/zippy/tmp/install-amd64-minimal-20140619.iso'/>
- <target dev='hdc' bus='ide'/>
- <readonly/>
- <shareable/>
- <address type='drive' controller='0' bus='1'
target='0' unit='0'/>
- </disk>
- <controller type='usb' index='0'>
- <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x2'/>
- </controller>
- <controller type='pci' index='0' model='pci-root'/>
- <controller type='ide' index='0'>
- <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x1'/>
- </controller>
- <controller type='virtio-serial' index='0'>
- <address type='pci' domain='0x0000' bus='0x00'
slot='0x08' function='0x0'/>
- </controller>
- <controller type='fdc' index='0'/>
- <interface type='network'>
- <mac address='52:54:00:d6:c0:0b'/>
- <source network='default'/>
- <bandwidth>
- <inbound average='100'/>
- <outbound average='100'/>
- </bandwidth>
- <model type='virtio'/>
- <address type='pci' domain='0x0000' bus='0x00'
slot='0x03' function='0x0'/>
- </interface>
- <interface type='server'>
- <mac address='52:54:00:22:c9:42'/>
- <source address='127.0.0.1' port='1234'/>
- <bandwidth>
- <inbound average='1234'/>
- <outbound average='5678'/>
- </bandwidth>
- <model type='rtl8139'/>
- <address type='pci' domain='0x0000' bus='0x00'
slot='0x09' function='0x0'/>
- </interface>
- <interface type='client'>
- <mac address='52:54:00:8c:b1:f8'/>
- <source address='127.0.0.1' port='1234'/>
- <model type='rtl8139'/>
- <address type='pci' domain='0x0000' bus='0x00'
slot='0x0a' function='0x0'/>
- </interface>
- <serial type='pty'>
- <target type='isa-serial' port='0'>
- <model name='isa-serial'/>
- </target>
- </serial>
- <serial type='pty'>
- <target type='isa-serial' port='1'>
- <model name='isa-serial'/>
- </target>
- </serial>
- <console type='pty'>
- <target type='serial' port='0'/>
- </console>
- <channel type='unix'>
- <source mode='bind'
path='/var/lib/libvirt/qemu/channel/target/gentoo.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>
- <input type='mouse' bus='ps2'/>
- <input type='keyboard' bus='ps2'/>
- <graphics type='vnc' port='-1' autoport='yes'>
- <listen type='address'/>
- </graphics>
- <sound model='ich6'>
- <address type='pci' domain='0x0000' bus='0x00'
slot='0x04' function='0x0'/>
- </sound>
- <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='virtio'>
- <address type='pci' domain='0x0000' bus='0x00'
slot='0x06' function='0x0'/>
- </memballoon>
- </devices>
-</domain>
diff --git a/tests/qemuxml2xmloutdata/net-server.xml
b/tests/qemuxml2xmloutdata/net-server.xml
new file mode 100644
index 0000000000..6878ec8c0a
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/net-server.xml
@@ -0,0 +1,43 @@
+<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='i686' machine='pc'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-i386</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='ide' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x1'/>
+ </controller>
+ <controller type='usb' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x2'/>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <interface type='server'>
+ <mac address='52:54:00:8c:b9:05'/>
+ <source address='192.168.0.1' port='5558'/>
+ <model type='rtl8139'/>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
+ </interface>
+ <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='0x03' function='0x0'/>
+ </memballoon>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index c11d415e98..88d55467ca 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -561,11 +561,7 @@ mymain(void)
DO_TEST_NOCAPS("event_idx");
DO_TEST_NOCAPS("vhost_queues");
DO_TEST_NOCAPS("interface-driver");
- DO_TEST("interface-server", QEMU_CAPS_DEVICE_CIRRUS_VGA,
- QEMU_CAPS_OBJECT_MEMORY_FILE,
- QEMU_CAPS_PIIX_DISABLE_S3,
- QEMU_CAPS_PIIX_DISABLE_S4,
- QEMU_CAPS_VNC);
+ DO_TEST_NOCAPS("net-server");
DO_TEST_NOCAPS("virtio-lun");
DO_TEST_NOCAPS("usb-none");
--
2.31.1