[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 04/11] qemu-iotests: Extend 041 for unbacked mirrorin
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 04/11] qemu-iotests: Extend 041 for unbacked mirroring |
Date: |
Fri, 15 Nov 2013 18:53:12 +0100 |
From: Max Reitz <address@hidden>
Add a new test case in file 041 for mirroring unbacked images in
"absolute-paths" mode. This should work, if possible, but most
importantly, qemu should never crash.
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Wenchao Xia <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
tests/qemu-iotests/041 | 25 +++++++++++++++++++++++++
tests/qemu-iotests/041.out | 4 ++--
2 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/tests/qemu-iotests/041 b/tests/qemu-iotests/041
index 6661c03..5d40265 100755
--- a/tests/qemu-iotests/041
+++ b/tests/qemu-iotests/041
@@ -677,5 +677,30 @@ class TestSetSpeed(ImageMirroringTestCase):
self.wait_ready_and_cancel()
+class TestUnbackedSource(ImageMirroringTestCase):
+ image_len = 2 * 1024 * 1024 # MB
+
+ def setUp(self):
+ qemu_img('create', '-f', iotests.imgfmt, test_img,
+ str(TestUnbackedSource.image_len))
+ self.vm = iotests.VM().add_drive(test_img)
+ self.vm.launch()
+
+ def tearDown(self):
+ self.vm.shutdown()
+ os.remove(test_img)
+ os.remove(target_img)
+
+ def test_absolute_paths(self):
+ self.assert_no_active_block_jobs()
+
+ for sync_mode in ['full', 'top', 'none']:
+ result = self.vm.qmp('drive-mirror', device='drive0',
+ sync=sync_mode, target=target_img,
+ mode='absolute-paths')
+ self.assert_qmp(result, 'return', {})
+ self.complete_and_wait()
+ self.assert_no_active_block_jobs()
+
if __name__ == '__main__':
iotests.main(supported_fmts=['qcow2', 'qed'])
diff --git a/tests/qemu-iotests/041.out b/tests/qemu-iotests/041.out
index 42314e9..4fd1c2d 100644
--- a/tests/qemu-iotests/041.out
+++ b/tests/qemu-iotests/041.out
@@ -1,5 +1,5 @@
-........................
+.........................
----------------------------------------------------------------------
-Ran 24 tests
+Ran 25 tests
OK
--
1.8.1.4
- [Qemu-devel] [PULL 00/11] Block fixes for 1.7.0, Kevin Wolf, 2013/11/15
- [Qemu-devel] [PULL 02/11] qapi-schema: Update description for NewImageMode, Kevin Wolf, 2013/11/15
- [Qemu-devel] [PULL 01/11] block: Print its file name if backing file opening failed, Kevin Wolf, 2013/11/15
- [Qemu-devel] [PULL 03/11] block/drive-mirror: Check for NULL backing_hd, Kevin Wolf, 2013/11/15
- [Qemu-devel] [PULL 05/11] MAINTAINERS: add block tree repo URLs, Kevin Wolf, 2013/11/15
- [Qemu-devel] [PULL 04/11] qemu-iotests: Extend 041 for unbacked mirroring,
Kevin Wolf <=
- [Qemu-devel] [PULL 07/11] qcow2: fix possible corruption when reading multiple clusters, Kevin Wolf, 2013/11/15
- [Qemu-devel] [PULL 06/11] qmp: access the local QemuOptsLists for drive option, Kevin Wolf, 2013/11/15
- [Qemu-devel] [PULL 08/11] qemu-iotests: Test qcow2 count_contiguous_clusters(), Kevin Wolf, 2013/11/15
- [Qemu-devel] [PULL 10/11] MAINTAINERS: add block driver sub-maintainers, Kevin Wolf, 2013/11/15
- [Qemu-devel] [PULL 09/11] qemu-img: Fix overwriting 'ret' before using, Kevin Wolf, 2013/11/15
- [Qemu-devel] [PULL 11/11] block: Fail if requested driver is not available, Kevin Wolf, 2013/11/15