mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
blockdev: Mark {insert, remove}-medium experimental
While in the long term we want throttling to be its own block filter BDS, in the short term we want it to be part of the BB instead of a BDS; even in the long term we may want legacy throttling to be automatically tied to the BB. blockdev-insert-medium and blockdev-remove-medium do not retain throttling information in the BB (deliberately so). Therefore, using them means tying this information to a BDS, which would break the model described above. (The same applies to other flags such as detect_zeroes.) We probably want to move this information to the BB or its own filter BDS before blockdev-{insert,remove}-medium can be considered completely stable. Therefore, mark these functions experimental for the time being. Suggested-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Acked-by: Markus Armbruster <armbru@redhat.com> Acked-by: Kevin Wolf <kwolf@redhat.com> Message-id: 1449847385-13986-2-git-send-email-mreitz@redhat.com Reviewed-by: Eric Blake <eblake@redhat.com> [PMM: fixed format nit (underlining) in qmp-commands.hx] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
3fd3c4b37c
commit
6e0abc251d
5 changed files with 45 additions and 33 deletions
|
@ -208,14 +208,14 @@ class GeneralChangeTestsBaseClass(ChangeBaseClass):
|
|||
else:
|
||||
self.assert_qmp(result, 'return[0]/inserted/image/filename', old_img)
|
||||
|
||||
result = self.vm.qmp('blockdev-remove-medium', device='drive0')
|
||||
result = self.vm.qmp('x-blockdev-remove-medium', device='drive0')
|
||||
self.assert_qmp(result, 'return', {})
|
||||
|
||||
result = self.vm.qmp('query-block')
|
||||
self.assert_qmp(result, 'return[0]/tray_open', True)
|
||||
self.assert_qmp_absent(result, 'return[0]/inserted')
|
||||
|
||||
result = self.vm.qmp('blockdev-insert-medium', device='drive0',
|
||||
result = self.vm.qmp('x-blockdev-insert-medium', device='drive0',
|
||||
node_name='new')
|
||||
self.assert_qmp(result, 'return', {})
|
||||
|
||||
|
@ -243,7 +243,7 @@ class GeneralChangeTestsBaseClass(ChangeBaseClass):
|
|||
# Empty floppy drive
|
||||
return
|
||||
|
||||
result = self.vm.qmp('blockdev-remove-medium', device='drive0')
|
||||
result = self.vm.qmp('x-blockdev-remove-medium', device='drive0')
|
||||
self.assert_qmp(result, 'error/class', 'GenericError')
|
||||
|
||||
def test_insert_on_closed(self):
|
||||
|
@ -258,7 +258,7 @@ class GeneralChangeTestsBaseClass(ChangeBaseClass):
|
|||
'driver': 'file'}})
|
||||
self.assert_qmp(result, 'return', {})
|
||||
|
||||
result = self.vm.qmp('blockdev-insert-medium', device='drive0',
|
||||
result = self.vm.qmp('x-blockdev-insert-medium', device='drive0',
|
||||
node_name='new')
|
||||
self.assert_qmp(result, 'error/class', 'GenericError')
|
||||
|
||||
|
@ -289,7 +289,7 @@ class TestInitiallyFilled(GeneralChangeTestsBaseClass):
|
|||
|
||||
self.wait_for_open()
|
||||
|
||||
result = self.vm.qmp('blockdev-insert-medium', device='drive0',
|
||||
result = self.vm.qmp('x-blockdev-insert-medium', device='drive0',
|
||||
node_name='new')
|
||||
self.assert_qmp(result, 'error/class', 'GenericError')
|
||||
|
||||
|
@ -311,7 +311,7 @@ class TestInitiallyEmpty(GeneralChangeTestsBaseClass):
|
|||
|
||||
self.wait_for_open()
|
||||
|
||||
result = self.vm.qmp('blockdev-remove-medium', device='drive0')
|
||||
result = self.vm.qmp('x-blockdev-remove-medium', device='drive0')
|
||||
# Should be a no-op
|
||||
self.assert_qmp(result, 'return', {})
|
||||
|
||||
|
@ -604,14 +604,14 @@ class TestChangeReadOnly(ChangeBaseClass):
|
|||
self.assert_qmp(result, 'return[0]/inserted/ro', False)
|
||||
self.assert_qmp(result, 'return[0]/inserted/image/filename', old_img)
|
||||
|
||||
result = self.vm.qmp('blockdev-remove-medium', device='drive0')
|
||||
result = self.vm.qmp('x-blockdev-remove-medium', device='drive0')
|
||||
self.assert_qmp(result, 'return', {})
|
||||
|
||||
result = self.vm.qmp('query-block')
|
||||
self.assert_qmp(result, 'return[0]/tray_open', True)
|
||||
self.assert_qmp_absent(result, 'return[0]/inserted')
|
||||
|
||||
result = self.vm.qmp('blockdev-insert-medium', device='drive0',
|
||||
result = self.vm.qmp('x-blockdev-insert-medium', device='drive0',
|
||||
node_name='new')
|
||||
self.assert_qmp(result, 'return', {})
|
||||
|
||||
|
@ -653,7 +653,7 @@ class TestBlockJobsAfterCycle(ChangeBaseClass):
|
|||
|
||||
# For device-less BBs, calling blockdev-open-tray or blockdev-close-tray
|
||||
# is not necessary
|
||||
result = self.vm.qmp('blockdev-remove-medium', device='drive0')
|
||||
result = self.vm.qmp('x-blockdev-remove-medium', device='drive0')
|
||||
self.assert_qmp(result, 'return', {})
|
||||
|
||||
result = self.vm.qmp('query-block')
|
||||
|
@ -666,7 +666,7 @@ class TestBlockJobsAfterCycle(ChangeBaseClass):
|
|||
'driver': 'file'}})
|
||||
self.assert_qmp(result, 'return', {})
|
||||
|
||||
result = self.vm.qmp('blockdev-insert-medium', device='drive0',
|
||||
result = self.vm.qmp('x-blockdev-insert-medium', device='drive0',
|
||||
node_name='node0')
|
||||
self.assert_qmp(result, 'return', {})
|
||||
|
||||
|
|
|
@ -174,7 +174,7 @@ class TestBlockdevDel(iotests.QMPTestCase):
|
|||
def insertDrive(self, backend, node):
|
||||
self.checkBlockBackend(backend, None)
|
||||
self.checkBlockDriverState(node)
|
||||
result = self.vm.qmp('blockdev-insert-medium',
|
||||
result = self.vm.qmp('x-blockdev-insert-medium',
|
||||
device = backend, node_name = node)
|
||||
self.assert_qmp(result, 'return', {})
|
||||
self.checkBlockBackend(backend, node)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue