qemuxml2(argv|xml)test: Modernize 'fd-memory*' test cases

Use latest real capabilities.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2023-08-15 16:55:10 +02:00
parent 4bc796a82f
commit 3e6b39563b
15 changed files with 83 additions and 76 deletions

View File

@ -9,14 +9,14 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-instance-00000092/.config \
/usr/bin/qemu-system-x86_64 \ /usr/bin/qemu-system-x86_64 \
-name guest=instance-00000092,debug-threads=on \ -name guest=instance-00000092,debug-threads=on \
-S \ -S \
-object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-instance-00000092/master-key.aes \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-instance-00000092/master-key.aes"}' \
-machine pc,usb=off,dump-guest-core=off \ -machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \
-accel kvm \ -accel kvm \
-cpu qemu64 \
-m size=14680064k \ -m size=14680064k \
-mem-prealloc \ -object '{"qom-type":"memory-backend-file","id":"pc.ram","mem-path":"/var/lib/libvirt/qemu/ram/-1-instance-00000092/pc.ram","share":true,"x-use-canonical-path-for-ramblock-id":false,"prealloc":true,"size":15032385536}' \
-mem-path /var/lib/libvirt/qemu/ram/-1-instance-00000092/ram \
-overcommit mem-lock=off \ -overcommit mem-lock=off \
-smp 8,sockets=8,cores=1,threads=1 \ -smp 8,sockets=8,dies=1,cores=1,threads=1 \
-uuid 126f2720-6f8e-45ab-a886-ec9277079a67 \ -uuid 126f2720-6f8e-45ab-a886-ec9277079a67 \
-display none \ -display none \
-no-user-config \ -no-user-config \
@ -25,9 +25,9 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-instance-00000092/.config \
-mon chardev=charmonitor,id=monitor,mode=control \ -mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc \ -rtc base=utc \
-no-shutdown \ -no-shutdown \
-no-acpi \
-boot strict=on \ -boot strict=on \
-usb \ -device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \
-audiodev '{"id":"audio1","driver":"none"}' \ -audiodev '{"id":"audio1","driver":"none"}' \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x3"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on -msg timestamp=on

View File

@ -13,7 +13,8 @@
<type arch='x86_64' machine='pc'>hvm</type> <type arch='x86_64' machine='pc'>hvm</type>
<boot dev='hd'/> <boot dev='hd'/>
</os> </os>
<cpu> <cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu64</model>
<topology sockets='8' dies='1' cores='1' threads='1'/> <topology sockets='8' dies='1' cores='1' threads='1'/>
</cpu> </cpu>
<clock offset='utc'/> <clock offset='utc'/>
@ -22,7 +23,7 @@
<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>
<controller type='usb' index='0'> <controller type='usb' index='0' model='piix3-uhci'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
</controller> </controller>
<controller type='pci' index='0' model='pci-root'/> <controller type='pci' index='0' model='pci-root'/>

View File

@ -9,13 +9,14 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-instance-00000092/.config \
/usr/bin/qemu-system-x86_64 \ /usr/bin/qemu-system-x86_64 \
-name guest=instance-00000092,debug-threads=on \ -name guest=instance-00000092,debug-threads=on \
-S \ -S \
-object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-instance-00000092/master-key.aes \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-instance-00000092/master-key.aes"}' \
-machine pc,usb=off,dump-guest-core=off \ -machine pc,usb=off,dump-guest-core=off,acpi=off \
-accel kvm \ -accel kvm \
-cpu qemu64 \
-m size=14680064k \ -m size=14680064k \
-overcommit mem-lock=off \ -overcommit mem-lock=off \
-smp 8,sockets=1,cores=8,threads=1 \ -smp 8,sockets=1,dies=1,cores=8,threads=1 \
-object memory-backend-file,id=ram-node0,mem-path=/var/lib/libvirt/qemu/ram/-1-instance-00000092/ram-node0,share=on,prealloc=on,size=15032385536 \ -object '{"qom-type":"memory-backend-file","id":"ram-node0","mem-path":"/var/lib/libvirt/qemu/ram/-1-instance-00000092/ram-node0","share":true,"prealloc":true,"size":15032385536}' \
-numa node,nodeid=0,cpus=0-7,memdev=ram-node0 \ -numa node,nodeid=0,cpus=0-7,memdev=ram-node0 \
-uuid 126f2720-6f8e-45ab-a886-ec9277079a67 \ -uuid 126f2720-6f8e-45ab-a886-ec9277079a67 \
-display none \ -display none \
@ -25,9 +26,9 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-instance-00000092/.config \
-mon chardev=charmonitor,id=monitor,mode=control \ -mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc \ -rtc base=utc \
-no-shutdown \ -no-shutdown \
-no-acpi \
-boot strict=on \ -boot strict=on \
-usb \ -device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \
-audiodev '{"id":"audio1","driver":"none"}' \ -audiodev '{"id":"audio1","driver":"none"}' \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x3"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on -msg timestamp=on

