[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] iotests: Add more "skip_if_unsupported" statements to the
From: |
Thomas Huth |
Subject: |
Re: [PATCH v2] iotests: Add more "skip_if_unsupported" statements to the python tests |
Date: |
Tue, 14 Jan 2020 14:38:03 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 |
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 <address@hidden>
>> ---
>> 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 in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH v2] iotests: Add more "skip_if_unsupported" statements to the python tests,
Thomas Huth <=