|
|
9ae3a8 |
From 8a95de5d6c85d1db0f32ab5083ff9e00166a7ee8 Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Max Reitz <mreitz@redhat.com>
|
|
|
9ae3a8 |
Date: Sun, 19 Jan 2014 18:08:01 +0100
|
|
|
9ae3a8 |
Subject: [PATCH 27/34] qemu-iotests: Fix test 041
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Max Reitz <mreitz@redhat.com>
|
|
|
9ae3a8 |
Message-id: <1390154881-17140-8-git-send-email-mreitz@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 56820
|
|
|
9ae3a8 |
O-Subject: [RHEL-7.0 qemu-kvm PATCH v2 7/7] qemu-iotests: Fix test 041
|
|
|
9ae3a8 |
Bugzilla: 921890
|
|
|
9ae3a8 |
RH-Acked-by: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Jeffrey Cody <jcody@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
BZ: 921890
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Performing multiple drive-mirror blockjobs on the same qemu instance
|
|
|
9ae3a8 |
results in the image file used for the block device being replaced by
|
|
|
9ae3a8 |
the newly mirrored file, which is not what we want.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Fix this by performing one dedicated test per sync mode.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Max Reitz <mreitz@redhat.com>
|
|
|
9ae3a8 |
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
9ae3a8 |
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
9ae3a8 |
Reviewed-by: Eric Blake <eblake@redhat.com>
|
|
|
9ae3a8 |
Message-id: 1385407736-13941-3-git-send-email-mreitz@redhat.com
|
|
|
9ae3a8 |
Signed-off-by: Anthony Liguori <aliguori@amazon.com>
|
|
|
9ae3a8 |
(cherry picked from commit 171d64319c9604228429b0580edf764a69b67c75)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Max Reitz <mreitz@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
tests/qemu-iotests/041 | 32 ++++++++++++++++++++++++--------
|
|
|
9ae3a8 |
tests/qemu-iotests/041.out | 4 ++--
|
|
|
9ae3a8 |
2 files changed, 26 insertions(+), 10 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
tests/qemu-iotests/041 | 32 ++++++++++++++++++++++++--------
|
|
|
9ae3a8 |
tests/qemu-iotests/041.out | 4 ++--
|
|
|
9ae3a8 |
2 files changed, 26 insertions(+), 10 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/tests/qemu-iotests/041 b/tests/qemu-iotests/041
|
|
|
9ae3a8 |
index eccfe38..bcfb759 100755
|
|
|
9ae3a8 |
--- a/tests/qemu-iotests/041
|
|
|
9ae3a8 |
+++ b/tests/qemu-iotests/041
|
|
|
9ae3a8 |
@@ -750,16 +750,32 @@ class TestUnbackedSource(ImageMirroringTestCase):
|
|
|
9ae3a8 |
os.remove(test_img)
|
|
|
9ae3a8 |
os.remove(target_img)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
- def test_absolute_paths(self):
|
|
|
9ae3a8 |
+ def test_absolute_paths_full(self):
|
|
|
9ae3a8 |
+ self.assert_no_active_block_jobs()
|
|
|
9ae3a8 |
+ result = self.vm.qmp('drive-mirror', device='drive0',
|
|
|
9ae3a8 |
+ sync='full', target=target_img,
|
|
|
9ae3a8 |
+ mode='absolute-paths')
|
|
|
9ae3a8 |
+ self.assert_qmp(result, 'return', {})
|
|
|
9ae3a8 |
+ self.complete_and_wait()
|
|
|
9ae3a8 |
+ self.assert_no_active_block_jobs()
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+ def test_absolute_paths_top(self):
|
|
|
9ae3a8 |
+ self.assert_no_active_block_jobs()
|
|
|
9ae3a8 |
+ result = self.vm.qmp('drive-mirror', device='drive0',
|
|
|
9ae3a8 |
+ sync='top', target=target_img,
|
|
|
9ae3a8 |
+ mode='absolute-paths')
|
|
|
9ae3a8 |
+ self.assert_qmp(result, 'return', {})
|
|
|
9ae3a8 |
+ self.complete_and_wait()
|
|
|
9ae3a8 |
self.assert_no_active_block_jobs()
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
- for sync_mode in ['full', 'top', 'none']:
|
|
|
9ae3a8 |
- result = self.vm.qmp('drive-mirror', device='drive0',
|
|
|
9ae3a8 |
- sync=sync_mode, target=target_img,
|
|
|
9ae3a8 |
- mode='absolute-paths')
|
|
|
9ae3a8 |
- self.assert_qmp(result, 'return', {})
|
|
|
9ae3a8 |
- self.complete_and_wait()
|
|
|
9ae3a8 |
- self.assert_no_active_block_jobs()
|
|
|
9ae3a8 |
+ def test_absolute_paths_none(self):
|
|
|
9ae3a8 |
+ self.assert_no_active_block_jobs()
|
|
|
9ae3a8 |
+ result = self.vm.qmp('drive-mirror', device='drive0',
|
|
|
9ae3a8 |
+ sync='none', target=target_img,
|
|
|
9ae3a8 |
+ mode='absolute-paths')
|
|
|
9ae3a8 |
+ self.assert_qmp(result, 'return', {})
|
|
|
9ae3a8 |
+ self.complete_and_wait()
|
|
|
9ae3a8 |
+ self.assert_no_active_block_jobs()
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
if __name__ == '__main__':
|
|
|
9ae3a8 |
iotests.main(supported_fmts=['qcow2', 'qed'])
|
|
|
9ae3a8 |
diff --git a/tests/qemu-iotests/041.out b/tests/qemu-iotests/041.out
|
|
|
9ae3a8 |
index 4fd1c2d..6d9bee1 100644
|
|
|
9ae3a8 |
--- a/tests/qemu-iotests/041.out
|
|
|
9ae3a8 |
+++ b/tests/qemu-iotests/041.out
|
|
|
9ae3a8 |
@@ -1,5 +1,5 @@
|
|
|
9ae3a8 |
-.........................
|
|
|
9ae3a8 |
+...........................
|
|
|
9ae3a8 |
----------------------------------------------------------------------
|
|
|
9ae3a8 |
-Ran 25 tests
|
|
|
9ae3a8 |
+Ran 27 tests
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
OK
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.7.1
|
|
|
9ae3a8 |
|