]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
tests: qemuxml2argvdata: switch zpci address generation to real caps
authorJán Tomko <jtomko@redhat.com>
Fri, 30 Sep 2022 14:02:23 +0000 (16:02 +0200)
committerJán Tomko <jtomko@redhat.com>
Mon, 3 Oct 2022 17:46:42 +0000 (19:46 +0200)
Among the usual changes, this puts the virtio memballoon on the CCW bus.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tests/qemuxml2argvdata/hostdev-vfio-zpci-autogenerate-fids.s390x-latest.args [moved from tests/qemuxml2argvdata/hostdev-vfio-zpci-autogenerate-fids.args with 69% similarity]
tests/qemuxml2argvdata/hostdev-vfio-zpci-autogenerate-uids.s390x-latest.args [moved from tests/qemuxml2argvdata/hostdev-vfio-zpci-autogenerate-uids.args with 69% similarity]
tests/qemuxml2argvdata/hostdev-vfio-zpci-autogenerate.s390x-latest.args [moved from tests/qemuxml2argvdata/hostdev-vfio-zpci-autogenerate.args with 66% similarity]
tests/qemuxml2argvdata/hostdev-vfio-zpci-invalid-uid-valid-fid.s390x-latest.err [moved from tests/qemuxml2argvdata/hostdev-vfio-zpci-invalid-uid-valid-fid.err with 100% similarity]
tests/qemuxml2argvdata/hostdev-vfio-zpci-multidomain-many.s390x-latest.args [moved from tests/qemuxml2argvdata/hostdev-vfio-zpci-multidomain-many.args with 79% similarity]
tests/qemuxml2argvtest.c

similarity index 69%
rename from tests/qemuxml2argvdata/hostdev-vfio-zpci-autogenerate-fids.args
rename to tests/qemuxml2argvdata/hostdev-vfio-zpci-autogenerate-fids.s390x-latest.args
index 0b9cca797dda0b4338ff792b2baa4ba6582f52e7..91ddb8b54f64a73b0d46991876f81a98f7d5af89 100644 (file)
@@ -9,10 +9,12 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 /usr/bin/qemu-system-s390x \
 -name guest=QEMUGuest1,debug-threads=on \
 -S \
--object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
--machine s390-ccw-virtio,usb=off,dump-guest-core=off \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \
+-machine s390-ccw-virtio,usb=off,dump-guest-core=off,memory-backend=s390.ram \
 -accel tcg \
+-cpu qemu \
 -m 214 \
+-object '{"qom-type":"memory-backend-ram","id":"s390.ram","size":224395264}' \
 -overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
@@ -29,6 +31,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 -device vfio-pci,host=0000:00:00.0,id=hostdev0,bus=pci.0,addr=0x1 \
 -device zpci,uid=5,fid=1,target=hostdev1,id=zpci5 \
 -device vfio-pci,host=0001:00:00.0,id=hostdev1,bus=pci.0,addr=0x2 \
--device zpci,uid=2,fid=2,target=balloon0,id=zpci2 \
--device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
+-device virtio-balloon-ccw,id=balloon0,devno=fe.0.0000 \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
 -msg timestamp=on
similarity index 69%
rename from tests/qemuxml2argvdata/hostdev-vfio-zpci-autogenerate-uids.args
rename to tests/qemuxml2argvdata/hostdev-vfio-zpci-autogenerate-uids.s390x-latest.args
index da7a6843948724b312faa091de40f977845cab70..f675780af6382cef4b815eac5e164021f28695b8 100644 (file)
@@ -9,10 +9,12 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 /usr/bin/qemu-system-s390x \
 -name guest=QEMUGuest1,debug-threads=on \
 -S \
--object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
--machine s390-ccw-virtio,usb=off,dump-guest-core=off \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \
+-machine s390-ccw-virtio,usb=off,dump-guest-core=off,memory-backend=s390.ram \
 -accel tcg \
+-cpu qemu \
 -m 214 \
+-object '{"qom-type":"memory-backend-ram","id":"s390.ram","size":224395264}' \
 -overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
@@ -29,6 +31,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 -device vfio-pci,host=0000:00:00.0,id=hostdev0,bus=pci.0,addr=0x1 \
 -device zpci,uid=2,fid=31,target=hostdev1,id=zpci2 \
 -device vfio-pci,host=0000:00:01.0,id=hostdev1,bus=pci.0,addr=0x2 \
--device zpci,uid=3,fid=1,target=balloon0,id=zpci3 \
--device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
+-device virtio-balloon-ccw,id=balloon0,devno=fe.0.0000 \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
 -msg timestamp=on
similarity index 66%
rename from tests/qemuxml2argvdata/hostdev-vfio-zpci-autogenerate.args
rename to tests/qemuxml2argvdata/hostdev-vfio-zpci-autogenerate.s390x-latest.args
index 44c74168810d18e4c7f3a4625ac2e3a1e60f45c0..4b255a3a00465fe795004b11f06a145a40f5e107 100644 (file)
@@ -9,10 +9,12 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 /usr/bin/qemu-system-s390x \
 -name guest=QEMUGuest1,debug-threads=on \
 -S \