View File

@ -13,7 +13,8 @@
<type arch='x86_64' machine='pc'>hvm</type> <type arch='x86_64' machine='pc'>hvm</type>
<boot dev='hd'/> <boot dev='hd'/>
</os> </os>
<cpu> <cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu64</model>
<topology sockets='1' dies='1' cores='8' threads='1'/> <topology sockets='1' dies='1' cores='8' threads='1'/>
<numa> <numa>
<cell id='0' cpus='0-7' memory='14680064' unit='KiB'/> <cell id='0' cpus='0-7' memory='14680064' unit='KiB'/>
@ -25,7 +26,7 @@
<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>
<controller type='usb' index='0'> <controller type='usb' index='0' model='piix3-uhci'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
</controller> </controller>
<controller type='pci' index='0' model='pci-root'/> <controller type='pci' index='0' model='pci-root'/>

View File

@ -9,15 +9,16 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-instance-00000092/.config \
/usr/bin/qemu-system-x86_64 \ /usr/bin/qemu-system-x86_64 \
-name guest=instance-00000092,debug-threads=on \ -name guest=instance-00000092,debug-threads=on \
-S \ -S \
-object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-instance-00000092/master-key.aes \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-instance-00000092/master-key.aes"}' \
-machine pc,usb=off,dump-guest-core=off \ -machine pc,usb=off,dump-guest-core=off,acpi=off \
-accel kvm \ -accel kvm \
-cpu qemu64 \
-m size=29360128k \ -m size=29360128k \
-overcommit mem-lock=off \ -overcommit mem-lock=off \
-smp 20,sockets=1,cores=20,threads=1 \ -smp 20,sockets=1,dies=1,cores=20,threads=1 \
-object memory-backend-file,id=ram-node0,mem-path=/var/lib/libvirt/qemu/ram/-1-instance-00000092/ram-node0,share=off,prealloc=on,size=15032385536 \ -object '{"qom-type":"memory-backend-file","id":"ram-node0","mem-path":"/var/lib/libvirt/qemu/ram/-1-instance-00000092/ram-node0","share":false,"prealloc":true,"size":15032385536}' \
-numa node,nodeid=0,cpus=0-7,cpus=16-19,memdev=ram-node0 \ -numa node,nodeid=0,cpus=0-7,cpus=16-19,memdev=ram-node0 \
-object memory-backend-file,id=ram-node1,mem-path=/var/lib/libvirt/qemu/ram/-1-instance-00000092/ram-node1,share=on,prealloc=on,size=15032385536 \ -object '{"qom-type":"memory-backend-file","id":"ram-node1","mem-path":"/var/lib/libvirt/qemu/ram/-1-instance-00000092/ram-node1","share":true,"prealloc":true,"size":15032385536}' \
-numa node,nodeid=1,cpus=8-15,memdev=ram-node1 \ -numa node,nodeid=1,cpus=8-15,memdev=ram-node1 \
-uuid 126f2720-6f8e-45ab-a886-ec9277079a67 \ -uuid 126f2720-6f8e-45ab-a886-ec9277079a67 \
-display none \ -display none \
@ -27,9 +28,9 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-instance-00000092/.config \
-mon chardev=charmonitor,id=monitor,mode=control \ -mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc \ -rtc base=utc \
-no-shutdown \ -no-shutdown \
-no-acpi \
-boot strict=on \ -boot strict=on \
-usb \ -device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \
-audiodev '{"id":"audio1","driver":"none"}' \ -audiodev '{"id":"audio1","driver":"none"}' \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x3"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on -msg timestamp=on

