mbox series

[v2,0/4] iotests/297: Cover tests/

Message ID 20210512174318.59466-1-mreitz@redhat.com (mailing list archive)
Headers show
Series iotests/297: Cover tests/ | expand

Message

Max Reitz May 12, 2021, 5:43 p.m. UTC
v1: https://lists.nongnu.org/archive/html/qemu-block/2021-03/msg01471.html


Hi,

When reviewing Vladimir’s new addition to tests/, I noticed that 297 so
far does not cover named tests.  That isn’t so good.

This series makes it cover them, and because tests/ is rather sparse at
this point, I decided to also fix up the two tests in there that don’t
pass pylint’s scrutiny yet.  I think it would be nice if we could keep
all of tests/ clean.


v2:
- Changed patch 2 as per Vladimir’s suggestion
  (i.e. don’t let discards1_sha256 and all_discards_sha256 be class
  variables at all)


git-backport-diff against v1:

Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch
[down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively

001/4:[----] [--] 'iotests/297: Drop 169 and 199 from the skip list'
002/4:[0016] [FC] 'migrate-bitmaps-postcopy-test: Fix pylint warnings'
003/4:[----] [--] 'migrate-bitmaps-test: Fix pylint warnings'
004/4:[----] [--] 'iotests/297: Cover tests/'


Max Reitz (4):
  iotests/297: Drop 169 and 199 from the skip list
  migrate-bitmaps-postcopy-test: Fix pylint warnings
  migrate-bitmaps-test: Fix pylint warnings
  iotests/297: Cover tests/

 tests/qemu-iotests/297                        |  7 ++--
 .../tests/migrate-bitmaps-postcopy-test       | 13 ++++---
 tests/qemu-iotests/tests/migrate-bitmaps-test | 38 ++++++++++---------
 3 files changed, 31 insertions(+), 27 deletions(-)

Comments

Max Reitz May 14, 2021, 11:02 a.m. UTC | #1
On 12.05.21 19:43, Max Reitz wrote:
> v1: https://lists.nongnu.org/archive/html/qemu-block/2021-03/msg01471.html
> 
> 
> Hi,
> 
> When reviewing Vladimir’s new addition to tests/, I noticed that 297 so
> far does not cover named tests.  That isn’t so good.
> 
> This series makes it cover them, and because tests/ is rather sparse at
> this point, I decided to also fix up the two tests in there that don’t
> pass pylint’s scrutiny yet.  I think it would be nice if we could keep
> all of tests/ clean.
> 
> 
> v2:
> - Changed patch 2 as per Vladimir’s suggestion
>    (i.e. don’t let discards1_sha256 and all_discards_sha256 be class
>    variables at all)

Thanks for the review, applied to my block branch:

https://github.com/XanClic/qemu/commits/block

Max
Max Reitz May 14, 2021, 3:08 p.m. UTC | #2
On 14.05.21 13:02, Max Reitz wrote:
> On 12.05.21 19:43, Max Reitz wrote:
>> v1: 
>> https://lists.nongnu.org/archive/html/qemu-block/2021-03/msg01471.html
>>
>>
>> Hi,
>>
>> When reviewing Vladimir’s new addition to tests/, I noticed that 297 so
>> far does not cover named tests.  That isn’t so good.
>>
>> This series makes it cover them, and because tests/ is rather sparse at
>> this point, I decided to also fix up the two tests in there that don’t
>> pass pylint’s scrutiny yet.  I think it would be nice if we could keep
>> all of tests/ clean.
>>
>>
>> v2:
>> - Changed patch 2 as per Vladimir’s suggestion
>>    (i.e. don’t let discards1_sha256 and all_discards_sha256 be class
>>    variables at all)
> 
> Thanks for the review, applied to my block branch:
> 
> https://github.com/XanClic/qemu/commits/block

...and dropping again, patch 3 embarrassingly breaks 
migrate-bitmaps-test.  The problem seems to be that contrastingly to 
pylint’s opinion, the `lambda self: mc(self)` is necessary, it can’t be 
contracted to just `mc`.  I suspect that `mc` (returned by 
`methodcaller`) has a variable argument list, and so without the lambda, 
`setattr` adds it as a argument-less function, so when it is called, it 
doesn’t receive the `self` parameter.  (It complains that it expected 1 
argument, but got 0.)

So we need the lambda to enforce that the `self` parameter is passed.

Max