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 <th...@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