[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH 10/13] tests: Add QDict clone-flatten test
From: |
Max Reitz |
Subject: |
Re: [Qemu-block] [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
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-block] [PATCH 06/13] block: Add block-specific QDict header, (continued)
- [Qemu-block] [PATCH 09/13] qdict: Make qdict_flatten() shallow-clone-friendly, Max Reitz, 2018/05/09
- [Qemu-block] [PATCH 10/13] tests: Add QDict clone-flatten test, Max Reitz, 2018/05/09
- [Qemu-block] [PATCH 11/13] block: Try to create well typed json:{} filenames, Max Reitz, 2018/05/09
- [Qemu-block] [PATCH 12/13] iotests: Test internal option typing, Max Reitz, 2018/05/09
- [Qemu-block] [PATCH 13/13] iotests: qcow2's encrypt.format is now optional, Max Reitz, 2018/05/09