qemu: Always assume QEMU_CAPS_REBOOT_TIMEOUT

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@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2021-08-09 10:02:06 +02:00
parent 2b0b0800bf
commit 2b928f1c2d
3 changed files with 4 additions and 13 deletions

View File

@ -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",

View File

@ -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);

View File

@ -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");