--object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
--machine s390-ccw-virtio,usb=off,dump-guest-core=off \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \
+-machine s390-ccw-virtio,usb=off,dump-guest-core=off,memory-backend=s390.ram \
 -accel tcg \
+-cpu qemu \
 -m 214 \
+-object '{"qom-type":"memory-backend-ram","id":"s390.ram","size":224395264}' \
 -overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
@@ -27,6 +29,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 -audiodev '{"id":"audio1","driver":"none"}' \
 -device zpci,uid=1,fid=0,target=hostdev0,id=zpci1 \
 -device vfio-pci,host=0000:00:00.0,id=hostdev0,bus=pci.0,addr=0x1 \
--device zpci,uid=2,fid=1,target=balloon0,id=zpci2 \
--device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
+-device virtio-balloon-ccw,id=balloon0,devno=fe.0.0000 \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
 -msg timestamp=on
similarity index 79%
rename from tests/qemuxml2argvdata/hostdev-vfio-zpci-multidomain-many.args
rename to tests/qemuxml2argvdata/hostdev-vfio-zpci-multidomain-many.s390x-latest.args
index 8761df3267bcecb6b0012c598c9398352ad4a10f..df28472055d507f911dfc4873cb7fe2c86804c48 100644 (file)
@@ -9,10 +9,12 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 /usr/bin/qemu-system-s390x \
 -name guest=QEMUGuest1,debug-threads=on \
 -S \
--object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
--machine s390-ccw-virtio,usb=off,dump-guest-core=off \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \
+-machine s390-ccw-virtio,usb=off,dump-guest-core=off,memory-backend=s390.ram \
 -accel tcg \
+-cpu qemu \
 -m 214 \
+-object '{"qom-type":"memory-backend-ram","id":"s390.ram","size":224395264}' \
 -overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
@@ -41,6 +43,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 -device vfio-pci,host=0007:00:00.0,id=hostdev6,bus=pci.0,addr=0x4 \
 -device zpci,uid=4,fid=40,target=hostdev7,id=zpci4 \
 -device vfio-pci,host=0008:00:00.0,id=hostdev7,bus=pci.0,addr=0x6 \
--device zpci,uid=5,fid=4,target=balloon0,id=zpci5 \
--device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x8 \
+-device virtio-balloon-ccw,id=balloon0,devno=fe.0.0000 \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
 -msg timestamp=on
index c8b69bbd7a7173e3e9712014d14e033445756cb7..52922f48a61f2ba7d6279c591bccdb6b54dbb96d 100644 (file)
@@ -1875,22 +1875,11 @@ mymain(void)
             QEMU_CAPS_DEVICE_ZPCI);
     DO_TEST_PARSE_ERROR("hostdev-vfio-zpci-autogenerate-fids",
                         QEMU_CAPS_DEVICE_VFIO_PCI);
-    DO_TEST_PARSE_ERROR("hostdev-vfio-zpci-invalid-uid-valid-fid",
-                        QEMU_CAPS_DEVICE_VFIO_PCI,
-                        QEMU_CAPS_DEVICE_ZPCI);
-    DO_TEST("hostdev-vfio-zpci-multidomain-many",
-            QEMU_CAPS_DEVICE_VFIO_PCI,
-            QEMU_CAPS_DEVICE_PCI_BRIDGE,
-            QEMU_CAPS_DEVICE_ZPCI);
-    DO_TEST("hostdev-vfio-zpci-autogenerate",
-            QEMU_CAPS_DEVICE_VFIO_PCI,
-            QEMU_CAPS_DEVICE_ZPCI);
-    DO_TEST("hostdev-vfio-zpci-autogenerate-uids",
-            QEMU_CAPS_DEVICE_VFIO_PCI,
-            QEMU_CAPS_DEVICE_ZPCI);
-    DO_TEST("hostdev-vfio-zpci-autogenerate-fids",
-            QEMU_CAPS_DEVICE_VFIO_PCI,
-            QEMU_CAPS_DEVICE_ZPCI);
+    DO_TEST_CAPS_ARCH_LATEST_PARSE_ERROR("hostdev-vfio-zpci-invalid-uid-valid-fid", "s390x");
+    DO_TEST_CAPS_ARCH_LATEST("hostdev-vfio-zpci-multidomain-many", "s390x");
+    DO_TEST_CAPS_ARCH_LATEST("hostdev-vfio-zpci-autogenerate", "s390x");
+    DO_TEST_CAPS_ARCH_LATEST("hostdev-vfio-zpci-autogenerate-uids", "s390x");
+    DO_TEST_CAPS_ARCH_LATEST("hostdev-vfio-zpci-autogenerate-fids", "s390x");
     DO_TEST_PARSE_ERROR("hostdev-vfio-zpci-uid-set-zero",
                         QEMU_CAPS_DEVICE_VFIO_PCI,
                         QEMU_CAPS_DEVICE_ZPCI);