View File

@ -13,7 +13,8 @@
<type arch='x86_64' machine='pc'>hvm</type> <type arch='x86_64' machine='pc'>hvm</type>
<boot dev='hd'/> <boot dev='hd'/>
</os> </os>
<cpu> <cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu64</model>
<topology sockets='1' dies='1' cores='20' threads='1'/> <topology sockets='1' dies='1' cores='20' threads='1'/>
<numa> <numa>
<cell id='0' cpus='0-7,16-19' memory='14680064' unit='KiB'/> <cell id='0' cpus='0-7,16-19' memory='14680064' unit='KiB'/>
@ -26,7 +27,7 @@
<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>
<controller type='usb' index='0'> <controller type='usb' index='0' model='piix3-uhci'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
</controller> </controller>
<controller type='pci' index='0' model='pci-root'/> <controller type='pci' index='0' model='pci-root'/>

View File

@ -1,37 +0,0 @@
LC_ALL=C \
PATH=/bin \
HOME=/var/lib/libvirt/qemu/domain--1-instance-00000092 \
USER=test \
LOGNAME=test \
XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-instance-00000092/.local/share \
XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-instance-00000092/.cache \
XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-instance-00000092/.config \
/usr/bin/qemu-system-x86_64 \
-name guest=instance-00000092,debug-threads=on \
-S \
-object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-instance-00000092/master-key.aes \
-machine pc,usb=off,dump-guest-core=off \
-accel kvm \
-m size=44040192k \
-overcommit mem-lock=off \
-smp 32,sockets=1,cores=32,threads=1 \
-object memory-backend-file,id=ram-node0,mem-path=/var/lib/libvirt/qemu/ram/-1-instance-00000092/ram-node0,share=on,prealloc=on,size=15032385536 \
-numa node,nodeid=0,cpus=0-1,cpus=6-31,memdev=ram-node0 \
-object memory-backend-file,id=ram-node1,mem-path=/var/lib/libvirt/qemu/ram/-1-instance-00000092/ram-node1,share=on,prealloc=on,size=15032385536 \
-numa node,nodeid=1,cpus=2-3,memdev=ram-node1 \
-object memory-backend-file,id=ram-node2,mem-path=/var/lib/libvirt/qemu/ram/-1-instance-00000092/ram-node2,share=off,prealloc=on,size=15032385536 \
-numa node,nodeid=2,cpus=4-5,memdev=ram-node2 \
-uuid 126f2720-6f8e-45ab-a886-ec9277079a67 \
-display none \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc \
-no-shutdown \
-no-acpi \
-boot strict=on \
-usb \
-audiodev '{"id":"audio1","driver":"none"}' \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
-msg timestamp=on

View File

@ -0,0 +1,38 @@
LC_ALL=C \
PATH=/bin \
HOME=/var/lib/libvirt/qemu/domain--1-instance-00000092 \
USER=test \
LOGNAME=test \
XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-instance-00000092/.local/share \
XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-instance-00000092/.cache \
XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-instance-00000092/.config \
/usr/bin/qemu-system-x86_64 \
-name guest=instance-00000092,debug-threads=on \
-S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-instance-00000092/master-key.aes"}' \
-machine pc,usb=off,dump-guest-core=off,acpi=off \
-accel kvm \
-cpu qemu64 \
-m size=44040192k \
-overcommit mem-lock=off \
-smp 32,sockets=1,dies=1,cores=32,threads=1 \
-object '{"qom-type":"memory-backend-file","id":"ram-node0","mem-path":"/var/lib/libvirt/qemu/ram/-1-instance-00000092/ram-node0","share":true,"prealloc":true,"size":15032385536}' \
-numa node,nodeid=0,cpus=0-1,cpus=6-31,memdev=ram-node0 \
-object '{"qom-type":"memory-backend-file","id":"ram-node1","mem-path":"/var/lib/libvirt/qemu/ram/-1-instance-00000092/ram-node1","share":true,"prealloc":true,"size":15032385536}' \
-numa node,nodeid=1,cpus=2-3,memdev=ram-node1 \
-object '{"qom-type":"memory-backend-file","id":"ram-node2","mem-path":"/var/lib/libvirt/qemu/ram/-1-instance-00000092/ram-node2","share":false,"prealloc":true,"size":15032385536}' \
-numa node,nodeid=2,cpus=4-5,memdev=ram-node2 \
-uuid 126f2720-6f8e-45ab-a886-ec9277079a67 \
-display none \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc \
-no-shutdown \
-boot strict=on \
-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x3"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on

