summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/qemu-iotests/1484
-rw-r--r--tests/qemu-iotests/iotests.py5
2 files changed, 6 insertions, 3 deletions
diff --git a/tests/qemu-iotests/148 b/tests/qemu-iotests/148
index d066ec3e41..e01b061fe7 100644
--- a/tests/qemu-iotests/148
+++ b/tests/qemu-iotests/148
@@ -79,9 +79,6 @@ sector = "%d"
self.assert_qmp(event, 'data/sector-num', sector)
def testQuorum(self):
- if not 'quorum' in iotests.qemu_img_pipe('--help'):
- return
-
# Generate an error and get an event
self.vm.hmp_qemu_io("drive0", "aio_read %d %d" %
(offset * sector_size, sector_size))
@@ -139,4 +136,5 @@ class TestFifoQuorumEvents(TestQuorumEvents):
read_pattern = 'fifo'
if __name__ == '__main__':
+ iotests.verify_quorum()
iotests.main(supported_fmts=["raw"])
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index fb5c4824f3..bf31ec8231 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -437,6 +437,11 @@ def verify_platform(supported_oses=['linux']):
if True not in [sys.platform.startswith(x) for x in supported_oses]:
notrun('not suitable for this OS: %s' % sys.platform)
+def verify_quorum():
+ '''Skip test suite if quorum support is not available'''
+ if 'quorum' not in qemu_img_pipe('--help'):
+ notrun('quorum support missing')
+
def main(supported_fmts=[], supported_oses=['linux']):
'''Run tests'''