Re: [libvirt] [libvirt PATCH v2 19/44] Deprecate QEMU_CAPS_BOOT_MENU

2018-04-16 Thread Andrea Bolognani
On Mon, 2018-04-09 at 17:20 +0200, Ján Tomko wrote:
> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
> index 11f4b86610..7fce1e9b59 100644
> --- a/tests/qemuxml2argvtest.c
> +++ b/tests/qemuxml2argvtest.c
> @@ -766,24 +766,21 @@ mymain(void)
>  QEMU_CAPS_ICH9_AHCI);
>  DO_TEST("bootindex-floppy-q35",
>  QEMU_CAPS_DEVICE_IOH3420,
> -QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_BOOT_MENU,
> +QEMU_CAPS_ICH9_AHCI,
>  QEMU_CAPS_BOOTINDEX);
> -DO_TEST("boot-multi", QEMU_CAPS_BOOT_MENU);
> +DO_TEST("boot-multi", NONE);
>  DO_TEST("boot-menu-enable",
> -QEMU_CAPS_BOOT_MENU);
> +NONE);

NONE goes on the first line.

>  DO_TEST("boot-menu-enable-bootindex",
> -QEMU_CAPS_BOOT_MENU,
>  QEMU_CAPS_BOOTINDEX);
>  DO_TEST("boot-menu-enable-with-timeout",
> -QEMU_CAPS_BOOT_MENU,
>  QEMU_CAPS_SPLASH_TIMEOUT);
> -DO_TEST_FAILURE("boot-menu-enable-with-timeout", QEMU_CAPS_BOOT_MENU);
> +DO_TEST_FAILURE("boot-menu-enable-with-timeout", NONE);
>  DO_TEST_PARSE_ERROR("boot-menu-enable-with-timeout-invalid", NONE);
> -DO_TEST("boot-menu-disable", QEMU_CAPS_BOOT_MENU);
> +DO_TEST("boot-menu-disable", NONE);
>  DO_TEST("boot-menu-disable-drive",
> -QEMU_CAPS_BOOT_MENU);
> +NONE);

Here too.

Reviewed-by: Andrea Bolognani 

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [libvirt PATCH v2 19/44] Deprecate QEMU_CAPS_BOOT_MENU

2018-04-09 Thread Ján Tomko
Implied by QEMU >= 1.2.0.

Signed-off-by: Ján Tomko 
---
 src/qemu/qemu_capabilities.c |  1 -
 src/qemu/qemu_capabilities.h |  2 +-
 src/qemu/qemu_command.c  | 15 ---
 tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml |  1 -
 tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml |  1 -
 tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml |  1 -
 tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml |  1 -
 tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml   |  1 -
 tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml |  1 -
 tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml |  1 -
 tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml|  1 -
 tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml |  1 -
 tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml   |  1 -
 tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml |  1 -
 tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml |  1 -
 tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml|  1 -
 tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml |  1 -
 tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml |  1 -
 tests/qemucapabilitiesdata/caps_2.6.0.aarch64.xml|  1 -
 tests/qemucapabilitiesdata/caps_2.6.0.ppc64.xml  |  1 -
 tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml |  1 -
 tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml  |  1 -
 tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml |  1 -
 tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml  |  1 -
 tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml |  1 -
 tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml  |  1 -
 tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml  |  1 -
 tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml |  1 -
 tests/qemuxml2argvdata/bios-nvram-secure.args|  2 +-
 tests/qemuxml2argvdata/bios-nvram.args   |  2 +-
 tests/qemuxml2argvdata/bios.args |  2 +-
 tests/qemuxml2argvdata/disk-cdrom-tray.args  |  2 +-
 tests/qemuxml2argvdata/disk-copy_on_read.args|  2 +-
 tests/qemuxml2argvdata/disk-drive-detect-zeroes.args |  2 +-
 tests/qemuxml2argvdata/disk-drive-discard.args   |  2 +-
 tests/qemuxml2argvdata/disk-ioeventfd.args   |  2 +-
 tests/qemuxml2argvdata/event_idx.args|  2 +-
 tests/qemuxml2argvdata/graphics-spice-timeout.args   |  2 +-
 tests/qemuxml2argvdata/tpm-passthrough.args  |  2 +-
 tests/qemuxml2argvdata/virtio-lun.args   |  2 +-
 tests/qemuxml2argvtest.c | 16 ++--
 tests/qemuxml2xmltest.c  |  2 +-
 42 files changed, 24 insertions(+), 61 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 801134f205..3adb5c9af5 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -3635,7 +3635,6 @@ static qemuMonitorCallbacks callbacks = {
 static void
 virQEMUCapsInitQMPBasic(virQEMUCapsPtr qemuCaps)
 {
-virQEMUCapsSet(qemuCaps, QEMU_CAPS_BOOT_MENU);
 virQEMUCapsSet(qemuCaps, QEMU_CAPS_FSDEV);
 virQEMUCapsSet(qemuCaps, QEMU_CAPS_NAME_PROCESS);
 virQEMUCapsSet(qemuCaps, QEMU_CAPS_SMBIOS_TYPE);
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 71a069a5c7..b2093e52db 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -100,7 +100,7 @@ typedef enum {
 QEMU_CAPS_TDF, /* -tdf flag (user-mode pit catchup) */
 QEMU_CAPS_PCI_CONFIGFD, /* pci-assign.configfd */
 X_QEMU_CAPS_NODEFCONFIG, /* -nodefconfig */
-QEMU_CAPS_BOOT_MENU, /* -boot menu=on support */
+X_QEMU_CAPS_BOOT_MENU, /* -boot menu=on support */
 X_QEMU_CAPS_ENABLE_KQEMU, /* -enable-kqemu flag */
 
 /* 40 */
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index bb69aff100..cb3c251d12 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -6374,17 +6374,10 @@ qemuBuildBootCommandLine(virCommandPtr cmd,
 }
 
 if (def->os.bootmenu) {
-if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_BOOT_MENU)) {
-if (def->os.bootmenu == VIR_TRISTATE_BOOL_YES)
-virBufferAddLit(_buf, "menu=on,");
-else
-virBufferAddLit(_buf, "menu=off,");
-} else {
-/* We cannot emit an error when bootmenu is enabled but
- * unsupported because of backward compatibility */
-VIR_WARN("bootmenu is enabled but not "
- "supported by this QEMU binary");
-}
+if (def->os.bootmenu == VIR_TRISTATE_BOOL_YES)
+virBufferAddLit(_buf, "menu=on,");
+else
+virBufferAddLit(_buf, "menu=off,");
 }
 
 if (def->os.bios.rt_set) {
diff --git a/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml 
b/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
index 9c95914dc0..7fe822cbf9 100644
---