[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v10 08/14] iotests: prepare 124 and 257 bitmap q
From: |
Max Reitz |
Subject: |
Re: [Qemu-block] [PATCH v10 08/14] iotests: prepare 124 and 257 bitmap querying for backup-top filter |
Date: |
Mon, 9 Sep 2019 15:25:59 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
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.
But that would mean that the values given in @fields no longer need to
be equal to the ones in @ret. On top of that, I suppose if
@fields.items() at some index contains a key that is not equal to the
key in @ret.items() at the same index, luck will determine whether the
comparison passes or not.
Why not just loop through all keys of @fields and check that @fields and
@ret contain the same value for all of them?
Max
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-block] [PATCH v10 08/14] iotests: prepare 124 and 257 bitmap querying for backup-top filter,
Max Reitz <=