All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Avoid abort on QMP attempt to add an object with duplicate id
@ 2020-06-24 19:48 Eric Auger
  2020-06-24 19:48 ` [PATCH v3 1/2] qom: Introduce object_property_try_add_child() Eric Auger
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Eric Auger @ 2020-06-24 19:48 UTC (permalink / raw)
  To: eric.auger.pro, eric.auger, qemu-devel, pbonzini, berrange,
	ehabkost, armbru

Attempting to add an object through QMP with an id that is
already used leads to a qemu abort. This is a regression since
d2623129a7de ("qom: Drop parameter @errp of object_property_add()
& friends").

The first patch fixes the issue and the second patch adds a test
to check the error is gracefully returned to the QMP client.

Best Regards

Eric

This series can be found at:
https://github.com/eauger/qemu/tree/qom-graceful-v3

History:
- v2 -> v3:
  - don't take the object reference on failure in
    object_property_try_add_child
  - add g_assert_nonnull(resp) in 2/2 while keeping
    Thomas A-b

- v1 -> v2:
  - use the try terminology.
  - turn object_property_try_add() into a non-static function
  - add the test


Eric Auger (2):
  qom: Introduce object_property_try_add_child()
  tests/qmp-cmd-test: Add qmp/object-add-duplicate-id

 include/qom/object.h       | 24 ++++++++++++++++++++++--
 qom/object.c               | 21 ++++++++++++++++-----
 qom/object_interfaces.c    |  7 +++++--
 tests/qtest/qmp-cmd-test.c | 19 +++++++++++++++++++
 4 files changed, 62 insertions(+), 9 deletions(-)

-- 
2.20.1



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

end of thread, other threads:[~2020-06-29  8:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-24 19:48 [PATCH v3 0/2] Avoid abort on QMP attempt to add an object with duplicate id Eric Auger
2020-06-24 19:48 ` [PATCH v3 1/2] qom: Introduce object_property_try_add_child() Eric Auger
2020-06-25  9:24   ` Markus Armbruster
2020-06-29  8:31     ` Auger Eric
2020-06-24 19:48 ` [PATCH v3 2/2] tests/qmp-cmd-test: Add qmp/object-add-duplicate-id Eric Auger
2020-06-25  9:47   ` Paolo Bonzini
2020-06-25 10:58   ` Markus Armbruster
2020-06-24 20:24 ` [PATCH v3 0/2] Avoid abort on QMP attempt to add an object with duplicate id no-reply

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.