mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemuxml2xmltest: Add memfd tests
Somehow, these were not tested. Use symlinks to point expected output back to the input. This way we can also fix some discrepancies in the input XMLs. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
a0d53fdab9
commit
59a22be864
@ -1,4 +1,4 @@
|
|||||||
<domain type='kvm' id='56'>
|
<domain type='kvm'>
|
||||||
<name>instance-00000092</name>
|
<name>instance-00000092</name>
|
||||||
<uuid>126f2720-6f8e-45ab-a886-ec9277079a67</uuid>
|
<uuid>126f2720-6f8e-45ab-a886-ec9277079a67</uuid>
|
||||||
<memory unit='KiB'>14680064</memory>
|
<memory unit='KiB'>14680064</memory>
|
||||||
@ -16,12 +16,20 @@
|
|||||||
<cpu>
|
<cpu>
|
||||||
<topology sockets='8' cores='1' threads='1'/>
|
<topology sockets='8' cores='1' threads='1'/>
|
||||||
</cpu>
|
</cpu>
|
||||||
<clock offset='utc' />
|
<clock offset='utc'/>
|
||||||
<on_poweroff>destroy</on_poweroff>
|
<on_poweroff>destroy</on_poweroff>
|
||||||
<on_reboot>restart</on_reboot>
|
<on_reboot>restart</on_reboot>
|
||||||
<on_crash>destroy</on_crash>
|
<on_crash>destroy</on_crash>
|
||||||
<devices>
|
<devices>
|
||||||
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
||||||
<memballoon model='virtio'/>
|
<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'/>
|
||||||
|
<input type='mouse' bus='ps2'/>
|
||||||
|
<input type='keyboard' bus='ps2'/>
|
||||||
|
<memballoon model='virtio'>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
||||||
|
</memballoon>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
@ -19,12 +19,20 @@
|
|||||||
<cell id='0' cpus='0-7' memory='14680064' unit='KiB'/>
|
<cell id='0' cpus='0-7' memory='14680064' unit='KiB'/>
|
||||||
</numa>
|
</numa>
|
||||||
</cpu>
|
</cpu>
|
||||||
<clock offset='utc' />
|
<clock offset='utc'/>
|
||||||
<on_poweroff>destroy</on_poweroff>
|
<on_poweroff>destroy</on_poweroff>
|
||||||
<on_reboot>restart</on_reboot>
|
<on_reboot>restart</on_reboot>
|
||||||
<on_crash>destroy</on_crash>
|
<on_crash>destroy</on_crash>
|
||||||
<devices>
|
<devices>
|
||||||
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
||||||
<memballoon model='virtio'/>
|
<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'/>
|
||||||
|
<input type='mouse' bus='ps2'/>
|
||||||
|
<input type='keyboard' bus='ps2'/>
|
||||||
|
<memballoon model='virtio'>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
||||||
|
</memballoon>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<domain type='kvm' id='56'>
|
<domain type='kvm'>
|
||||||
<name>instance-00000092</name>
|
<name>instance-00000092</name>
|
||||||
<uuid>126f2720-6f8e-45ab-a886-ec9277079a67</uuid>
|
<uuid>126f2720-6f8e-45ab-a886-ec9277079a67</uuid>
|
||||||
<memory unit='KiB'>14680064</memory>
|
<memory unit='KiB'>14680064</memory>
|
||||||
@ -26,6 +26,14 @@
|
|||||||
<on_crash>destroy</on_crash>
|
<on_crash>destroy</on_crash>
|
||||||
<devices>
|
<devices>
|
||||||
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
||||||
<memballoon model='virtio'/>
|
<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'/>
|
||||||
|
<input type='mouse' bus='ps2'/>
|
||||||
|
<input type='keyboard' bus='ps2'/>
|
||||||
|
<memballoon model='virtio'>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
||||||
|
</memballoon>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<domain type='kvm' id='56'>
|
<domain type='kvm'>
|
||||||
<name>instance-00000092</name>
|
<name>instance-00000092</name>
|
||||||
<uuid>126f2720-6f8e-45ab-a886-ec9277079a67</uuid>
|
<uuid>126f2720-6f8e-45ab-a886-ec9277079a67</uuid>
|
||||||
<memory unit='KiB'>14680064</memory>
|
<memory unit='KiB'>14680064</memory>
|
||||||
@ -27,6 +27,14 @@
|
|||||||
<on_crash>destroy</on_crash>
|
<on_crash>destroy</on_crash>
|
||||||
<devices>
|
<devices>
|
||||||
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
||||||
<memballoon model='virtio'/>
|
<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'/>
|
||||||
|
<input type='mouse' bus='ps2'/>
|
||||||
|
<input type='keyboard' bus='ps2'/>
|
||||||
|
<memballoon model='virtio'>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
||||||
|
</memballoon>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
@ -31,7 +31,7 @@ share=yes,size=15032385536,host-nodes=3,policy=preferred \
|
|||||||
-no-acpi \
|
-no-acpi \
|
||||||
-boot strict=on \
|
-boot strict=on \
|
||||||
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
|
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
|
||||||
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
|
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
|
||||||
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
|
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
|
||||||
resourcecontrol=deny \
|
resourcecontrol=deny \
|
||||||
-msg timestamp=on
|
-msg timestamp=on
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
<domain type='kvm' id='56'>
|
<domain type='kvm'>
|
||||||
<name>instance-00000092</name>
|
<name>instance-00000092</name>
|
||||||
<uuid>126f2720-6f8e-45ab-a886-ec9277079a67</uuid>
|
<uuid>126f2720-6f8e-45ab-a886-ec9277079a67</uuid>
|
||||||
<memory unit='KiB'>14680064</memory>
|
<memory unit='KiB'>14680064</memory>
|
||||||
<currentMemory unit='KiB'>14680064</currentMemory>
|
<currentMemory unit='KiB'>14680064</currentMemory>
|
||||||
<memoryBacking>
|
<memoryBacking>
|
||||||
<hugepages>
|
<hugepages>
|
||||||
<page size="2" unit="M"/>
|
<page size='2048' unit='KiB'/>
|
||||||
</hugepages>
|
</hugepages>
|
||||||
<source type='memfd'/>
|
<source type='memfd'/>
|
||||||
<access mode='shared'/>
|
<access mode='shared'/>
|
||||||
<allocation mode='immediate'/>
|
<allocation mode='immediate'/>
|
||||||
</memoryBacking>
|
</memoryBacking>
|
||||||
|
<vcpu placement='static'>8</vcpu>
|
||||||
<numatune>
|
<numatune>
|
||||||
<memnode cellid='0' mode='preferred' nodeset='3'/>
|
<memnode cellid='0' mode='preferred' nodeset='3'/>
|
||||||
</numatune>
|
</numatune>
|
||||||
<vcpu placement='static'>8</vcpu>
|
|
||||||
<os>
|
<os>
|
||||||
<type arch='x86_64' machine='pc-i440fx-wily'>hvm</type>
|
<type arch='x86_64' machine='pc-i440fx-wily'>hvm</type>
|
||||||
<boot dev='hd'/>
|
<boot dev='hd'/>
|
||||||
@ -31,6 +31,14 @@
|
|||||||
<on_crash>destroy</on_crash>
|
<on_crash>destroy</on_crash>
|
||||||
<devices>
|
<devices>
|
||||||
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
||||||
<memballoon model='virtio'/>
|
<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'/>
|
||||||
|
<input type='mouse' bus='ps2'/>
|
||||||
|
<input type='keyboard' bus='ps2'/>
|
||||||
|
<memballoon model='virtio'>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
||||||
|
</memballoon>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
1
tests/qemuxml2xmloutdata/fd-memory-no-numa-topology.xml
Symbolic link
1
tests/qemuxml2xmloutdata/fd-memory-no-numa-topology.xml
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../qemuxml2argvdata/fd-memory-no-numa-topology.xml
|
1
tests/qemuxml2xmloutdata/fd-memory-numa-topology.xml
Symbolic link
1
tests/qemuxml2xmloutdata/fd-memory-numa-topology.xml
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../qemuxml2argvdata/fd-memory-numa-topology.xml
|
1
tests/qemuxml2xmloutdata/fd-memory-numa-topology2.xml
Symbolic link
1
tests/qemuxml2xmloutdata/fd-memory-numa-topology2.xml
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../qemuxml2argvdata/fd-memory-numa-topology2.xml
|
1
tests/qemuxml2xmloutdata/fd-memory-numa-topology3.xml
Symbolic link
1
tests/qemuxml2xmloutdata/fd-memory-numa-topology3.xml
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../qemuxml2argvdata/fd-memory-numa-topology3.xml
|
1
tests/qemuxml2xmloutdata/memfd-memory-numa.xml
Symbolic link
1
tests/qemuxml2xmloutdata/memfd-memory-numa.xml
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../qemuxml2argvdata/memfd-memory-numa.xml
|
@ -1158,6 +1158,20 @@ mymain(void)
|
|||||||
QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM,
|
QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM,
|
||||||
QEMU_CAPS_VIRTIO_PCI_ATS);
|
QEMU_CAPS_VIRTIO_PCI_ATS);
|
||||||
|
|
||||||
|
DO_TEST("fd-memory-numa-topology", QEMU_CAPS_OBJECT_MEMORY_FILE,
|
||||||
|
QEMU_CAPS_KVM);
|
||||||
|
DO_TEST("fd-memory-numa-topology2", QEMU_CAPS_OBJECT_MEMORY_FILE,
|
||||||
|
QEMU_CAPS_KVM);
|
||||||
|
DO_TEST("fd-memory-numa-topology3", QEMU_CAPS_OBJECT_MEMORY_FILE,
|
||||||
|
QEMU_CAPS_KVM);
|
||||||
|
|
||||||
|
DO_TEST("fd-memory-no-numa-topology", QEMU_CAPS_OBJECT_MEMORY_FILE,
|
||||||
|
QEMU_CAPS_KVM);
|
||||||
|
|
||||||
|
DO_TEST("memfd-memory-numa",
|
||||||
|
QEMU_CAPS_OBJECT_MEMORY_MEMFD,
|
||||||
|
QEMU_CAPS_OBJECT_MEMORY_MEMFD_HUGETLB);
|
||||||
|
|
||||||
DO_TEST("acpi-table", NONE);
|
DO_TEST("acpi-table", NONE);
|
||||||
|
|
||||||
DO_TEST("video-device-pciaddr-default",
|
DO_TEST("video-device-pciaddr-default",
|
||||||
|
Loading…
Reference in New Issue
Block a user