View File

@ -13,7 +13,8 @@
<type arch='x86_64' machine='pc'>hvm</type> <type arch='x86_64' machine='pc'>hvm</type>
<boot dev='hd'/> <boot dev='hd'/>
</os> </os>
<cpu> <cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu64</model>
<topology sockets='1' dies='1' cores='32' threads='1'/> <topology sockets='1' dies='1' cores='32' threads='1'/>
<numa> <numa>
<cell id='0' cpus='0-1,6-31' memory='14680064' unit='KiB'/> <cell id='0' cpus='0-1,6-31' memory='14680064' unit='KiB'/>
@ -27,7 +28,7 @@
<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>
<controller type='usb' index='0'> <controller type='usb' index='0' model='piix3-uhci'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
</controller> </controller>
<controller type='pci' index='0' model='pci-root'/> <controller type='pci' index='0' model='pci-root'/>

View File

@ -2583,12 +2583,12 @@ mymain(void)
DO_TEST_CAPS_LATEST("virtio-options-video-packed"); DO_TEST_CAPS_LATEST("virtio-options-video-packed");
DO_TEST_PARSE_ERROR_NOCAPS("virtio-options-memballoon-freepage-reporting"); DO_TEST_PARSE_ERROR_NOCAPS("virtio-options-memballoon-freepage-reporting");
DO_TEST("fd-memory-numa-topology", QEMU_CAPS_KVM); DO_TEST_CAPS_LATEST("fd-memory-numa-topology");
DO_TEST("fd-memory-numa-topology2", QEMU_CAPS_KVM); DO_TEST_CAPS_LATEST("fd-memory-numa-topology2");
DO_TEST("fd-memory-numa-topology3", QEMU_CAPS_KVM); DO_TEST_CAPS_LATEST("fd-memory-numa-topology3");
DO_TEST_CAPS_LATEST("fd-memory-numa-topology4"); DO_TEST_CAPS_LATEST("fd-memory-numa-topology4");
DO_TEST("fd-memory-no-numa-topology", QEMU_CAPS_KVM); DO_TEST_CAPS_LATEST("fd-memory-no-numa-topology");
DO_TEST_CAPS_LATEST("memfd-memory-numa"); DO_TEST_CAPS_LATEST("memfd-memory-numa");
DO_TEST_CAPS_LATEST("memfd-memory-default-hugepage"); DO_TEST_CAPS_LATEST("memfd-memory-default-hugepage");

View File

@ -1049,12 +1049,12 @@ mymain(void)
DO_TEST_CAPS_LATEST("virtio-options"); DO_TEST_CAPS_LATEST("virtio-options");
DO_TEST("fd-memory-numa-topology", QEMU_CAPS_KVM); DO_TEST_CAPS_LATEST("fd-memory-numa-topology");
DO_TEST("fd-memory-numa-topology2", QEMU_CAPS_KVM); DO_TEST_CAPS_LATEST("fd-memory-numa-topology2");
DO_TEST("fd-memory-numa-topology3", QEMU_CAPS_KVM); DO_TEST_CAPS_LATEST("fd-memory-numa-topology3");
DO_TEST_CAPS_LATEST("fd-memory-numa-topology4"); DO_TEST_CAPS_LATEST("fd-memory-numa-topology4");
DO_TEST("fd-memory-no-numa-topology", QEMU_CAPS_KVM); DO_TEST_CAPS_LATEST("fd-memory-no-numa-topology");
DO_TEST_CAPS_LATEST("memfd-memory-numa"); DO_TEST_CAPS_LATEST("memfd-memory-numa");
DO_TEST_CAPS_LATEST("memfd-memory-default-hugepage"); DO_TEST_CAPS_LATEST("memfd-memory-default-hugepage");