Re: [PATCH 12/24] domaincapstest: Add testing infrastructure for the '+hvf' variant

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 16, 2023 at 05:11:41PM +0100, Peter Krempa wrote:
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@xxxxxxxxxx>
---
tests/domaincapstest.c                | 74 +++++++++++++++++++--------
tests/qemucapabilitiesdata/README.rst |  6 ++-
2 files changed, 57 insertions(+), 23 deletions(-)

diff --git a/tests/domaincapstest.c b/tests/domaincapstest.c
index a34eb82015..21a68e03d2 100644
--- a/tests/domaincapstest.c
+++ b/tests/domaincapstest.c
@@ -275,6 +275,10 @@ doTestQemuInternal(const char *version,
        typestr = "";
        break;

+    case VIR_DOMAIN_VIRT_HVF:
+        typestr = "-hvf";
+        break;
+
    default:
        abort();
        break;
@@ -317,43 +321,69 @@ doTestQemu(const char *inputDir G_GNUC_UNUSED,
           const char *suffix G_GNUC_UNUSED,
           void *opaque)
{
+    bool hvf = false;
    int ret = 0;

    /* currently variant tests are not handled here */
-    if (STRNEQ(variant, ""))
-        return 0;
+    if (STRNEQ(variant, "")) {
+
+        if (STREQ(variant, "+hvf"))
+            hvf = true;
+        else
+            return 0;
+    }


No need for nesting or the extra empty line :P

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux