qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-2.9 0/2] Fix QemuOpts regression on bogus ke


From: Eric Blake
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
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

On 03/21/2017 04:28 AM, Markus Armbruster wrote:
> Eric Blake <address@hidden> 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: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]