qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH v12 3/3] qcow2: list of bitmaps new test 242


From: Andrey Shinkevich
Subject: Re: [Qemu-block] [PATCH v12 3/3] qcow2: list of bitmaps new test 242
Date: Wed, 6 Feb 2019 10:26:31 +0000


On 06/02/2019 10:42, Vladimir Sementsov-Ogievskiy wrote:
> 05.02.2019 23:14, Andrey Shinkevich wrote:
>> A new test file 242 added to the qemu-iotests set. It checks
>> the format of qcow2 specific information for the new added
>> section that lists details of bitmaps.
>>
>> Signed-off-by: Andrey Shinkevich <address@hidden>
>> ---
>>    tests/qemu-iotests/242     | 100 +++++++++++++++++++++++++++
>>    tests/qemu-iotests/242.out | 167 
>> +++++++++++++++++++++++++++++++++++++++++++++
>>    tests/qemu-iotests/group   |   1 +
>>    3 files changed, 268 insertions(+)
>>    create mode 100755 tests/qemu-iotests/242
>>    create mode 100644 tests/qemu-iotests/242.out
>>
>> diff --git a/tests/qemu-iotests/242 b/tests/qemu-iotests/242
>> new file mode 100755
>> index 0000000..95c1f18
>> --- /dev/null
>> +++ b/tests/qemu-iotests/242
> 
> [..]
> 
>> +
>> +def toggle_flag(offset):
>> +    f = open(disk, "r+b")
>> +    f.seek(offset, 0)
>> +    c = f.read(1)
>> +    toggled = chr(ord(c) ^ bitmap_flag_unknown)
>> +    f.seek(-1, 1)
>> +    f.write(toggled)
>> +    f.close()
> 
> ok, but better use "with", like
> with open(disk, "r+b") as f:
>      ...
> 
> as file will be closed on any exception
> 
> 
> With or without that fixed:
> Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
> 
> 

Dear Vladimir,

Thank you for your hard work of the reviewer, the great patience
and the special care about this series.
-- 
With the best regards,
Andrey Shinkevich

reply via email to

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