Convert the two negative cases to use real capapbilities as well as the
positive case for situations when KVM is not used by stripping the
QEMU_CAPS_KVM flag.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
...err => aarch64-gic-invalid.aarch64-latest.err} | 0
tests/qemuxml2argvdata/aarch64-gic-none-tcg.args | 6 ++++--
...rr => aarch64-gic-not-virt.aarch64-latest.err} | 0
tests/qemuxml2argvtest.c | 15 ++++++++-------
4 files changed, 12 insertions(+), 9 deletions(-)
rename tests/qemuxml2argvdata/{aarch64-gic-invalid.err =>
aarch64-gic-invalid.aarch64-latest.err} (100%)
rename tests/qemuxml2argvdata/{aarch64-gic-not-virt.err =>
aarch64-gic-not-virt.aarch64-latest.err} (100%)
diff --git a/tests/qemuxml2argvdata/aarch64-gic-invalid.err
b/tests/qemuxml2argvdata/aarch64-gic-invalid.aarch64-latest.err
similarity index 100%
rename from tests/qemuxml2argvdata/aarch64-gic-invalid.err
rename to tests/qemuxml2argvdata/aarch64-gic-invalid.aarch64-latest.err
diff --git a/tests/qemuxml2argvdata/aarch64-gic-none-tcg.args
b/tests/qemuxml2argvdata/aarch64-gic-none-tcg.args
index 16a02b74bd..029ef5230d 100644
--- a/tests/qemuxml2argvdata/aarch64-gic-none-tcg.args
+++ b/tests/qemuxml2argvdata/aarch64-gic-none-tcg.args
@@ -9,11 +9,12 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
/usr/bin/qemu-system-aarch64 \
-name guest=guest,debug-threads=on \
-S \
--object
secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-guest/master-key.aes
\
--machine virt,usb=off,gic-version=2,dump-guest-core=off \
+-object
'{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}'
\
+-machine virt,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram \
-accel tcg \
-cpu cortex-a57 \
-m 1024 \
+-object
'{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}'
\
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
-uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \
@@ -27,4 +28,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
-no-acpi \
-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/aarch64-gic-not-virt.err
b/tests/qemuxml2argvdata/aarch64-gic-not-virt.aarch64-latest.err
similarity index 100%
rename from tests/qemuxml2argvdata/aarch64-gic-not-virt.err
rename to tests/qemuxml2argvdata/aarch64-gic-not-virt.aarch64-latest.err
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 2498469dc9..61e5a93fdc 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -2406,8 +2406,12 @@ mymain(void)
DO_TEST_GIC("aarch64-gic-none-v2", GIC_V2);
DO_TEST_GIC("aarch64-gic-none-v3", GIC_V3);
DO_TEST_GIC("aarch64-gic-none-both", GIC_BOTH);
- qemuTestSetHostArch(&driver, VIR_ARCH_AARCH64);
- DO_TEST_FULL("aarch64-gic-none-tcg", "", ARG_GIC, GIC_BOTH,
ARG_END);
+ DO_TEST_FULL("aarch64-gic-none-tcg", "",
+ ARG_GIC, GIC_BOTH,
+ ARG_CAPS_ARCH, "aarch64",
+ ARG_CAPS_VER, "latest",
+ ARG_QEMU_CAPS_DEL, QEMU_CAPS_KVM, QEMU_CAPS_LAST,
+ ARG_END);
DO_TEST_FULL("aarch64-gic-default", ".aarch64-4.2.0",
ARG_GIC, GIC_NONE,
ARG_CAPS_ARCH, "aarch64",
@@ -2433,11 +2437,8 @@ mymain(void)
DO_TEST_GIC("aarch64-gic-host", GIC_V2);
DO_TEST_GIC("aarch64-gic-host", GIC_V3);
DO_TEST_GIC("aarch64-gic-host", GIC_BOTH);
- qemuTestSetHostArch(&driver, VIR_ARCH_AARCH64);
- DO_TEST_PARSE_ERROR("aarch64-gic-invalid",
- QEMU_CAPS_KVM);
- DO_TEST_PARSE_ERROR("aarch64-gic-not-virt",
- QEMU_CAPS_KVM);
+ DO_TEST_CAPS_ARCH_LATEST_PARSE_ERROR("aarch64-gic-invalid",
"aarch64");
+ DO_TEST_CAPS_ARCH_LATEST_PARSE_ERROR("aarch64-gic-not-virt",
"aarch64");
DO_TEST_CAPS_ARCH_LATEST_PARSE_ERROR("aarch64-gic-not-arm",
"ppc64");
DO_TEST_CAPS_ARCH_LATEST("aarch64-kvm-32-on-64", "aarch64");
DO_TEST("aarch64-pci-serial",
--
2.39.2