All of lore.kernel.org
 help / color / mirror / Atom feed
From: Auger Eric <eric.auger@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	eric.auger.pro@gmail.com, qemu-devel@nongnu.org,
	berrange@redhat.com, ehabkost@redhat.com, armbru@redhat.com,
	patchew-devel@redhat.com
Subject: Re: [PATCH v4 0/3] Avoid abort on QMP attempt to add an object with duplicate id
Date: Mon, 29 Jun 2020 18:58:51 +0200	[thread overview]
Message-ID: <79214005-6b94-24d8-5bfa-c765863a0b35@redhat.com> (raw)
In-Reply-To: <8bd5b010-1c58-1a38-f234-d7669cd72d35@redhat.com>

Hi Paolo,

On 6/29/20 5:30 PM, Paolo Bonzini wrote:
> On 29/06/20 13:23, Eric Auger wrote:
>> 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.
>>
>> The last patch can be considered independently. It merges all the
>> object-add tests into a single test function and cover new failure
>> cases.
>>
>> Best Regards
>>
>> Eric
>>
>> This series can be found at:
>> https://github.com/eauger/qemu/tree/qom-graceful-v4
>>
>> History:
>> - v3 -> v4:
>>   - addressed style comment from Markus
>>   - added patch 3
>>
>> - 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 (3):
>>   qom: Introduce object_property_try_add_child()
>>   tests/qmp-cmd-test: Add qmp/object-add-duplicate-id
>>   tests/qmp-cmd-test: Add qmp/object-add-failure-modes
>>
>>  include/qom/object.h       | 26 +++++++++-
>>  qom/object.c               | 21 ++++++--
>>  qom/object_interfaces.c    |  7 ++-
>>  tests/qtest/qmp-cmd-test.c | 99 ++++++++++++++++++++++++++++++++++++--
>>  4 files changed, 140 insertions(+), 13 deletions(-)
>>
> 
> Very nice.  I see a failure reported by Patchew, I'll look into it as
> well if you don't have time.

As I reported earlier, I am no able to reproduce on my end with both

sudo time make docker-test-mingw@fedora SHOW_ENV=1 J=14 NETWORK=1
sudo time make docker-test-quick@centos7 SHOW_ENV=1 J=14 NETWORK=1

It fails on the first memory-backend-ram object-add that should be valid.

resp = qtest_qmp(qts, "{'execute': 'object-add', 'arguments':"
                    " {'qom-type': 'memory-backend-ram', 'id': 'ram1',
'props': {'size': 4294967296 } } }");

Could it be that the size is too large (4GB)?

Thanks

Eric



> 
> Paolo
> 
> 



  reply	other threads:[~2020-06-29 16:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-29 11:23 [PATCH v4 0/3] Avoid abort on QMP attempt to add an object with duplicate id Eric Auger
2020-06-29 11:23 ` [PATCH v4 1/3] qom: Introduce object_property_try_add_child() Eric Auger
2020-06-29 11:23 ` [PATCH v4 2/3] tests/qmp-cmd-test: Add qmp/object-add-duplicate-id Eric Auger
2020-06-29 11:23 ` [PATCH v4 3/3] tests/qmp-cmd-test: Add qmp/object-add-failure-modes Eric Auger
2020-06-29 11:58 ` [PATCH v4 0/3] Avoid abort on QMP attempt to add an object with duplicate id no-reply
2020-06-29 15:30 ` Paolo Bonzini
2020-06-29 16:58   ` Auger Eric [this message]
2020-07-01  6:51   ` Auger Eric
2020-07-01 12:17     ` Paolo Bonzini

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=79214005-6b94-24d8-5bfa-c765863a0b35@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=patchew-devel@redhat.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 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.