diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> | 2023-10-06 18:41:17 +0300 |
---|---|---|
committer | John Snow <jsnow@redhat.com> | 2023-10-12 14:21:43 -0400 |
commit | 3a8736cf1e069c2b93c194d71062f911ff2571e7 (patch) | |
tree | 4498dd906574932e1509e4fc1c253f34949a7b28 /tests | |
parent | 4e620ff48f31493d61c98c6770595b5b242b837d (diff) |
iotests: QemuStorageDaemon: add cmd() method like in QEMUMachine.
Add similar method for consistency.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20231006154125.1068348-8-vsementsov@yandex-team.ru
Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/qemu-iotests/iotests.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 0c061d8986..ee7b6ddeff 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -38,7 +38,7 @@ import unittest from contextlib import contextmanager from qemu.machine import qtest -from qemu.qmp.legacy import QMPMessage, QEMUMonitorProtocol +from qemu.qmp.legacy import QMPMessage, QMPReturnValue, QEMUMonitorProtocol from qemu.utils import VerboseProcessError # Use this logger for logging messages directly from the iotests module @@ -466,6 +466,11 @@ class QemuStorageDaemon: assert self._qmp is not None return self._qmp + def cmd(self, cmd: str, args: Optional[Dict[str, object]] = None) \ + -> QMPReturnValue: + assert self._qmp is not None + return self._qmp.cmd(cmd, **(args or {})) + def stop(self, kill_signal=15): self._p.send_signal(kill_signal) self._p.wait() |