All of lore.kernel.org
 help / color / mirror / Atom feed
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: Tue, 20 Aug 2019 14:24:14 +0200	[thread overview]
Message-ID: <c6346fa4-e380-924b-6579-eced5a7d5e4d@redhat.com> (raw)
In-Reply-To: <b4b99c07-6a56-108f-06b7-cfd77d2004ef@redhat.com>


[-- Attachment #1.1: Type: text/plain, Size: 2277 bytes --]

On 20.08.19 09:14, Thomas Huth wrote:
> On 8/19/19 9:13 PM, 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()?
> 
> Sure, feel free to ignore my patch here or to modify it according to
> your reworks. As long as we finally get the iotests into a shape where
> they are a little bit more flexible wrt the enabled/disabled drivers,
> I'm happy.

Oh, no, I don’t mean to ignore the patch.  I just think that a
skip_if_unsupported() annotation above setUp() should be enough to skip
all tests.

Max


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2019-08-20 12:27 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
2019-08-20  7:14   ` Thomas Huth
2019-08-20 12:24     ` Max Reitz [this message]
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=c6346fa4-e380-924b-6579-eced5a7d5e4d@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.