Signed-off-by: Marc-André Lureau <[email protected]>
---
 tests/qemu-iotests/281 | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/tests/qemu-iotests/281 b/tests/qemu-iotests/281
index 5f3050f50d0b..65d34b427a43 100755
--- a/tests/qemu-iotests/281
+++ b/tests/qemu-iotests/281
@@ -273,9 +273,7 @@ class TestYieldingAndTimers(iotests.QMPTestCase):
         self.stop_nbd_export()
         self.create_nbd_export()
 
-        result = self.vm.qmp('human-monitor-command',
-                             command_line='qemu-io nbd "write 0 512"')
-        self.assert_qmp(result, 'return', '')
+        self.vm.qmp_qemu_io('nbd', 'write 0 512')
 
         # Reconnect is done, so the reconnect delay timer should be gone.
         # (This is similar to how the open timer should be gone after open,
@@ -303,9 +301,7 @@ class TestYieldingAndTimers(iotests.QMPTestCase):
         # Do some I/O that will be throttled by the QSD, so that the network
         # connection hopefully will yield here.  When it is resumed, it must
         # then be resumed in the I/O thread's AioContext.
-        result = self.vm.qmp('human-monitor-command',
-                             command_line='qemu-io nbd "read 0 128K"')
-        self.assert_qmp(result, 'return', '')
+        self.vm.qmp_qemu_io('nbd', 'read 0 128K')
 
     def create_nbd_export(self):
         assert self.qsd is None
@@ -336,5 +332,4 @@ class TestYieldingAndTimers(iotests.QMPTestCase):
 if __name__ == '__main__':
     iotests.main(supported_fmts=['qcow2'],
                  supported_protocols=['file'],
-                 unsupported_imgopts=['compat'],
-                 require_hmp=True)
+                 unsupported_imgopts=['compat'])

-- 
2.56.0.rc0.29.g47ce80527c56


Reply via email to