diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2021-08-24 11:38:51 +0300 |
---|---|---|
committer | Hanna Reitz <hreitz@redhat.com> | 2021-09-01 14:38:08 +0200 |
commit | e89c0c8de38f8c2dca22293aaf5e2c8ad74eb39c (patch) | |
tree | 148dda575817151be6c239af72b84a4351961571 /tests | |
parent | c88f078948008e9fb700c96eb957b895ea1a873b (diff) |
iotests.py: hmp_qemu_io: support qdev
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-Id: <20210824083856.17408-30-vsementsov@virtuozzo.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/qemu-iotests/iotests.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 4c8971d946..11276f380a 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -696,9 +696,10 @@ class VM(qtest.QEMUQtestMachine): self.hmp(f'qemu-io {drive} "remove_break bp_{drive}"') def hmp_qemu_io(self, drive: str, cmd: str, - use_log: bool = False) -> QMPMessage: + use_log: bool = False, qdev: bool = False) -> QMPMessage: """Write to a given drive using an HMP command""" - return self.hmp(f'qemu-io {drive} "{cmd}"', use_log=use_log) + d = '-d ' if qdev else '' + return self.hmp(f'qemu-io {d}{drive} "{cmd}"', use_log=use_log) def flatten_qmp_object(self, obj, output=None, basestr=''): if output is None: |