]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuxml2argvdata: Convert test cases for 'ppc' architecture to latest caps
authorPeter Krempa <pkrempa@redhat.com>
Fri, 3 Mar 2023 13:17:06 +0000 (14:17 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 6 Mar 2023 19:55:50 +0000 (20:55 +0100)
Convert the 'ppc-dtb' and 'ppce500-serial' to use real capabilities
albeit captured from a non-native machine. Thus the XML needs to be
converted to use virt type 'qemu'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/qemuxml2argvdata/ppc-dtb.ppc-latest.args [moved from tests/qemuxml2argvdata/ppc-dtb.args with 63% similarity]
tests/qemuxml2argvdata/ppc-dtb.xml
tests/qemuxml2argvdata/ppce500-serial.ppc-latest.args [moved from tests/qemuxml2argvdata/ppce500-serial.args with 62% similarity]
tests/qemuxml2argvdata/ppce500-serial.xml
tests/qemuxml2argvtest.c

similarity index 63%
rename from tests/qemuxml2argvdata/ppc-dtb.args
rename to tests/qemuxml2argvdata/ppc-dtb.ppc-latest.args
index 3f63febd42e50c93207c629ea0cb1c57054c3b32..217406aa28cce360e9ec351f80a03746a7e8bda1 100644 (file)
@@ -9,10 +9,11 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
 /usr/bin/qemu-system-ppc \
 -name guest=QEMUGuest1,debug-threads=on \
 -S \
--object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes \
--machine ppce500,usb=off,dump-guest-core=off \
--accel kvm \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \
+-machine ppce500,usb=off,dump-guest-core=off,memory-backend=mpc8544ds.ram \
+-accel tcg \
 -m 256 \
+-object '{"qom-type":"memory-backend-ram","id":"mpc8544ds.ram","size":268435456}' \
 -overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid 49545eb3-75e1-2d0a-acdd-f0294406c99e \
@@ -28,9 +29,10 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
 -initrd /media/ram/ramdisk \
 -append 'root=/dev/ram rw console=ttyS0,115200' \
 -dtb /media/ram/test.dtb \
--usb \
+-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1"}' \
 -chardev pty,id=charserial0 \
 -serial chardev:charserial0 \
 -audiodev '{"id":"audio1","driver":"none"}' \
--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
index 04f0eb6624dff183b760047962114e76820cba8c..37b9b280e757bbb8c1ad49a049e8260ae5c0c261 100644 (file)
@@ -1,4 +1,4 @@
-<domain type='kvm'>
+<domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>49545eb3-75e1-2d0a-acdd-f0294406c99e</uuid>
   <memory unit='KiB'>262144</memory>
similarity index 62%
rename from tests/qemuxml2argvdata/ppce500-serial.args
rename to tests/qemuxml2argvdata/ppce500-serial.ppc-latest.args
index 4418c1f3d8e7fe713dc37b434dee875a9d11c26d..b51e915a1a477f3fe3cdf7d2f007eb19c6750a57 100644 (file)
@@ -9,10 +9,11 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
 /usr/bin/qemu-system-ppc \
 -name guest=QEMUGuest1,debug-threads=on \
 -S \
--object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes \
--machine ppce500,usb=off,dump-guest-core=off \
--accel kvm \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \
+-machine ppce500,usb=off,dump-guest-core=off,memory-backend=mpc8544ds.ram \
+-accel tcg \
 -m 256 \
+-object '{"qom-type":"memory-backend-ram","id":"mpc8544ds.ram","size":268435456}' \
 -overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
@@ -27,9 +28,10 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
 -kernel /media/ram/uImage \
 -initrd /media/ram/ramdisk \
 -append 'root=/dev/ram rw console=ttyS0,115200' \
--usb \
+-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1"}' \
 -chardev pty,id=charserial0 \
 -serial chardev:charserial0 \
 -audiodev '{"id":"audio1","driver":"none"}' \
--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
index 4e656d5ffe182cd021efd52cb0a52edd8b9bab0e..20a3b1e7a8d032c582b7aceef569648afa3c5ddd 100644 (file)
@@ -1,4 +1,4 @@
-<domain type='kvm'>
+<domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
   <memory unit='KiB'>262144</memory>
index d13b43df844f1bb8e9c9604ca3ff7728536824de..89ec07c548bae72fbbbf38e04c9aeea8a99c570b 100644 (file)
@@ -2179,10 +2179,8 @@ mymain(void)
     DO_TEST("s390-serial-console",
             QEMU_CAPS_DEVICE_SCLPCONSOLE);
 
-    DO_TEST("ppc-dtb",
-            QEMU_CAPS_KVM);
-    DO_TEST("ppce500-serial",
-            QEMU_CAPS_KVM);
+    DO_TEST_CAPS_ARCH_LATEST("ppc-dtb", "ppc");
+    DO_TEST_CAPS_ARCH_LATEST("ppce500-serial", "ppc");
 
     DO_TEST_CAPS_LATEST("tpm-passthrough");
     DO_TEST_CAPS_LATEST("tpm-passthrough-crb");