All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v0 00/21]: Monitor: improve handlers error handling
@ 2010-02-11  1:49 Luiz Capitulino
  2010-02-11  1:49 ` [Qemu-devel] [PATCH 01/21] Monitor: Introduce cmd_new_ret() Luiz Capitulino
                   ` (22 more replies)
  0 siblings, 23 replies; 33+ messages in thread
From: Luiz Capitulino @ 2010-02-11  1:49 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru

 Hi there,

 When I started converting handlers to the QObject style, I thought that
returning an error code wouldn't be needed. That is, we have an error object
already, so if the handler returns the error object it has failed, otherwise
it has succeeded.

 This was also very convenient, because handlers have never returned an error
code, and thus it would be easier to add a call to qemu_error_new() in the
right place instead of returning error codes.

 Turns out we need both. Actually, I should not have abused the error object
this way because (as Markus says) this is too fragile and we can end up
reporting bogus errors to clients (among other problems).

 The good news is that it's easy to fix.

 All we have to do is to change cmd_new() (the handler callback) to return an
error code and convert existing QObject handlers to it. This series does that
and most of the patches are really straightforward conversions.

 Additionally, Markus has designed an excellent debug mechanism for QMP, which
is implemented by the last patches in this series, and will allow us to catch
important QObject conversion and error handling bugs in handlers.

 Thanks.

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2010-02-19 21:28 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-11  1:49 [Qemu-devel] [PATCH v0 00/21]: Monitor: improve handlers error handling Luiz Capitulino
2010-02-11  1:49 ` [Qemu-devel] [PATCH 01/21] Monitor: Introduce cmd_new_ret() Luiz Capitulino
2010-02-19 21:28   ` Anthony Liguori
2010-02-11  1:49 ` [Qemu-devel] [PATCH 02/21] Monitor: Convert simple handlers to cmd_new_ret() Luiz Capitulino
2010-02-11  1:49 ` [Qemu-devel] [PATCH 03/21] Monitor: Convert do_cont() " Luiz Capitulino
2010-02-11  1:49 ` [Qemu-devel] [PATCH 04/21] Monitor: Convert do_eject() " Luiz Capitulino
2010-02-11  1:49 ` [Qemu-devel] [PATCH 05/21] Monitor: Convert do_cpu_set() " Luiz Capitulino
2010-02-11  1:49 ` [Qemu-devel] [PATCH 06/21] Monitor: Convert do_block_set_passwd() " Luiz Capitulino
2010-02-11  1:49 ` [Qemu-devel] [PATCH 07/21] Monitor: Convert do_getfd() " Luiz Capitulino
2010-02-11  1:49 ` [Qemu-devel] [PATCH 08/21] Monitor: Convert do_closefd() " Luiz Capitulino
2010-02-11  1:49 ` [Qemu-devel] [PATCH 09/21] Monitor: Convert pci_device_hot_add() " Luiz Capitulino
2010-02-11  1:49 ` [Qemu-devel] [PATCH 10/21] Monitor: Convert pci_device_hot_remove() " Luiz Capitulino
2010-02-11  1:49 ` [Qemu-devel] [PATCH 11/21] Monitor: Convert do_migrate() " Luiz Capitulino
2010-02-11  1:49 ` [Qemu-devel] [PATCH 12/21] Monitor: Convert do_memory_save() " Luiz Capitulino
2010-02-11  1:49 ` [Qemu-devel] [PATCH 13/21] Monitor: Convert do_physical_memory_save() " Luiz Capitulino
2010-02-11  1:50 ` [Qemu-devel] [PATCH 14/21] Monitor: Convert do_info() " Luiz Capitulino
2010-02-11  1:50 ` [Qemu-devel] [PATCH 15/21] Monitor: Convert do_change() " Luiz Capitulino
2010-02-11  1:50 ` [Qemu-devel] [PATCH 16/21] Monitor: Rename cmd_new_ret() Luiz Capitulino
2010-02-11  1:50 ` [Qemu-devel] [PATCH 17/21] Monitor: Debugging support Luiz Capitulino
2010-02-11  1:50 ` [Qemu-devel] [PATCH 18/21] Monitor: Drop the print disabling mechanism Luiz Capitulino
2010-02-11  1:50 ` [Qemu-devel] [PATCH 19/21] Monitor: Audit handler return Luiz Capitulino
2010-02-11  1:50 ` [Qemu-devel] [PATCH 20/21] Monitor: Debug stray prints the right way Luiz Capitulino
2010-02-11  1:50 ` [Qemu-devel] [PATCH 21/21] Monitor: Report more than one error in handlers Luiz Capitulino
2010-02-11  8:58 ` [Qemu-devel] [PATCH v0 00/21]: Monitor: improve handlers error handling Markus Armbruster
2010-02-11 11:48   ` Luiz Capitulino
2010-02-11 12:21     ` Markus Armbruster
2010-02-11 14:04 ` Anthony Liguori
2010-02-11 15:27   ` Markus Armbruster
2010-02-11 16:00     ` Luiz Capitulino
2010-02-11 16:12     ` Anthony Liguori
2010-02-11 16:57       ` Markus Armbruster
2010-02-11 17:17         ` Anthony Liguori
2010-02-12 10:04           ` Markus Armbruster

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.