From: Eric Blake <eblake@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org, lvivier@redhat.com,
Igor Mammedov <imammedo@redhat.com>
Subject: Re: [Qemu-devel] [PATCH for-2.9 0/2] Fix QemuOpts regression on bogus keys
Date: Tue, 21 Mar 2017 08:23:17 -0500 [thread overview]
Message-ID: <32d7d7b9-e6d5-3835-3802-23fe64cc99bb@redhat.com> (raw)
In-Reply-To: <87shm7rnbu.fsf@dusky.pond.sub.org>
[-- Attachment #1: Type: text/plain, Size: 1878 bytes --]
On 03/21/2017 04:28 AM, Markus Armbruster wrote:
> Eric Blake <eblake@redhat.com> writes:
>
>> Reported to me off-list by Laurent Vivier, who found the
>> problem while working on https://bugzilla.redhat.com/1433193
>> Broken since 2.7, but the fix is a one-liner (pointing out my
>> embarrassing mistake of mis-converting a pre-decrement operator);
>> as a bug fix, it still qualifies for 2.9 in spite of hard freeze,
>> on the other hand, as the regression was not introduced in 2.9,
>> I also understand if it is postponed.
>>
>> Eric Blake (2):
>> tests: Expose regression in QemuOpts visitor
>> qapi: Fix QemuOpts visitor regression on unvisited input
>>
>> qapi/opts-visitor.c | 6 +++---
>> tests/test-opts-visitor.c | 29 ++++++++++++++++++++++++++---
>> 2 files changed, 29 insertions(+), 6 deletions(-)
>
> Regresses
>
> $ qemu-system-x86_64 -object memory-backend-ram,id=mem1,size=4k
> qemu-system-x86_64: -object memory-backend-ram,id=mem1,size=4k: Invalid parameter 'id'
D'oh - you caught me running just 'make check-unit' instead of the
longer 'make check' (which includes the failing 'make check-qtest').
>
> I guess the culprit is commit 3a4641:
>
> pdict = qemu_opts_to_qdict(opts, NULL);
> qdict_del(pdict, "qom-type");
> qdict_del(pdict, "id");
>
> v = opts_visitor_new(opts);
> obj = user_creatable_add_type(type, id, pdict, v, errp);
> visit_free(v);
>
> This deletes "qom-type" and "id" from pdict, but not opts. The deletion
> makes user_creatable_add_type() skip visiting them as intended, but it
> also makes visit_check_struct() fail, because the opts visitor still
> expects the two to be visited.
I'll come up with a solution, and post v2.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
prev parent reply other threads:[~2017-03-21 13:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-21 3:17 [Qemu-devel] [PATCH for-2.9 0/2] Fix QemuOpts regression on bogus keys Eric Blake
2017-03-21 3:17 ` [Qemu-devel] [PATCH 1/2] tests: Expose regression in QemuOpts visitor Eric Blake
2017-03-21 4:41 ` Michael Roth
2017-03-21 9:01 ` Laurent Vivier
2017-03-21 13:21 ` Eric Blake
2017-03-21 13:33 ` Laurent Vivier
2017-03-21 15:36 ` Eric Blake
2017-03-21 16:01 ` Markus Armbruster
2017-03-21 16:10 ` Laurent Vivier
2017-03-21 3:17 ` [Qemu-devel] [PATCH 2/2] qapi: Fix QemuOpts visitor regression on unvisited input Eric Blake
2017-03-21 4:42 ` Michael Roth
2017-03-21 8:19 ` Laurent Vivier
2017-03-21 9:28 ` [Qemu-devel] [PATCH for-2.9 0/2] Fix QemuOpts regression on bogus keys Markus Armbruster
2017-03-21 13:23 ` Eric Blake [this message]
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=32d7d7b9-e6d5-3835-3802-23fe64cc99bb@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=imammedo@redhat.com \
--cc=lvivier@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).