[PATCH 36/51] qemuxml2argvtest: Modernize migration/restore tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As these were using DO_TEST_FULL the churn-reducing patches didn't
influence these.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 ...migrate-numa-unaligned.x86_64-latest.args} | 13 +++----
 ...igrate.args => migrate.x86_64-latest.args} |  9 ++---
 ....args => restore-v2-fd.x86_64-latest.args} | 11 +++---
 ...-v2.args => restore-v2.x86_64-latest.args} |  9 ++---
 tests/qemuxml2argvtest.c                      | 34 ++++++++-----------
 5 files changed, 37 insertions(+), 39 deletions(-)
 rename tests/qemuxml2argvdata/{migrate-numa-unaligned.args => migrate-numa-unaligned.x86_64-latest.args} (58%)
 rename tests/qemuxml2argvdata/{migrate.args => migrate.x86_64-latest.args} (70%)
 rename tests/qemuxml2argvdata/{restore-v2-fd.args => restore-v2-fd.x86_64-latest.args} (66%)
 rename tests/qemuxml2argvdata/{restore-v2.args => restore-v2.x86_64-latest.args} (70%)

diff --git a/tests/qemuxml2argvdata/migrate-numa-unaligned.args b/tests/qemuxml2argvdata/migrate-numa-unaligned.x86_64-latest.args
similarity index 58%
rename from tests/qemuxml2argvdata/migrate-numa-unaligned.args
rename to tests/qemuxml2argvdata/migrate-numa-unaligned.x86_64-latest.args
index 76e1dfedde..434753d96d 100644
--- a/tests/qemuxml2argvdata/migrate-numa-unaligned.args
+++ b/tests/qemuxml2argvdata/migrate-numa-unaligned.x86_64-latest.args
@@ -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
diff --git a/tests/qemuxml2argvdata/migrate.args b/tests/qemuxml2argvdata/migrate.x86_64-latest.args
similarity index 70%
rename from tests/qemuxml2argvdata/migrate.args
rename to tests/qemuxml2argvdata/migrate.x86_64-latest.args
index 55f528a7d9..7cbd26463a 100644
--- a/tests/qemuxml2argvdata/migrate.args
+++ b/tests/qemuxml2argvdata/migrate.x86_64-latest.args
@@ -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
diff --git a/tests/qemuxml2argvdata/restore-v2-fd.args b/tests/qemuxml2argvdata/restore-v2-fd.x86_64-latest.args
similarity index 66%
rename from tests/qemuxml2argvdata/restore-v2-fd.args
rename to tests/qemuxml2argvdata/restore-v2-fd.x86_64-latest.args
index 060a6cfafb..e5e2b50b75 100644
--- a/tests/qemuxml2argvdata/restore-v2-fd.args
+++ b/tests/qemuxml2argvdata/restore-v2-fd.x86_64-latest.args
@@ -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
diff --git a/tests/qemuxml2argvdata/restore-v2.args b/tests/qemuxml2argvdata/restore-v2.x86_64-latest.args
similarity index 70%
rename from tests/qemuxml2argvdata/restore-v2.args
rename to tests/qemuxml2argvdata/restore-v2.x86_64-latest.args
index 2acb08e1e3..d130a94157 100644
--- a/tests/qemuxml2argvdata/restore-v2.args
+++ b/tests/qemuxml2argvdata/restore-v2.x86_64-latest.args
@@ -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
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index bfb116e45d..ec06a734a1 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -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");
-- 
2.41.0




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux