@@ -205,6 +205,27 @@ class TestMultipleOps(iotests.QMPTestCase):
self.vm.shutdown()
+ # We currently don't support non-overlapping jobs if they are in
+ # the same chain. If we do it in the future this test will need to
+ # be updated.
+ def test_non_overlapping(self):
+ self.assert_no_active_block_jobs()
+
+ # Set a speed limit to make sure that this job blocks the rest
+ result = self.vm.qmp('block-stream', device='node4', base=self.imgs[0], speed=32768)
+ self.assert_qmp(result, 'return', {})
+
+ result = self.vm.qmp('block-stream', device='drive0', top=self.imgs[5])
+ self.assert_qmp(result, 'error/class', 'GenericError')
+
+ result = self.vm.qmp('block-commit', device='drive0', base=self.imgs[5])
+ self.assert_qmp(result, 'error/class', 'GenericError')
+
+ self.wait_until_completed(drive='node4')
+ self.assert_no_active_block_jobs()
+
+ self.vm.shutdown()
+
class TestSmallerBackingFile(iotests.QMPTestCase):
backing_len = 1 * 1024 * 1024 # MB
image_len = 2 * backing_len
@@ -1,5 +1,5 @@
-................
+.................
----------------------------------------------------------------------
-Ran 16 tests
+Ran 17 tests
OK
Even if there are no common nodes involved, we currently don't support several operations at the same time in the same backing chain. Signed-off-by: Alberto Garcia <berto@igalia.com> --- tests/qemu-iotests/030 | 21 +++++++++++++++++++++ tests/qemu-iotests/030.out | 4 ++-- 2 files changed, 23 insertions(+), 2 deletions(-)