Signed-off-by: Marc-André Lureau <[email protected]>
---
tests/qemu-iotests/tests/backup-discard-source | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/tests/qemu-iotests/tests/backup-discard-source
b/tests/qemu-iotests/tests/backup-discard-source
index 80ea32c46e3f..3ccd616d197e 100755
--- a/tests/qemu-iotests/tests/backup-discard-source
+++ b/tests/qemu-iotests/tests/backup-discard-source
@@ -87,11 +87,13 @@ class TestBackup(iotests.QMPTestCase):
def tearDown(self):
# That should fail, because region is discarded
- result = self.vm.hmp_qemu_io('access', 'read 0 1M')
+ result = self.vm.qmp('x-qemu-io', device='access',
+ command='read 0 1M')
self.vm.shutdown()
- self.assertIn('read failed: Permission denied', result['return'])
+ self.assertIn('read failed: Permission denied',
+ result['error']['desc'])
# Final check that temp image is empty
mapping = qemu_img_map(temp_img)
@@ -127,8 +129,7 @@ class TestBackup(iotests.QMPTestCase):
removed from temp
"""
# Trigger copy-before-write operation
- result = self.vm.hmp_qemu_io('cbw', 'write 0 1M')
- self.assert_qmp(result, 'return', '')
+ self.vm.qmp_qemu_io('cbw', 'write 0 1M')
# Check that data is written to temporary image
self.assertEqual(self.get_bitmap_count(), size)
@@ -150,8 +151,7 @@ class TestBackup(iotests.QMPTestCase):
self.vm.cmd('block-dirty-bitmap-clear', self.bitmap)
# Try trigger copy-before-write operation
- result = self.vm.hmp_qemu_io('cbw', 'write 0 1M')
- self.assert_qmp(result, 'return', '')
+ self.vm.qmp_qemu_io('cbw', 'write 0 1M')
# Check that data is not written to temporary image, as region
# is discarded from copy-before-write process
@@ -160,5 +160,4 @@ class TestBackup(iotests.QMPTestCase):
if __name__ == '__main__':
iotests.main(supported_fmts=['qcow2'],
- supported_protocols=['file'],
- require_hmp=True)
+ supported_protocols=['file'])
--
2.56.0.rc0.29.g47ce80527c56