[PATCH v1 4/8] iotests: filter out compression_type

Denis Plotnikov posted 8 patches 5 years, 8 months ago
Maintainers: Eric Blake <eblake@redhat.com>, Max Reitz <mreitz@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Markus Armbruster <armbru@redhat.com>
There is a newer version of this series
[PATCH v1 4/8] iotests: filter out compression_type
Posted by Denis Plotnikov 5 years, 8 months ago
After adding compression type feature to qcow2 format, qemu framework
commands reporting the image settingd, e.g. "qemu-img create", started
reporting the compression type for the image which breaks the iotests
output matching.

To fix it, add compression_type=zlib to the list of filtered image parameters.

Signed-off-by: Denis Plotnikov <dplotnikov@virtuozzo.com>
---
 tests/qemu-iotests/common.filter | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter
index 3f8ee3e5f7..c6962d199c 100644
--- a/tests/qemu-iotests/common.filter
+++ b/tests/qemu-iotests/common.filter
@@ -152,7 +152,8 @@ _filter_img_create()
         -e "s# refcount_bits=[0-9]\\+##g" \
         -e "s# key-secret=[a-zA-Z0-9]\\+##g" \
         -e "s# iter-time=[0-9]\\+##g" \
-        -e "s# force_size=\\(on\\|off\\)##g"
+        -e "s# force_size=\\(on\\|off\\)##g" \
+        -e "s# compression_type=zlib##g"
 }
 
 _filter_img_info()
-- 
2.17.0


Re: [PATCH v1 4/8] iotests: filter out compression_type
Posted by Vladimir Sementsov-Ogievskiy 5 years, 8 months ago
27.02.2020 10:29, Denis Plotnikov wrote:
> After adding compression type feature to qcow2 format, qemu framework
> commands reporting the image settingd, e.g. "qemu-img create", started
> reporting the compression type for the image which breaks the iotests
> output matching.
> 
> To fix it, add compression_type=zlib to the list of filtered image parameters.

So, the first patch breaks iotests? Than it should be merged into first patch or
moved before it, to not break git bisect.

> 
> Signed-off-by: Denis Plotnikov <dplotnikov@virtuozzo.com>
> ---
>   tests/qemu-iotests/common.filter | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter
> index 3f8ee3e5f7..c6962d199c 100644
> --- a/tests/qemu-iotests/common.filter
> +++ b/tests/qemu-iotests/common.filter
> @@ -152,7 +152,8 @@ _filter_img_create()
>           -e "s# refcount_bits=[0-9]\\+##g" \
>           -e "s# key-secret=[a-zA-Z0-9]\\+##g" \
>           -e "s# iter-time=[0-9]\\+##g" \
> -        -e "s# force_size=\\(on\\|off\\)##g"
> +        -e "s# force_size=\\(on\\|off\\)##g" \
> +        -e "s# compression_type=zlib##g"
>   }
>   
>   _filter_img_info()
> 


-- 
Best regards,
Vladimir

Re: [PATCH v1 4/8] iotests: filter out compression_type
Posted by Eric Blake 5 years, 8 months ago
On 2/27/20 1:29 AM, Denis Plotnikov wrote:
> After adding compression type feature to qcow2 format, qemu framework
> commands reporting the image settingd, e.g. "qemu-img create", started

settings

> reporting the compression type for the image which breaks the iotests
> output matching.
> 
> To fix it, add compression_type=zlib to the list of filtered image parameters.
> 
> Signed-off-by: Denis Plotnikov <dplotnikov@virtuozzo.com>
> ---
>   tests/qemu-iotests/common.filter | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)

This should be squashed in to the patch that caused the breakage (3/8, 
if I'm right).

> 
> diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter
> index 3f8ee3e5f7..c6962d199c 100644
> --- a/tests/qemu-iotests/common.filter
> +++ b/tests/qemu-iotests/common.filter
> @@ -152,7 +152,8 @@ _filter_img_create()
>           -e "s# refcount_bits=[0-9]\\+##g" \
>           -e "s# key-secret=[a-zA-Z0-9]\\+##g" \
>           -e "s# iter-time=[0-9]\\+##g" \
> -        -e "s# force_size=\\(on\\|off\\)##g"
> +        -e "s# force_size=\\(on\\|off\\)##g" \
> +        -e "s# compression_type=zlib##g"

Do you really want to hard-code just zlib, or should this be more 
generic as compression_type=[a-zA-Z0-9]\\+ as done on other lines like 
key-secret?

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org


Re: [PATCH v1 4/8] iotests: filter out compression_type
Posted by Denis Plotnikov 5 years, 8 months ago

On 27.02.2020 17:03, Eric Blake wrote:
> On 2/27/20 1:29 AM, Denis Plotnikov wrote:
>> After adding compression type feature to qcow2 format, qemu framework
>> commands reporting the image settingd, e.g. "qemu-img create", started
>
> settings
>
>> reporting the compression type for the image which breaks the iotests
>> output matching.
>>
>> To fix it, add compression_type=zlib to the list of filtered image 
>> parameters.
>>
>> Signed-off-by: Denis Plotnikov <dplotnikov@virtuozzo.com>
>> ---
>>   tests/qemu-iotests/common.filter | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> This should be squashed in to the patch that caused the breakage (3/8, 
> if I'm right).
>
>>
>> diff --git a/tests/qemu-iotests/common.filter 
>> b/tests/qemu-iotests/common.filter
>> index 3f8ee3e5f7..c6962d199c 100644
>> --- a/tests/qemu-iotests/common.filter
>> +++ b/tests/qemu-iotests/common.filter
>> @@ -152,7 +152,8 @@ _filter_img_create()
>>           -e "s# refcount_bits=[0-9]\\+##g" \
>>           -e "s# key-secret=[a-zA-Z0-9]\\+##g" \
>>           -e "s# iter-time=[0-9]\\+##g" \
>> -        -e "s# force_size=\\(on\\|off\\)##g"
>> +        -e "s# force_size=\\(on\\|off\\)##g" \
>> +        -e "s# compression_type=zlib##g"
>
> Do you really want to hard-code just zlib, or should this be more 
> generic as compression_type=[a-zA-Z0-9]\\+ as done on other lines like 
> key-secret?
When I did this I meant additional implicit check that the default 
compression type is zlib. But non of the other items in the filter don't 
do it. So I'll change it to be consistent. Thanks!

Denis
>
>