Re: [Qemu-devel] [PATCH v2 01/11] qemu-iotests/041: Avoid blockdev-add with id

2016-09-20 Thread Eric Blake
On 09/20/2016 08:03 AM, Kevin Wolf wrote:
> We want to remove the 'id' option for blockdev-add. This removes one
> user of the option and makes it use only node names.
> 
> Signed-off-by: Kevin Wolf 
> ---
>  tests/qemu-iotests/041 | 71 
> +++---
>  1 file changed, 32 insertions(+), 39 deletions(-)
> 

Reviewed-by: Eric Blake 

-- 
Eric Blake   eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org



signature.asc
Description: OpenPGP digital signature


[Qemu-devel] [PATCH v2 01/11] qemu-iotests/041: Avoid blockdev-add with id

2016-09-20 Thread Kevin Wolf
We want to remove the 'id' option for blockdev-add. This removes one
user of the option and makes it use only node names.

Signed-off-by: Kevin Wolf 
---
 tests/qemu-iotests/041 | 71 +++---
 1 file changed, 32 insertions(+), 39 deletions(-)

diff --git a/tests/qemu-iotests/041 b/tests/qemu-iotests/041
index 80939c0..d1e1ad8 100755
--- a/tests/qemu-iotests/041
+++ b/tests/qemu-iotests/041
@@ -782,7 +782,7 @@ class TestRepairQuorum(iotests.QMPTestCase):
 self.vm.launch()
 
 #assemble the quorum block device from the individual files
-args = { "options" : { "driver": "quorum", "id": "quorum0",
+args = { "options" : { "driver": "quorum", "node-name": "quorum0",
  "vote-threshold": 2, "children": [ "img0", "img1", "img2" ] } 
}
 if self.has_quorum():
 result = self.vm.qmp("blockdev-add", **args)
@@ -804,13 +804,12 @@ class TestRepairQuorum(iotests.QMPTestCase):
 
 self.assert_no_active_block_jobs()
 
-result = self.vm.qmp('drive-mirror', device='quorum0', sync='full',
- node_name="repair0",
- replaces="img1",
+result = self.vm.qmp('drive-mirror', job_id='job0', device='quorum0',
+ sync='full', node_name="repair0", replaces="img1",
  target=quorum_repair_img, format=iotests.imgfmt)
 self.assert_qmp(result, 'return', {})
 
-self.complete_and_wait(drive="quorum0")
+self.complete_and_wait(drive="job0")
 self.assert_has_block_node("repair0", quorum_repair_img)
 # TODO: a better test requiring some QEMU infrastructure will be added
 #   to check that this file is really driven by quorum
@@ -824,13 +823,12 @@ class TestRepairQuorum(iotests.QMPTestCase):
 
 self.assert_no_active_block_jobs()
 
-result = self.vm.qmp('drive-mirror', device='quorum0', sync='full',
- node_name="repair0",
- replaces="img1",
+result = self.vm.qmp('drive-mirror', job_id='job0', device='quorum0',
+ sync='full', node_name="repair0", replaces="img1",
  target=quorum_repair_img, format=iotests.imgfmt)
 self.assert_qmp(result, 'return', {})
 
-self.cancel_and_wait(drive="quorum0", force=True)
+self.cancel_and_wait(drive="job0", force=True)
 # here we check that the last registered quorum file has not been
 # swapped out and unref
 self.assert_has_block_node(None, quorum_img3)
@@ -842,13 +840,12 @@ class TestRepairQuorum(iotests.QMPTestCase):
 
 self.assert_no_active_block_jobs()
 
-result = self.vm.qmp('drive-mirror', device='quorum0', sync='full',
- node_name="repair0",
- replaces="img1",
+result = self.vm.qmp('drive-mirror', job_id='job0', device='quorum0',
+ sync='full', node_name="repair0", replaces="img1",
  target=quorum_repair_img, format=iotests.imgfmt)
 self.assert_qmp(result, 'return', {})
 
-self.wait_ready_and_cancel(drive="quorum0")
+self.wait_ready_and_cancel(drive="job0")
 # here we check that the last registered quorum file has not been
 # swapped out and unref
 self.assert_has_block_node(None, quorum_img3)
@@ -862,13 +859,12 @@ class TestRepairQuorum(iotests.QMPTestCase):
 
 self.assert_no_active_block_jobs()
 
-result = self.vm.qmp('drive-mirror', device='quorum0', sync='full',
- node_name="repair0",
- replaces="img1",
+result = self.vm.qmp('drive-mirror', job_id='job0', device='quorum0',
+ sync='full', node_name="repair0", replaces="img1",
  target=quorum_repair_img, format=iotests.imgfmt)
 self.assert_qmp(result, 'return', {})
 
-result = self.vm.qmp('block-job-pause', device='quorum0')
+result = self.vm.qmp('block-job-pause', device='job0')
 self.assert_qmp(result, 'return', {})
 
 time.sleep(1)
@@ -879,10 +875,10 @@ class TestRepairQuorum(iotests.QMPTestCase):
 result = self.vm.qmp('query-block-jobs')
 self.assert_qmp(result, 'return[0]/offset', offset)
 
-result = self.vm.qmp('block-job-resume', device='quorum0')
+result = self.vm.qmp('block-job-resume', device='job0')
 self.assert_qmp(result, 'return', {})
 
-self.complete_and_wait(drive="quorum0")
+self.complete_and_wait(drive="job0")
 self.vm.shutdown()
 self.assertTrue(iotests.compare_images(quorum_img2, quorum_repair_img),
 'target image does not match source after mirroring')
@@ -894,7 +890,7 @@ class