Use real capabilities for the CPU test. The negative test case for QEMUs without QEMU_CAPS_QUERY_CPU_MODEL_EXPANSION is removed as the feature is now supported by all supported qemu versions. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- tests/qemuxml2argvdata/cpu-s390-features.err | 1 - ...0-features.args => cpu-s390-features.s390x-latest.args} | 6 ++++-- ...pu-s390-zEC12.args => cpu-s390-zEC12.s390x-latest.args} | 6 ++++-- tests/qemuxml2argvtest.c | 7 ++----- 4 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 tests/qemuxml2argvdata/cpu-s390-features.err rename tests/qemuxml2argvdata/{cpu-s390-features.args => cpu-s390-features.s390x-latest.args} (68%) rename tests/qemuxml2argvdata/{cpu-s390-zEC12.args => cpu-s390-zEC12.s390x-latest.args} (67%) diff --git a/tests/qemuxml2argvdata/cpu-s390-features.err b/tests/qemuxml2argvdata/cpu-s390-features.err deleted file mode 100644 index 5f078fc8e1..0000000000 --- a/tests/qemuxml2argvdata/cpu-s390-features.err +++ /dev/null @@ -1 +0,0 @@ -internal error: CPU features not supported by hypervisor for s390x architecture diff --git a/tests/qemuxml2argvdata/cpu-s390-features.args b/tests/qemuxml2argvdata/cpu-s390-features.s390x-latest.args similarity index 68% rename from tests/qemuxml2argvdata/cpu-s390-features.args rename to tests/qemuxml2argvdata/cpu-s390-features.s390x-latest.args index 69e705e895..d6c1d6e278 100644 --- a/tests/qemuxml2argvdata/cpu-s390-features.args +++ b/tests/qemuxml2argvdata/cpu-s390-features.s390x-latest.args @@ -9,11 +9,12 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest1/.config \ /usr/bin/qemu-system-s390x \ -name guest=guest1,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-guest1/master-key.aes \ --machine s390-ccw-virtio,usb=off,dump-guest-core=off \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest1/master-key.aes"}' \ +-machine s390-ccw-virtio,usb=off,dump-guest-core=off,memory-backend=s390.ram \ -accel kvm \ -cpu zEC12,dfppc=on,stckf=off \ -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 \ @@ -26,4 +27,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest1/.config \ -no-shutdown \ -boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/cpu-s390-zEC12.args b/tests/qemuxml2argvdata/cpu-s390-zEC12.s390x-latest.args similarity index 67% rename from tests/qemuxml2argvdata/cpu-s390-zEC12.args rename to tests/qemuxml2argvdata/cpu-s390-zEC12.s390x-latest.args index 1a33d6bcca..8ad4fd90ce 100644 --- a/tests/qemuxml2argvdata/cpu-s390-zEC12.args +++ b/tests/qemuxml2argvdata/cpu-s390-zEC12.s390x-latest.args @@ -9,11 +9,12 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest1/.config \ /usr/bin/qemu-system-s390x \ -name guest=guest1,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-guest1/master-key.aes \ --machine s390-ccw-virtio,usb=off,dump-guest-core=off \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest1/master-key.aes"}' \ +-machine s390-ccw-virtio,usb=off,dump-guest-core=off,memory-backend=s390.ram \ -accel kvm \ -cpu zEC12 \ -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 \ @@ -26,4 +27,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest1/.config \ -no-shutdown \ -boot strict=on \ -audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 9fcd0314b6..68772d12ab 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1871,11 +1871,8 @@ mymain(void) DO_TEST("cpu-host-passthrough", QEMU_CAPS_KVM); DO_TEST_FAILURE("cpu-qemu-host-passthrough", QEMU_CAPS_KVM); - qemuTestSetHostArch(&driver, VIR_ARCH_S390X); - DO_TEST("cpu-s390-zEC12", QEMU_CAPS_KVM); - DO_TEST("cpu-s390-features", QEMU_CAPS_KVM, QEMU_CAPS_QUERY_CPU_MODEL_EXPANSION); - DO_TEST_FAILURE("cpu-s390-features", QEMU_CAPS_KVM); - qemuTestSetHostArch(&driver, VIR_ARCH_NONE); + DO_TEST_CAPS_ARCH_LATEST("cpu-s390-zEC12", "s390x"); + DO_TEST_CAPS_ARCH_LATEST("cpu-s390-features", "s390x"); qemuTestSetHostCPU(&driver, driver.hostarch, qemuTestGetCPUDef(QEMU_CPU_DEF_HASWELL)); DO_TEST("cpu-Haswell", QEMU_CAPS_KVM); -- 2.39.2