[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 08/11] qemu-iotests: add no-op streaming test
From: |
Alberto Garcia |
Subject: |
[Qemu-devel] [PATCH 08/11] qemu-iotests: add no-op streaming test |
Date: |
Fri, 24 Apr 2015 14:40:52 +0300 |
This patch updates test_stream_partial() to test that the block-stream
operation never copies data from the image specified as base.
Signed-off-by: Alberto Garcia <address@hidden>
---
tests/qemu-iotests/030 | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/tests/qemu-iotests/030 b/tests/qemu-iotests/030
index 6e6cb5a..a395a03 100755
--- a/tests/qemu-iotests/030
+++ b/tests/qemu-iotests/030
@@ -94,6 +94,19 @@ class TestSingleDrive(iotests.QMPTestCase):
def test_stream_partial(self):
self.assert_no_active_block_jobs()
+ # This is a no-op: no data should ever be copied from the base image
+ result = self.vm.qmp('block-stream', device='drive0', base=mid_img)
+ self.assert_qmp(result, 'return', {})
+
+ self.wait_until_completed()
+
+ self.assert_no_active_block_jobs()
+
+ self.assertNotEqual(qemu_io('-f', iotests.imgfmt, '-c', 'map',
mid_img),
+ qemu_io('-f', iotests.imgfmt, '-c', 'map',
test_img),
+ 'image file map matches backing file after a
no-op')
+
+ # And this is the operation that actually copies data
result = self.vm.qmp('block-stream', device='drive0', base=backing_img)
self.assert_qmp(result, 'return', {})
--
2.1.4
- [Qemu-devel] [PATCH v5 00/11] Support streaming to an intermediate layer, Alberto Garcia, 2015/04/24
- [Qemu-devel] [PATCH 07/11] qemu-iotests: fix test_stream_partial(), Alberto Garcia, 2015/04/24
- [Qemu-devel] [PATCH 03/11] block: never cancel a streaming job without running stream_complete(), Alberto Garcia, 2015/04/24
- [Qemu-devel] [PATCH 06/11] docs: Document how to stream to an intermediate layer, Alberto Garcia, 2015/04/24
- [Qemu-devel] [PATCH 01/11] block: keep a list of block jobs, Alberto Garcia, 2015/04/24
- [Qemu-devel] [PATCH 04/11] block: Support streaming to an intermediate layer, Alberto Garcia, 2015/04/24
- [Qemu-devel] [PATCH 11/11] qemu-iotests: test overlapping block-stream operations, Alberto Garcia, 2015/04/24
- [Qemu-devel] [PATCH 08/11] qemu-iotests: add no-op streaming test,
Alberto Garcia <=
- [Qemu-devel] [PATCH 09/11] qemu-iotests: test streaming to an intermediate layer, Alberto Garcia, 2015/04/24
- [Qemu-devel] [PATCH 10/11] qemu-iotests: test block-stream operations in parallel, Alberto Garcia, 2015/04/24
- [Qemu-devel] [PATCH 05/11] block: Add QMP support for streaming to an intermediate layer, Alberto Garcia, 2015/04/24
- [Qemu-devel] [PATCH 02/11] block: allow block jobs in any arbitrary node, Alberto Garcia, 2015/04/24