[PATCH 04/14] qemu: Always assume QEMU_CAPS_REBOOT_TIMEOUT

Peter Krempa pkrempa at redhat.com
Mon Sep 20 15:29:26 UTC 2021


Supported since ac05f34924 ("add a boot parameter to set reboot
timeout") released in qemu-v1.3.0 and can't be compiled out.

Assume that it's present and remove the validation code.

Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
 src/qemu/qemu_validate.c | 9 ---------
 tests/qemuxml2argvtest.c | 4 ++--
 tests/qemuxml2xmltest.c  | 4 ++--
 3 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
index 6b685881a8..4eadcc6aae 100644
--- a/src/qemu/qemu_validate.c
+++ b/src/qemu/qemu_validate.c
@@ -598,15 +598,6 @@ qemuValidateDomainDefBoot(const virDomainDef *def,
         }
     }

-    if (def->os.bios.rt_set) {
-        if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_REBOOT_TIMEOUT)) {
-            virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                           _("reboot timeout is not supported "
-                             "by this QEMU binary"));
-            return -1;
-        }
-    }
-
     if (def->os.bm_timeout_set) {
         if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_SPLASH_TIMEOUT)) {
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 64408caeff..e13aeb4b15 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1174,8 +1174,8 @@ mymain(void)
     driver.config->nogfxAllowHostAudio = false;
     g_unsetenv("QEMU_AUDIO_DRV");

-    DO_TEST("reboot-timeout-disabled", QEMU_CAPS_REBOOT_TIMEOUT);
-    DO_TEST("reboot-timeout-enabled", QEMU_CAPS_REBOOT_TIMEOUT);
+    DO_TEST_NOCAPS("reboot-timeout-disabled");
+    DO_TEST_NOCAPS("reboot-timeout-enabled");

     DO_TEST("bios",
             QEMU_CAPS_DEVICE_ISA_SERIAL);
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 6d3526f91f..8329f871b3 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -233,8 +233,8 @@ mymain(void)
     DO_TEST_NOCAPS("boot-menu-disable-with-timeout");
     DO_TEST_NOCAPS("boot-order");

-    DO_TEST("reboot-timeout-enabled", QEMU_CAPS_REBOOT_TIMEOUT);
-    DO_TEST("reboot-timeout-disabled", QEMU_CAPS_REBOOT_TIMEOUT);
+    DO_TEST_NOCAPS("reboot-timeout-enabled");
+    DO_TEST_NOCAPS("reboot-timeout-disabled");

     DO_TEST_NOCAPS("clock-utc");
     DO_TEST_NOCAPS("clock-localtime");
-- 
2.31.1




More information about the libvir-list mailing list