From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Benoît Canet" <benoit.canet@irqsave.net>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Benoit Canet" <benoit@irqsave.net>,
"Stefan Hajnoczi" <stefanha@redhat.com>
Subject: [Qemu-devel] [PULL for-2.1 05/11] qemu-iotests: Disable Quorum testing in 041 when Quorum is not builtin
Date: Mon, 7 Jul 2014 14:28:32 +0200 [thread overview]
Message-ID: <1404736118-10078-6-git-send-email-stefanha@redhat.com> (raw)
In-Reply-To: <1404736118-10078-1-git-send-email-stefanha@redhat.com>
From: Benoît Canet <benoit.canet@irqsave.net>
This avoid breaking tests on RHEL6 where gnutls is too old for quorum to be
built by default.
Signed-off-by: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
tests/qemu-iotests/041 | 41 +++++++++++++++++++++++++++++++++++++++--
1 file changed, 39 insertions(+), 2 deletions(-)
diff --git a/tests/qemu-iotests/041 b/tests/qemu-iotests/041
index 005090e..5dbd4ee 100755
--- a/tests/qemu-iotests/041
+++ b/tests/qemu-iotests/041
@@ -740,6 +740,9 @@ class TestRepairQuorum(ImageMirroringTestCase):
image_len = 1 * 1024 * 1024 # MB
IMAGES = [ quorum_img1, quorum_img2, quorum_img3 ]
+ def has_quorum(self):
+ return 'quorum' in iotests.qemu_img_pipe('--help')
+
def setUp(self):
self.vm = iotests.VM()
@@ -757,8 +760,9 @@ class TestRepairQuorum(ImageMirroringTestCase):
#assemble the quorum block device from the individual files
args = { "options" : { "driver": "quorum", "id": "quorum0",
"vote-threshold": 2, "children": [ "img0", "img1", "img2" ] } }
- result = self.vm.qmp("blockdev-add", **args)
- self.assert_qmp(result, 'return', {})
+ if self.has_quorum():
+ result = self.vm.qmp("blockdev-add", **args)
+ self.assert_qmp(result, 'return', {})
def tearDown(self):
@@ -771,6 +775,9 @@ class TestRepairQuorum(ImageMirroringTestCase):
pass
def test_complete(self):
+ if not self.has_quorum():
+ return
+
self.assert_no_active_block_jobs()
result = self.vm.qmp('drive-mirror', device='quorum0', sync='full',
@@ -789,6 +796,9 @@ class TestRepairQuorum(ImageMirroringTestCase):
'target image does not match source after mirroring')
def test_cancel(self):
+ if not self.has_quorum():
+ return
+
self.assert_no_active_block_jobs()
result = self.vm.qmp('drive-mirror', device='quorum0', sync='full',
@@ -805,6 +815,9 @@ class TestRepairQuorum(ImageMirroringTestCase):
self.vm.shutdown()
def test_cancel_after_ready(self):
+ if not self.has_quorum():
+ return
+
self.assert_no_active_block_jobs()
result = self.vm.qmp('drive-mirror', device='quorum0', sync='full',
@@ -823,6 +836,9 @@ class TestRepairQuorum(ImageMirroringTestCase):
'target image does not match source after mirroring')
def test_pause(self):
+ if not self.has_quorum():
+ return
+
self.assert_no_active_block_jobs()
result = self.vm.qmp('drive-mirror', device='quorum0', sync='full',
@@ -851,6 +867,9 @@ class TestRepairQuorum(ImageMirroringTestCase):
'target image does not match source after mirroring')
def test_medium_not_found(self):
+ if not self.has_quorum():
+ return
+
result = self.vm.qmp('drive-mirror', device='ide1-cd0', sync='full',
node_name='repair0',
replaces='img1',
@@ -858,6 +877,9 @@ class TestRepairQuorum(ImageMirroringTestCase):
self.assert_qmp(result, 'error/class', 'GenericError')
def test_image_not_found(self):
+ if not self.has_quorum():
+ return
+
result = self.vm.qmp('drive-mirror', device='quorum0', sync='full',
node_name='repair0',
replaces='img1',
@@ -866,6 +888,9 @@ class TestRepairQuorum(ImageMirroringTestCase):
self.assert_qmp(result, 'error/class', 'GenericError')
def test_device_not_found(self):
+ if not self.has_quorum():
+ return
+
result = self.vm.qmp('drive-mirror', device='nonexistent', sync='full',
node_name='repair0',
replaces='img1',
@@ -873,6 +898,9 @@ class TestRepairQuorum(ImageMirroringTestCase):
self.assert_qmp(result, 'error/class', 'DeviceNotFound')
def test_wrong_sync_mode(self):
+ if not self.has_quorum():
+ return
+
result = self.vm.qmp('drive-mirror', device='quorum0',
node_name='repair0',
replaces='img1',
@@ -880,12 +908,18 @@ class TestRepairQuorum(ImageMirroringTestCase):
self.assert_qmp(result, 'error/class', 'GenericError')
def test_no_node_name(self):
+ if not self.has_quorum():
+ return
+
result = self.vm.qmp('drive-mirror', device='quorum0', sync='full',
replaces='img1',
target=quorum_repair_img, format=iotests.imgfmt)
self.assert_qmp(result, 'error/class', 'GenericError')
def test_unexistant_replaces(self):
+ if not self.has_quorum():
+ return
+
result = self.vm.qmp('drive-mirror', device='quorum0', sync='full',
node_name='repair0',
replaces='img77',
@@ -893,6 +927,9 @@ class TestRepairQuorum(ImageMirroringTestCase):
self.assert_qmp(result, 'error/class', 'GenericError')
def test_after_a_quorum_snapshot(self):
+ if not self.has_quorum():
+ return
+
result = self.vm.qmp('blockdev-snapshot-sync', node_name='img1',
snapshot_file=quorum_snapshot_file,
snapshot_node_name="snap1");
--
1.9.3
next prev parent reply other threads:[~2014-07-07 12:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-07 12:28 [Qemu-devel] [PULL for-2.1 00/11] Block patches Stefan Hajnoczi
2014-07-07 12:28 ` [Qemu-devel] [PULL for-2.1 01/11] Fix nocow typos in manpage Stefan Hajnoczi
2014-07-07 12:28 ` [Qemu-devel] [PULL for-2.1 02/11] mirror: Fix qiov size for short requests Stefan Hajnoczi
2014-07-07 12:28 ` [Qemu-devel] [PULL for-2.1 03/11] MAINTAINERS: add Stefan Hajnoczi to IDE maintainers Stefan Hajnoczi
2014-07-07 12:28 ` [Qemu-devel] [PULL for-2.1 04/11] ahci.c: mask unused flags when reading size PRDT DBC Stefan Hajnoczi
2014-07-07 12:28 ` Stefan Hajnoczi [this message]
2014-07-07 12:28 ` [Qemu-devel] [PULL for-2.1 06/11] raw-posix: Fix raw_getlength() to always return -errno on error Stefan Hajnoczi
2014-07-07 12:28 ` [Qemu-devel] [PULL for-2.1 07/11] ahci: map memory via device's address space instead of address_space_memory Stefan Hajnoczi
2014-07-07 12:28 ` [Qemu-devel] [PULL for-2.1 08/11] block: block: introduce APIs for submitting IO as a batch Stefan Hajnoczi
2014-07-07 12:28 ` [Qemu-devel] [PULL for-2.1 09/11] linux-aio: implement io plug, unplug and flush io queue Stefan Hajnoczi
2014-07-07 12:28 ` [Qemu-devel] [PULL for-2.1 10/11] dataplane: submit I/O as a batch Stefan Hajnoczi
2014-07-07 12:28 ` [Qemu-devel] [PULL for-2.1 11/11] qmp: show QOM properties in device-list-properties Stefan Hajnoczi
2014-07-07 15:29 ` [Qemu-devel] [PULL for-2.1 00/11] Block patches Peter Maydell
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=1404736118-10078-6-git-send-email-stefanha@redhat.com \
--to=stefanha@redhat.com \
--cc=benoit.canet@irqsave.net \
--cc=benoit@irqsave.net \
--cc=peter.maydell@linaro.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).