qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v10 08/14] iotests: prepare 124 and 257 bitmap q


From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH v10 08/14] iotests: prepare 124 and 257 bitmap querying for backup-top filter
Date: Mon, 9 Sep 2019 16:14:59 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

On 09.09.19 15:49, Vladimir Sementsov-Ogievskiy wrote:
> 09.09.2019 16:25, Max Reitz wrote:
>> On 30.08.19 18:12, Vladimir Sementsov-Ogievskiy wrote:
>>> After backup-top filter appearing it's not possible to see dirty
>>> bitmaps in top node, so use node-name instead.
>>>
>>> Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
>>> ---
>>>   tests/qemu-iotests/124        |  83 ++++----
>>>   tests/qemu-iotests/257        |  49 ++---
>>>   tests/qemu-iotests/257.out    | 364 +++++++++++++---------------------
>>>   tests/qemu-iotests/iotests.py |  27 +++
>>>   4 files changed, 219 insertions(+), 304 deletions(-)
>>
>> [...]
>>
>>> diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
>>> index 84438e837c..1906eb72f3 100644
>>> --- a/tests/qemu-iotests/iotests.py
>>> +++ b/tests/qemu-iotests/iotests.py
>>> @@ -643,6 +643,33 @@ class VM(qtest.QEMUQtestMachine):
>>
>> [...]
>>
>>> +    def check_bitmap_status(self, node_name, bitmap_name, fields):
>>> +        ret = self.get_bitmap(node_name, bitmap_name)
>>> +
>>> +        return fields.items() <= ret.items()
>>
>> Why the <=?  AFAIU, it will compare each of the arrays’ elements one by
>> one and return true if all of the ones in @fields are less than or equal
>> to the ones in @ret.
> 
> No, it's a valid way to check that one dict is subdict of another,
> as dict_view works like Set class:

OK.  It looked to me like .items() just returned an array.  (When I
googled for how <= behaves here.)

[...]

> Should I care about python2 now, or we already dropped its support in iotests?

We haven’t officially.  OTOH, 4.2 is set to release on December 3, which
is less than one month before Python 2’s EOL.  So it would be close to
wrong to care at this point, I guess?

Reviewed-by: Max Reitz <address@hidden>

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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