qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 10/13] tests: Add QDict clone-flatten test


From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH 10/13] tests: Add QDict clone-flatten test
Date: Fri, 11 May 2018 23:41:01 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 2018-05-11 20:46, Eric Blake wrote:
> On 05/09/2018 11:55 AM, Max Reitz wrote:
>> This new test verifies that qdict_flatten() does not modify a shallow
>> clone of the given QDict.
>>
>> Signed-off-by: Max Reitz <address@hidden>
>> ---
>>   tests/check-qdict.c | 33 +++++++++++++++++++++++++++++++++
>>   1 file changed, 33 insertions(+)
>>
> 
> I'm not sure I even want to know how long it took you to debug the crash
> that you obviously hit before adding the fix in 9/13 plus this test ;)

Thank you very much, I made myself forget about that trauma already.

In short, I wondered why the whole thing worked for null-co directly:

driver=null-co,size=512
=> {"driver": "null-co", "size": 512}

But not for null-co through raw:

driver=raw,file.driver=null-co,file.size=512
=> {"file": {}}

(Or something like that, I don't remember exactly.)

With some debugging sprinkled into block.c, I could see that the correct
options were there on the null-co level...  But for some reason they
disappeared one level above.

Then I recalled that dict cloning is just a shallow cloning and looked
for the culprit...

Of course, in reality, much more cursing was involved.

Max

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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