]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuxml2argvtest: Modernize migration/restore tests
authorPeter Krempa <pkrempa@redhat.com>
Fri, 1 Sep 2023 12:17:45 +0000 (14:17 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 6 Sep 2023 12:09:45 +0000 (14:09 +0200)
As these were using DO_TEST_FULL the churn-reducing patches didn't
influence these.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/qemuxml2argvdata/migrate-numa-unaligned.x86_64-latest.args [moved from tests/qemuxml2argvdata/migrate-numa-unaligned.args with 58% similarity]
tests/qemuxml2argvdata/migrate.x86_64-latest.args [moved from tests/qemuxml2argvdata/migrate.args with 70% similarity]
tests/qemuxml2argvdata/restore-v2-fd.x86_64-latest.args [moved from tests/qemuxml2argvdata/restore-v2-fd.args with 66% similarity]
tests/qemuxml2argvdata/restore-v2.x86_64-latest.args [moved from tests/qemuxml2argvdata/restore-v2.args with 70% similarity]
tests/qemuxml2argvtest.c

similarity index 58%
rename from tests/qemuxml2argvdata/migrate-numa-unaligned.args
rename to tests/qemuxml2argvdata/migrate-numa-unaligned.x86_64-latest.args
index 76e1dfedde2293ab561b2803d4f518eae0d12339..434753d96da8810172422e6c57f7fdbf60efb4e7 100644 (file)
@@ -9,18 +9,18 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest/.config \
 /usr/bin/qemu-system-x86_64 \
 -name guest=QEMUGuest,debug-threads=on \
 -S \
--object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-QEMUGuest/master-key.aes \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest/master-key.aes"}' \
 -machine pc,usb=off,dump-guest-core=off,acpi=off \
 -accel tcg \
 -cpu qemu64 \
 -m size=14682112k \
 -overcommit mem-lock=off \
 -smp 32,sockets=32,cores=1,threads=1 \
--object memory-backend-ram,id=ram-node0,size=20482048,host-nodes=3,policy=preferred \
+-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":20482048,"host-nodes":[3],"policy":"preferred"}' \
 -numa node,nodeid=0,cpus=0,memdev=ram-node0 \
--object memory-backend-ram,id=ram-node1,size=675907584,host-nodes=0-3,policy=bind \
+-object '{"qom-type":"memory-backend-ram","id":"ram-node1","size":675907584,"host-nodes":[0,1,2,3],"policy":"bind"}' \
 -numa node,nodeid=1,cpus=1-27,cpus=29,memdev=ram-node1 \
--object memory-backend-ram,id=ram-node2,size=24578457600,host-nodes=0,host-nodes=2,policy=bind \
+-object '{"qom-type":"memory-backend-ram","id":"ram-node2","size":24578457600,"host-nodes":[0,2],"policy":"bind"}' \
 -numa node,nodeid=2,cpus=28,cpus=30-31,memdev=ram-node2 \
 -uuid 9f4b6512-e73a-4a25-93e8-5307802821ce \
 -display none \
@@ -31,8 +31,9 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest/.config \
 -rtc base=utc \
 -no-shutdown \
 -boot strict=on \
--usb \
+-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \
 -audiodev '{"id":"audio1","driver":"none"}' \
 -incoming fd:7 \
--device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
+-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}' \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
 -msg timestamp=on
similarity index 70%
rename from tests/qemuxml2argvdata/migrate.args
rename to tests/qemuxml2argvdata/migrate.x86_64-latest.args
index 55f528a7d940304e3d0001bc176ec66e510a2a9b..7cbd26463a506605bba20ce498cba47ebe2dffac 100644 (file)
@@ -9,12 +9,12 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
 /usr/bin/qemu-system-x86_64 \
 -name guest=QEMUGuest1,debug-threads=on \
 -S \
--object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \
 -machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \
 -accel tcg \
 -cpu qemu64 \
 -m size=219136k \
--object memory-backend-ram,id=pc.ram,size=224395264 \
+-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \
 -overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
@@ -26,10 +26,11 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
 -rtc base=utc \
 -no-shutdown \
 -boot strict=on \
--usb \
+-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \
 -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
 -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
--device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \
+-device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \
 -audiodev '{"id":"audio1","driver":"none"}' \
 -incoming tcp:10.0.0.1:5000 \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
 -msg timestamp=on
similarity index 66%
rename from tests/qemuxml2argvdata/restore-v2-fd.args
rename to tests/qemuxml2argvdata/restore-v2-fd.x86_64-latest.args
index 060a6cfafbe9ba3a1221549568772fdbd2f18b78..e5e2b50b756e29ba0f037b517a2befd5c1711231 100644 (file)
@@ -9,12 +9,12 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
 /usr/bin/qemu-system-x86_64 \
 -name guest=QEMUGuest1,debug-threads=on \
 -S \
