From: Vladimir Sementsov-Ogievskiy Date: Tue, 24 Aug 2021 08:38:51 +0000 (+0300) Subject: iotests.py: hmp_qemu_io: support qdev X-Git-Tag: v6.2.0-rc0~121^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e89c0c8de38f8c2dca22293aaf5e2c8ad74eb39c;p=thirdparty%2Fqemu.git iotests.py: hmp_qemu_io: support qdev Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow Message-Id: <20210824083856.17408-30-vsementsov@virtuozzo.com> Signed-off-by: Hanna Reitz --- diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 4c8971d946b..11276f380a5 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: