mbox series

[v2,0/3] iotests: Check for zstd support

Message ID 20220302124540.45083-1-hreitz@redhat.com (mailing list archive)
Headers show
Series iotests: Check for zstd support | expand

Message

Hanna Czenczek March 2, 2022, 12:45 p.m. UTC
Hi,

v1 cover letter:

https://lists.nongnu.org/archive/html/qemu-devel/2022-02/msg04592.html

We have two tests (as far as I know) that use compression_type=zstd for
qcow2 but do not check whether that is actually supported.  Thomas
reported this for 065, but it’s also the case for 303.

This series makes 303 be skipped when zstd is not compiled in, and has
065 use zlib for each of its test cases then (it was made to use zstd
just to improve on coverage, so using zlib as a fallback is perfectly
fine).

v2:
- Add the first patch so that 065 and 303 can use these new iotests.py
  functions to check for zstd support instead of checking for their own
  qemu-img create’s output
- Have 065 fall back to zlib instead of skipping zstd test cases


Hanna Reitz (3):
  iotests.py: Add supports_qcow2_zstd_compression()
  iotests/065: Check for zstd support
  iotests/303: Check for zstd support

 tests/qemu-iotests/065        | 24 ++++++++++++++++++------
 tests/qemu-iotests/303        |  4 +++-
 tests/qemu-iotests/iotests.py | 21 +++++++++++++++++++++
 3 files changed, 42 insertions(+), 7 deletions(-)

Comments

Hanna Czenczek March 22, 2022, 9:48 a.m. UTC | #1
Ping

On 02.03.22 13:45, Hanna Reitz wrote:
> Hi,
>
> v1 cover letter:
>
> https://lists.nongnu.org/archive/html/qemu-devel/2022-02/msg04592.html
>
> We have two tests (as far as I know) that use compression_type=zstd for
> qcow2 but do not check whether that is actually supported.  Thomas
> reported this for 065, but it’s also the case for 303.
>
> This series makes 303 be skipped when zstd is not compiled in, and has
> 065 use zlib for each of its test cases then (it was made to use zstd
> just to improve on coverage, so using zlib as a fallback is perfectly
> fine).
>
> v2:
> - Add the first patch so that 065 and 303 can use these new iotests.py
>    functions to check for zstd support instead of checking for their own
>    qemu-img create’s output
> - Have 065 fall back to zlib instead of skipping zstd test cases
>
>
> Hanna Reitz (3):
>    iotests.py: Add supports_qcow2_zstd_compression()
>    iotests/065: Check for zstd support
>    iotests/303: Check for zstd support
>
>   tests/qemu-iotests/065        | 24 ++++++++++++++++++------
>   tests/qemu-iotests/303        |  4 +++-
>   tests/qemu-iotests/iotests.py | 21 +++++++++++++++++++++
>   3 files changed, 42 insertions(+), 7 deletions(-)
>
Thomas Huth March 22, 2022, 9:56 a.m. UTC | #2
On 02/03/2022 13.45, Hanna Reitz wrote:
> Hi,
> 
> v1 cover letter:
> 
> https://lists.nongnu.org/archive/html/qemu-devel/2022-02/msg04592.html
> 
> We have two tests (as far as I know) that use compression_type=zstd for
> qcow2 but do not check whether that is actually supported.  Thomas
> reported this for 065, but it’s also the case for 303.
> 
> This series makes 303 be skipped when zstd is not compiled in, and has
> 065 use zlib for each of its test cases then (it was made to use zstd
> just to improve on coverage, so using zlib as a fallback is perfectly
> fine).
> 
> v2:
> - Add the first patch so that 065 and 303 can use these new iotests.py
>    functions to check for zstd support instead of checking for their own
>    qemu-img create’s output
> - Have 065 fall back to zlib instead of skipping zstd test cases
> 
> 
> Hanna Reitz (3):
>    iotests.py: Add supports_qcow2_zstd_compression()
>    iotests/065: Check for zstd support
>    iotests/303: Check for zstd support
> 
>   tests/qemu-iotests/065        | 24 ++++++++++++++++++------
>   tests/qemu-iotests/303        |  4 +++-
>   tests/qemu-iotests/iotests.py | 21 +++++++++++++++++++++
>   3 files changed, 42 insertions(+), 7 deletions(-)

Thanks, this fixes the failures of 065 and 303 on my system!

Series
Tested-by: Thomas Huth <thuth@redhat.com>
Vladimir Sementsov-Ogievskiy March 22, 2022, 10:50 a.m. UTC | #3
22.03.2022 12:48, Hanna Reitz wrote:
> Ping
> 
> On 02.03.22 13:45, Hanna Reitz wrote:
>> Hi,
>>
>> v1 cover letter:
>>
>> https://lists.nongnu.org/archive/html/qemu-devel/2022-02/msg04592.html
>>
>> We have two tests (as far as I know) that use compression_type=zstd for
>> qcow2 but do not check whether that is actually supported.  Thomas
>> reported this for 065, but it’s also the case for 303.
>>
>> This series makes 303 be skipped when zstd is not compiled in, and has
>> 065 use zlib for each of its test cases then (it was made to use zstd
>> just to improve on coverage, so using zlib as a fallback is perfectly
>> fine).
>>
>> v2:
>> - Add the first patch so that 065 and 303 can use these new iotests.py
>>    functions to check for zstd support instead of checking for their own
>>    qemu-img create’s output
>> - Have 065 fall back to zlib instead of skipping zstd test cases
>>
>>
>> Hanna Reitz (3):
>>    iotests.py: Add supports_qcow2_zstd_compression()
>>    iotests/065: Check for zstd support
>>    iotests/303: Check for zstd support
>>
>>   tests/qemu-iotests/065        | 24 ++++++++++++++++++------
>>   tests/qemu-iotests/303        |  4 +++-
>>   tests/qemu-iotests/iotests.py | 21 +++++++++++++++++++++
>>   3 files changed, 42 insertions(+), 7 deletions(-)
>>
> 

Reviewed-by: Vladimir Sementsov-Ogievskiy <v.sementsov-og@mail.ru>
Hanna Czenczek March 23, 2022, 10:46 a.m. UTC | #4
On 02.03.22 13:45, Hanna Reitz wrote:
> Hi,
>
> v1 cover letter:
>
> https://lists.nongnu.org/archive/html/qemu-devel/2022-02/msg04592.html
>
> We have two tests (as far as I know) that use compression_type=zstd for
> qcow2 but do not check whether that is actually supported.  Thomas
> reported this for 065, but it’s also the case for 303.
>
> This series makes 303 be skipped when zstd is not compiled in, and has
> 065 use zlib for each of its test cases then (it was made to use zstd
> just to improve on coverage, so using zlib as a fallback is perfectly
> fine).

Thanks a lot for the quick replies to my ping!

Regrettably, I forgot to consider that John’s recent changes would 
remove qemu_img_pipe_and_status(), which is used in patch 1...  I’m 
sorry, but I’ll have to send a v3. :/

Hanna