--object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \
 -machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \
 -accel tcg \
 -cpu qemu64 \
 -m size=219136k \
--object memory-backend-ram,id=pc.ram,size=224395264 \
+-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \
 -overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
@@ -26,11 +26,12 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
 -rtc base=utc \
 -no-shutdown \
 -boot strict=on \
--usb \
+-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \
 -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
 -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
--device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \
+-device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \
 -audiodev '{"id":"audio1","driver":"none"}' \
 -incoming fd:7 \
--device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
+-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}' \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
 -msg timestamp=on
similarity index 70%
rename from tests/qemuxml2argvdata/restore-v2.args
rename to tests/qemuxml2argvdata/restore-v2.x86_64-latest.args
index 2acb08e1e381d5b7a55ddcfcb146e6c278f43152..d130a941579160f11562718a41810f08b0939961 100644 (file)
@@ -9,12 +9,12 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
 /usr/bin/qemu-system-x86_64 \
 -name guest=QEMUGuest1,debug-threads=on \
 -S \
--object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \
 -machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \
 -accel tcg \
 -cpu qemu64 \
 -m size=219136k \
--object memory-backend-ram,id=pc.ram,size=224395264 \
+-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \
 -overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
@@ -26,10 +26,11 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
 -rtc base=utc \
 -no-shutdown \
 -boot strict=on \
--usb \
+-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \
 -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
 -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
--device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \
+-device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \
 -audiodev '{"id":"audio1","driver":"none"}' \
 -incoming exec:cat \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
 -msg timestamp=on
index bfb116e45d23215e19c05daf56894b7f11491608..ec06a734a1b945c4a2ce7546f371ef7030767ec6 100644 (file)
@@ -1704,26 +1704,20 @@ mymain(void)
     DO_TEST_CAPS_ARCH_LATEST("hostdev-subsys-mdev-vfio-ap", "s390x");
     DO_TEST_CAPS_ARCH_LATEST_PARSE_ERROR("hostdev-subsys-mdev-vfio-ap-boot-fail", "s390x");
 
-    DO_TEST_FULL("restore-v2", "",
-                 ARG_MIGRATE_FROM, "exec:cat",
-                 ARG_MIGRATE_FD, 7,
-                 ARG_END);
-    DO_TEST_FULL("restore-v2-fd", "",
-                 ARG_MIGRATE_FROM, "stdio",
-                 ARG_MIGRATE_FD, 7,
-                 ARG_END);
-    DO_TEST_FULL("restore-v2-fd", "",
-                 ARG_MIGRATE_FROM, "fd:7",
-                 ARG_MIGRATE_FD, 7, ARG_END);
-    DO_TEST_FULL("migrate", "",
-                 ARG_MIGRATE_FROM, "tcp:10.0.0.1:5000", ARG_END);
-
-    DO_TEST_FULL("migrate-numa-unaligned", "",
-                 ARG_MIGRATE_FROM, "stdio",
-                 ARG_MIGRATE_FD, 7,
-                 ARG_QEMU_CAPS,
-                 QEMU_CAPS_LAST,
-                 ARG_END);
+    DO_TEST_CAPS_ARCH_LATEST_FULL("restore-v2", "x86_64",
+                                  ARG_MIGRATE_FROM, "exec:cat",
+                                  ARG_MIGRATE_FD, 7);
+    DO_TEST_CAPS_ARCH_LATEST_FULL("restore-v2-fd", "x86_64",
+                                  ARG_MIGRATE_FROM, "stdio",
+                                  ARG_MIGRATE_FD, 7);
+    DO_TEST_CAPS_ARCH_LATEST_FULL("restore-v2-fd", "x86_64",
+                                  ARG_MIGRATE_FROM, "fd:7",
+                                  ARG_MIGRATE_FD, 7);
+    DO_TEST_CAPS_ARCH_LATEST_FULL("migrate", "x86_64",
+                                  ARG_MIGRATE_FROM, "tcp:10.0.0.1:5000");
+    DO_TEST_CAPS_ARCH_LATEST_FULL("migrate-numa-unaligned", "x86_64",
+                                  ARG_MIGRATE_FROM, "stdio",
+                                  ARG_MIGRATE_FD, 7);
 
     DO_TEST_CAPS_LATEST("qemu-ns");
     DO_TEST_NOCAPS("qemu-ns-no-env");