]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
domaincapstest: Allow tests of all capability variants
authorPeter Krempa <pkrempa@redhat.com>
Tue, 4 Mar 2025 08:41:02 +0000 (09:41 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 6 Mar 2025 12:04:25 +0000 (13:04 +0100)
Currently only the default variant ("") and "+hvf" are present in our
test data but upcoming patches will add another variant.

Upcoming test variants may not require any special handling so we should
be able to handle them using the default code path now that 'variant' is
properly propagated inside the test code.

Remove the restriction to test only the default ("") and "+hvf" variant
and modify the documentation to state that any other variant is tested
the same way as the default one.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
tests/domaincapstest.c

index 51fec0558fb4feaa3dadb936ea24476baf7843d2..96dc029af37a53189893cbd1df168a6a45255d70 100644 (file)
@@ -328,13 +328,11 @@ doTestQemu(const char *inputDir G_GNUC_UNUSED,
 
     if (STREQ(variant, "+hvf"))
         hvf = true;
-    else if (STRNEQ(variant, ""))
-        return 0;
 
     if (STREQ(arch, "x86_64")) {
         /* For x86_64 based on the test variant we test:
          *
-         *   '' (default) variant (KVM):
+         *   '' (default) variant or any other non-listed variant:
          *      - KVM with default machine
          *      - KVM with Q35 machine
          *  '+hvf' variant:
@@ -362,7 +360,7 @@ doTestQemu(const char *inputDir G_GNUC_UNUSED,
     } else if (STREQ(arch, "aarch64")) {
         /* For aarch64 based on the test variant we test:
          *
-         *   '' (default) variant (KVM):
+         *   '' (default) variant or any other non-listed variant:
          *      - KVM with default machine
          *      - KVM with virt machine
          *
@@ -383,7 +381,8 @@ doTestQemu(const char *inputDir G_GNUC_UNUSED,
                 ret = -1;
         }
     } else if (STRPREFIX(arch, "riscv") || STRPREFIX(arch, "loongarch64")) {
-        /* For riscv64 or loongarch64 we test two combinations:
+        /* For riscv64 or loongarch64 we test two combinations for any variant:
+         * ('+hvf' is not applicable for this case)
          *
          *   - KVM with virt machine
          *   - TCG with virt machine