From: Eric Auger <eric.auger@redhat.com>
To: eric.auger.pro@gmail.com, eric.auger@redhat.com,
qemu-devel@nongnu.org, pbonzini@redhat.com, berrange@redhat.com,
ehabkost@redhat.com, armbru@redhat.com
Subject: [PATCH v2 0/2] Avoid abort on QMP attempt to add an object with duplicate id
Date: Wed, 24 Jun 2020 14:42:59 +0200 [thread overview]
Message-ID: <20200624124301.7112-1-eric.auger@redhat.com> (raw)
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-v2
History:
- 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 | 22 +++++++++++++++++-----
qom/object_interfaces.c | 7 +++++--
tests/qtest/qmp-cmd-test.c | 18 ++++++++++++++++++
4 files changed, 62 insertions(+), 9 deletions(-)
--
2.20.1
next reply other threads:[~2020-06-24 12:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-24 12:42 Eric Auger [this message]
2020-06-24 12:43 ` [PATCH v2 1/2] qom: Introduce object_property_try_add_child() Eric Auger
2020-06-24 14:12 ` Paolo Bonzini
2020-06-24 14:17 ` Auger Eric
2020-06-24 16:02 ` Auger Eric
2020-06-24 16:16 ` Paolo Bonzini
2020-06-24 17:03 ` Auger Eric
2020-06-24 12:43 ` [PATCH v2 2/2] tests/qmp-cmd-test: Add qmp/object-add-duplicate-id Eric Auger
2020-06-24 13:01 ` Thomas Huth
2020-06-24 16:13 ` Auger Eric
2020-06-24 13:35 ` [PATCH v2 0/2] Avoid abort on QMP attempt to add an object with duplicate id no-reply
2020-06-24 14:05 ` Auger Eric
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200624124301.7112-1-eric.auger@redhat.com \
--to=eric.auger@redhat.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=ehabkost@redhat.com \
--cc=eric.auger.pro@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).