]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemucapabilitiestest: Add support for '+hvf' variant
authorPeter Krempa <pkrempa@redhat.com>
Wed, 8 Mar 2023 17:26:56 +0000 (18:26 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 3 Apr 2023 07:19:06 +0000 (09:19 +0200)
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>
tests/qemucapabilitiestest.c

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