aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2012-04-11 16:27:10 +0100
committerLuiz Capitulino <lcapitulino@redhat.com>2012-04-23 13:02:01 -0300
commitdb58f9c0605fa151b8c4d691aa9ff4c6cf0de62e (patch)
tree2fd3b1fe07300be2dfe446cb5aa0538f9dce9595 /tests
parent3c30dd5a68e9fee6af67cfd0d14ed7520820f36a (diff)
qmp: make block job command naming consistent
The block streaming and job commands used '_' instead of '-' for reasons of compatibility with libvirt, which already included support for the '_' naming. However, the semantics of block_job_cancel have changed and libvirt now needs to handle the new semantics. Since the old semantics were never in a QEMU release we can still rename the commands to use '-' instead of '_'. Libvirt is also happy because the new name can be used to distinguish QEMU binaries that support the latest block-job-cancel semantics from those that include a downstream block_job_cancel command. Therefore, let's apply the QAPI/QMP naming rules to the block streaming and job commands. QEMU 1.1 will be the first release with these commands so no upstream users can break. Note that HMP commands are left with '_' because that is the convention there. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/qemu-iotests/03012
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/qemu-iotests/030 b/tests/qemu-iotests/030
index 1faf984200..978fd82224 100755
--- a/tests/qemu-iotests/030
+++ b/tests/qemu-iotests/030
@@ -49,7 +49,7 @@ class TestSingleDrive(ImageStreamingTestCase):
def test_stream(self):
self.assert_no_active_streams()
- result = self.vm.qmp('block_stream', device='drive0')
+ result = self.vm.qmp('block-stream', device='drive0')
self.assert_qmp(result, 'return', {})
completed = False
@@ -68,7 +68,7 @@ class TestSingleDrive(ImageStreamingTestCase):
'image file not fully populated after streaming')
def test_device_not_found(self):
- result = self.vm.qmp('block_stream', device='nonexistent')
+ result = self.vm.qmp('block-stream', device='nonexistent')
self.assert_qmp(result, 'error/class', 'DeviceNotFound')
class TestStreamStop(ImageStreamingTestCase):
@@ -90,14 +90,14 @@ class TestStreamStop(ImageStreamingTestCase):
self.assert_no_active_streams()
- result = self.vm.qmp('block_stream', device='drive0')
+ result = self.vm.qmp('block-stream', device='drive0')
self.assert_qmp(result, 'return', {})
time.sleep(1)
events = self.vm.get_qmp_events(wait=False)
self.assertEqual(events, [], 'unexpected QMP event: %s' % events)
- self.vm.qmp('block_job_cancel', device='drive0')
+ self.vm.qmp('block-job-cancel', device='drive0')
self.assert_qmp(result, 'return', {})
cancelled = False
@@ -129,10 +129,10 @@ class TestSetSpeed(ImageStreamingTestCase):
def perf_test_set_speed(self):
self.assert_no_active_streams()
- result = self.vm.qmp('block_stream', device='drive0')
+ result = self.vm.qmp('block-stream', device='drive0')
self.assert_qmp(result, 'return', {})
- result = self.vm.qmp('block_job_set_speed', device='drive0', value=8 * 1024 * 1024)
+ result = self.vm.qmp('block-job-set-speed', device='drive0', value=8 * 1024 * 1024)
self.assert_qmp(result, 'return', {})
completed = False