From: Max Reitz <mreitz@redhat.com>
To: Thomas Huth <thuth@redhat.com>, qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] iotests: Add more "skip_if_unsupported" statements to the python tests
Date: Mon, 19 Aug 2019 22:22:51 +0200 [thread overview]
Message-ID: <9df50705-4d16-f390-8c16-202eac567fa1@redhat.com> (raw)
In-Reply-To: <763f15ee-a1ca-ba06-fc70-fdff9427ebf7@redhat.com>
[-- Attachment #1.1: Type: text/plain, Size: 1847 bytes --]
On 19.08.19 21:13, Max Reitz wrote:
> On 19.08.19 11:21, Thomas Huth wrote:
>> The python code already contains a possibility to skip tests if the
>> corresponding driver is not available in the qemu binary - use it
>> in more spots to avoid that the tests are failing if the driver has
>> been disabled.
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>> tests/qemu-iotests/030 | 3 +++
>> tests/qemu-iotests/040 | 2 ++
>> tests/qemu-iotests/041 | 14 +++++++++++++-
>> tests/qemu-iotests/245 | 2 ++
>> 4 files changed, 20 insertions(+), 1 deletion(-)
>
> [...]
>
>> diff --git a/tests/qemu-iotests/041 b/tests/qemu-iotests/041
>> index 26bf1701eb..f45d20fbe0 100755
>> --- a/tests/qemu-iotests/041
>> +++ b/tests/qemu-iotests/041
>> @@ -817,6 +817,7 @@ class TestRepairQuorum(iotests.QMPTestCase):
>> image_len = 1 * 1024 * 1024 # MB
>> IMAGES = [ quorum_img1, quorum_img2, quorum_img3 ]
>>
>> + @iotests.skip_if_unsupported(['quorum'])
>> def setUp(self):
>> self.vm = iotests.VM()
>
> It’s clear that none of these tests can run if there is no quorum
> support, because setUp() creates a quorum node. I think it would be
> nice if it would suffice to just skip everything automatically if
> setUp() is skipped and not have to bother about each of the test cases.
>
> Coincidentally (:-)), I have a patch to do that, namely “iotests: Allow
> skipping test cases” in my “iotests: Selfish patches” series:
>
> https://lists.nongnu.org/archive/html/qemu-block/2019-06/msg01106.html
>
> Yes, that means you cannot use an annotation because it needs @self to
> be able to skip the test. Hm... But I think I can make that work by
> simply s/case_notrun/args[0].case_skip/ in skip_if_unsupported()?
(Sent a v3 now that does that.)
(Max)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-08-19 20:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-19 9:21 [Qemu-devel] [PATCH] iotests: Add more "skip_if_unsupported" statements to the python tests Thomas Huth
2019-08-19 19:13 ` Max Reitz
2019-08-19 20:22 ` Max Reitz [this message]
2019-08-20 7:14 ` Thomas Huth
2019-08-20 12:24 ` Max Reitz
2019-08-21 17:19 ` Andrey Shinkevich
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=9df50705-4d16-f390-8c16-202eac567fa1@redhat.com \
--to=mreitz@redhat.com \
--cc=andrey.shinkevich@virtuozzo.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.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).