From: Thomas Huth <thuth@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org,
Max Reitz <mreitz@redhat.com>
Subject: Re: [PATCH v2] iotests: Add more "skip_if_unsupported" statements to the python tests
Date: Tue, 14 Jan 2020 14:38:03 +0100 [thread overview]
Message-ID: <31b81415-0679-089b-788b-cc6364c0ebff@redhat.com> (raw)
In-Reply-To: <20191219121928.GH5230@linux.fritz.box>
On 19/12/2019 13.19, Kevin Wolf wrote:
> Am 18.12.2019 um 15:43 hat Thomas Huth geschrieben:
>> 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>
>> ---
>> v2: Thanks to Max' "iotests: Allow skipping test cases" patch (see
>> commit 6be012252018249d3a), this patch has been greatly simplified
>> by only marking the setUp functions instead of all functions from
>> a class.
>
> Ah, nice. I didn't know this worked on setup() functions.
>
>> diff --git a/tests/qemu-iotests/030 b/tests/qemu-iotests/030
>> index f3766f2a81..a585554c61 100755
>> --- a/tests/qemu-iotests/030
>> +++ b/tests/qemu-iotests/030
>> @@ -530,6 +530,7 @@ class TestQuorum(iotests.QMPTestCase):
>> children = []
>> backing = []
>>
>> + @iotests.skip_if_unsupported(['quorum'])
>> def setUp(self):
>> opts = ['driver=quorum', 'vote-threshold=2']
>
> test_stream_quorum(), which is the only test case in this class, already
> contains a check:
>
> if not iotests.supports_quorum():
> return
>
> We should probably remove this check because it's dead code now.
Interesting - but apparently, the check did not work right, since the
test aborts if I run it with a QEMU binary that does not have quorum
enabled.
Anyway, I'll respin the patch with the old check removed.
Thanks,
Thomas
prev parent reply other threads:[~2020-01-14 13:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-18 14:43 [PATCH v2] iotests: Add more "skip_if_unsupported" statements to the python tests Thomas Huth
2019-12-19 12:19 ` Kevin Wolf
2020-01-14 13:38 ` Thomas Huth [this message]
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=31b81415-0679-089b-788b-cc6364c0ebff@redhat.com \
--to=thuth@redhat.com \
--cc=andrey.shinkevich@virtuozzo.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).