mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00
qemu-iotests: add option to show qemu binary logs on stdout
Using the flag -p, allow the qemu binary to print to stdout. Also create the common function _close_qemu_log_file() to avoid accessing machine.py private fields directly and have duplicate code. Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-Id: <20210809090114.64834-16-eesposit@redhat.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
This commit is contained in:
parent
bd10a7397e
commit
eb7a91d07a
4 changed files with 24 additions and 6 deletions
|
@ -348,6 +348,11 @@ class QEMUMachine:
|
|||
if self._qmp_connection:
|
||||
self._qmp.accept(self._qmp_timer)
|
||||
|
||||
def _close_qemu_log_file(self) -> None:
|
||||
if self._qemu_log_file is not None:
|
||||
self._qemu_log_file.close()
|
||||
self._qemu_log_file = None
|
||||
|
||||
def _post_shutdown(self) -> None:
|
||||
"""
|
||||
Called to cleanup the VM instance after the process has exited.
|
||||
|
@ -360,9 +365,7 @@ class QEMUMachine:
|
|||
self._qmp.close()
|
||||
self._qmp_connection = None
|
||||
|
||||
if self._qemu_log_file is not None:
|
||||
self._qemu_log_file.close()
|
||||
self._qemu_log_file = None
|
||||
self._close_qemu_log_file()
|
||||
|
||||
self._load_io_log()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue