From: Hanna Reitz <hreitz@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Thomas Huth <thuth@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [PATCH 1/2] iotests/065: Check for zstd support
Date: Wed, 2 Mar 2022 12:14:55 +0100 [thread overview]
Message-ID: <11ef705d-85fe-8aab-de30-0ba20e9eb980@redhat.com> (raw)
In-Reply-To: <b76eac91-91e3-11a2-e1a8-18709d9d10ba@virtuozzo.com>
On 22.02.22 16:44, Vladimir Sementsov-Ogievskiy wrote:
> 21.02.2022 20:08, Hanna Reitz wrote:
>> Some test cases run in iotest 065 require zstd support. Skip them if
>> qemu-img reports it not to be available.
>>
>> Reported-by: Thomas Huth <thuth@redhat.com>
>> Fixes: 12a936171d71f839dc907ff ("iotest 065: explicit compression type")
>> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
>> ---
>> tests/qemu-iotests/065 | 11 ++++++++---
>> 1 file changed, 8 insertions(+), 3 deletions(-)
>>
>> diff --git a/tests/qemu-iotests/065 b/tests/qemu-iotests/065
>> index f7c1b68dad..b68df84642 100755
>> --- a/tests/qemu-iotests/065
>> +++ b/tests/qemu-iotests/065
>> @@ -24,7 +24,7 @@ import os
>> import re
>> import json
>> import iotests
>> -from iotests import qemu_img, qemu_img_pipe
>> +from iotests import qemu_img_pipe, qemu_img_pipe_and_status
>> import unittest
>> test_img = os.path.join(iotests.test_dir, 'test.img')
>> @@ -35,8 +35,13 @@ class TestImageInfoSpecific(iotests.QMPTestCase):
>> def setUp(self):
>> if self.img_options is None:
>> self.skipTest('Skipping abstract test class')
>> - qemu_img('create', '-f', iotests.imgfmt, '-o',
>> self.img_options,
>> - test_img, '128K')
>> + output, status = qemu_img_pipe_and_status('create',
>> + '-f', iotests.imgfmt,
>> + '-o',
>> self.img_options,
>> + test_img, '128K')
>> + if status == 1 and \
>> + "'compression-type' does not accept value 'zstd'" in
>> output:
>> + self.case_skip('zstd compression not supported')
>> def tearDown(self):
>> os.remove(test_img)
>
>
> Hmm. Actually you fix the commit 12a936171d71f in a meaning that test
> passes now. But that only stresses the fact that 12a936171d71f brings
> a degradation in test-count for no-zstd builds. Is it bad?
Probably not really, considering that no-zstd builds shouldn’t be
happening very often. But since it’s something that can absolutely be
worked around, it should be worked around. :)
> The simplest solution is to duplicate TestQCow3NotLazy and
> TestQCow3LazyQMP with s/zstd/zlib/.. More complicated is to add
> generic function to detect is zstd supported or not, and use zstd in
> TestQCow3NotLazy and TestQCow3NotLazy only if zstd is supported (and
> otherwise use zlib).
I think using zstd only if zstd is supported makes the most sense so we
don’t increase the number of test cases for the more common case where
zstd is compiled in.
Hanna
next prev parent reply other threads:[~2022-03-02 13:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-21 17:08 [PATCH 0/2] iotests: Check for zstd support Hanna Reitz
2022-02-21 17:08 ` [PATCH 1/2] iotests/065: " Hanna Reitz
2022-02-21 17:20 ` Thomas Huth
2022-02-22 15:44 ` Vladimir Sementsov-Ogievskiy
2022-03-02 11:14 ` Hanna Reitz [this message]
2022-02-21 17:08 ` [PATCH 2/2] iotests/303: " Hanna Reitz
2022-02-21 17:27 ` Thomas Huth
2022-02-22 15:55 ` Vladimir Sementsov-Ogievskiy
2022-03-02 11:09 ` Hanna Reitz
2022-03-02 11:31 ` Vladimir Sementsov-Ogievskiy
2022-03-02 11:37 ` Hanna Reitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11ef705d-85fe-8aab-de30-0ba20e9eb980@redhat.com \
--to=hreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
--cc=vsementsov@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).