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 >>> --- >>> 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