qemucapabilitiestest: Add support for '+hvf' variant

We need to signal to the capabilities code that HVF variant is used so
that it can behave as if it were running on OSX.

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:
Peter Krempa 2023-03-08 18:26:56 +01:00
parent 1f85c31bd8
commit 2bde68b6c5

View File

@ -44,11 +44,12 @@ struct _testQemuData {
int ret; int ret;
}; };
bool isHVF = false;
bool bool
virQEMUCapsProbeHVF(virQEMUCaps *qemuCaps G_GNUC_UNUSED) virQEMUCapsProbeHVF(virQEMUCaps *qemuCaps G_GNUC_UNUSED)
{ {
return false; return isHVF;
} }
@ -97,6 +98,8 @@ testQemuCaps(const void *opaque)
NULL))) NULL)))
return -1; return -1;
isHVF = STREQ(data->variant, "+hvf");
if (qemuProcessQMPInitMonitor(qemuMonitorTestGetMonitor(mon)) < 0) if (qemuProcessQMPInitMonitor(qemuMonitorTestGetMonitor(mon)) < 0)
return -1; return -1;