mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-26 05:57:45 +03:00
domaincapstest: Add testing infrastructure for the '+hvf' variant
Allow testing of capabilities of OSX systems with the hvf accelerator. 'domaincapstest' requires special handling as we need to set VIR_DOMAIN_VIRT_HVF virt type in such case. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
ed93c15f82
commit
738c5bae88
@ -275,6 +275,10 @@ doTestQemuInternal(const char *version,
|
|||||||
typestr = "";
|
typestr = "";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case VIR_DOMAIN_VIRT_HVF:
|
||||||
|
typestr = "-hvf";
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
abort();
|
abort();
|
||||||
break;
|
break;
|
||||||
@ -317,43 +321,65 @@ doTestQemu(const char *inputDir G_GNUC_UNUSED,
|
|||||||
const char *suffix G_GNUC_UNUSED,
|
const char *suffix G_GNUC_UNUSED,
|
||||||
void *opaque)
|
void *opaque)
|
||||||
{
|
{
|
||||||
|
bool hvf = false;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
/* currently variant tests are not handled here */
|
if (STREQ(variant, "+hvf"))
|
||||||
if (STRNEQ(variant, ""))
|
hvf = true;
|
||||||
|
else if (STREQ(variant, ""))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (STREQ(arch, "x86_64")) {
|
if (STREQ(arch, "x86_64")) {
|
||||||
/* For x86_64 we test three combinations:
|
/* For x86_64 based on the test variant we test:
|
||||||
|
*
|
||||||
|
* '' (default) variant (KVM):
|
||||||
|
* - KVM with default machine
|
||||||
|
* - KVM with Q35 machine
|
||||||
|
* '+hvf' variant:
|
||||||
|
* - hvf with default machine
|
||||||
*
|
*
|
||||||
* - KVM with default machine
|
|
||||||
* - KVM with Q35 machine
|
|
||||||
* - TCG with default machine
|
* - TCG with default machine
|
||||||
*/
|
*/
|
||||||
if (doTestQemuInternal(version, NULL, arch, variant,
|
if (hvf) {
|
||||||
VIR_DOMAIN_VIRT_KVM, opaque) < 0)
|
if (doTestQemuInternal(version, NULL, arch, variant,
|
||||||
ret = -1;
|
VIR_DOMAIN_VIRT_HVF, opaque) < 0)
|
||||||
|
ret = -1;
|
||||||
|
} else {
|
||||||
|
if (doTestQemuInternal(version, NULL, arch, variant,
|
||||||
|
VIR_DOMAIN_VIRT_KVM, opaque) < 0)
|
||||||
|
ret = -1;
|
||||||
|
|
||||||
if (doTestQemuInternal(version, "q35", arch, variant,
|
if (doTestQemuInternal(version, "q35", arch, variant,
|
||||||
VIR_DOMAIN_VIRT_KVM, opaque) < 0)
|
VIR_DOMAIN_VIRT_KVM, opaque) < 0)
|
||||||
ret = -1;
|
ret = -1;
|
||||||
|
}
|
||||||
|
|
||||||
if (doTestQemuInternal(version, NULL, arch, variant,
|
if (doTestQemuInternal(version, NULL, arch, variant,
|
||||||
VIR_DOMAIN_VIRT_QEMU, opaque) < 0)
|
VIR_DOMAIN_VIRT_QEMU, opaque) < 0)
|
||||||
ret = -1;
|
ret = -1;
|
||||||
} else if (STREQ(arch, "aarch64")) {
|
} else if (STREQ(arch, "aarch64")) {
|
||||||
/* For aarch64 we test two combinations:
|
/* For aarch64 based on the test variant we test:
|
||||||
*
|
*
|
||||||
* - KVM with default machine
|
* '' (default) variant (KVM):
|
||||||
* - KVM with virt machine
|
* - KVM with default machine
|
||||||
|
* - KVM with virt machine
|
||||||
|
*
|
||||||
|
* '+hvf' variant:
|
||||||
|
* - hvf with default machine
|
||||||
*/
|
*/
|
||||||
if (doTestQemuInternal(version, NULL, arch, variant,
|
if (hvf) {
|
||||||
VIR_DOMAIN_VIRT_KVM, opaque) < 0)
|
if (doTestQemuInternal(version, NULL, arch, variant,
|
||||||
ret = -1;
|
VIR_DOMAIN_VIRT_HVF, opaque) < 0)
|
||||||
|
ret = -1;
|
||||||
|
} else {
|
||||||
|
if (doTestQemuInternal(version, NULL, arch, variant,
|
||||||
|
VIR_DOMAIN_VIRT_KVM, opaque) < 0)
|
||||||
|
ret = -1;
|
||||||
|
|
||||||
if (doTestQemuInternal(version, "virt", arch, variant,
|
if (doTestQemuInternal(version, "virt", arch, variant,
|
||||||
VIR_DOMAIN_VIRT_KVM, opaque) < 0)
|
VIR_DOMAIN_VIRT_KVM, opaque) < 0)
|
||||||
ret = -1;
|
ret = -1;
|
||||||
|
}
|
||||||
} else if (STRPREFIX(arch, "riscv")) {
|
} else if (STRPREFIX(arch, "riscv")) {
|
||||||
/* For riscv64 we test two combinations:
|
/* For riscv64 we test two combinations:
|
||||||
*
|
*
|
||||||
|
@ -52,7 +52,11 @@ or::
|
|||||||
Known test variants
|
Known test variants
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
This section will contain a list of variants that are used in the test suite.
|
``+hvf``
|
||||||
|
|
||||||
|
Variant of the test data using the Apple OSX Hypervisor Framework acceleration
|
||||||
|
for qemu.
|
||||||
|
|
||||||
|
|
||||||
Usage in tests
|
Usage in tests
|
||||||
==============
|
==============
|
||||||
|
Loading…
x
Reference in New Issue
Block a user