diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-07-07 15:02:36 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-07-07 15:02:36 +0100 |
commit | 9540d1f8d9b4b974af2fd359d7c642f09fc6f44d (patch) | |
tree | 63fc225a2a1f4d459c4bdc90ccc41c38f00d5a77 /tests | |
parent | f811d4743b358bc53a8c79576c903c0dbee29e72 (diff) | |
parent | f4eb32b590bf58c1c67570775eb78beb09964fad (diff) |
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
Block pull request
# gpg: Signature made Mon 07 Jul 2014 13:27:20 BST using RSA key ID 81AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>"
* remotes/stefanha/tags/block-pull-request:
qmp: show QOM properties in device-list-properties
dataplane: submit I/O as a batch
linux-aio: implement io plug, unplug and flush io queue
block: block: introduce APIs for submitting IO as a batch
ahci: map memory via device's address space instead of address_space_memory
raw-posix: Fix raw_getlength() to always return -errno on error
qemu-iotests: Disable Quorum testing in 041 when Quorum is not builtin
ahci.c: mask unused flags when reading size PRDT DBC
MAINTAINERS: add Stefan Hajnoczi to IDE maintainers
mirror: Fix qiov size for short requests
Fix nocow typos in manpage
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/qemu-iotests/041 | 46 | ||||
-rw-r--r-- | tests/qemu-iotests/041.out | 4 |
2 files changed, 46 insertions, 4 deletions
diff --git a/tests/qemu-iotests/041 b/tests/qemu-iotests/041 index 0815e19274..5dbd4ee91b 100755 --- a/tests/qemu-iotests/041 +++ b/tests/qemu-iotests/041 @@ -217,6 +217,11 @@ class TestSingleDriveZeroLength(TestSingleDrive): test_small_buffer2 = None test_large_cluster = None +class TestSingleDriveUnalignedLength(TestSingleDrive): + image_len = 1025 * 1024 + test_small_buffer2 = None + test_large_cluster = None + class TestMirrorNoBacking(ImageMirroringTestCase): image_len = 2 * 1024 * 1024 # MB @@ -735,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() @@ -752,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): @@ -766,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', @@ -784,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', @@ -800,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', @@ -818,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', @@ -846,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', @@ -853,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', @@ -861,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', @@ -868,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', @@ -875,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', @@ -888,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"); diff --git a/tests/qemu-iotests/041.out b/tests/qemu-iotests/041.out index 42147c0b58..24093bc631 100644 --- a/tests/qemu-iotests/041.out +++ b/tests/qemu-iotests/041.out @@ -1,5 +1,5 @@ -.............................................. +...................................................... ---------------------------------------------------------------------- -Ran 46 tests +Ran 54 tests OK |