xemu/python/qemu
Robert Foley 0fc8f660c5 python/qemu: Add ConsoleSocket for optional use in QEMUMachine
We add the ConsoleSocket object, which has a socket interface
and which will consume all arriving characters on the
socket, placing them into an in memory buffer.
This will also provide those chars via recv() as
would a regular socket.
ConsoleSocket also has the option of dumping
the console bytes to a log file.

We also give QEMUMachine the option of using ConsoleSocket
to drain and to use for logging console to a file.
By default QEMUMachine does not use ConsoleSocket.

This is added in preparation for use by basevm.py in a later commit.
This is a workaround we found was needed for basevm.py since
there is a known issue where QEMU will hang waiting
for console characters to be consumed.

Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Cleber Rosa <crosa@redhat.com>
Signed-off-by: Robert Foley <robert.foley@linaro.org>
Reviewed-by: Peter Puhov <peter.puhov@linaro.org>
Acked-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20200601211421.1277-9-robert.foley@linaro.org>
Message-Id: <20200701135652.1366-13-alex.bennee@linaro.org>
2020-07-11 15:53:00 +01:00
..
__init__.py python/qemu: Remove unneeded imports in __init__ 2019-12-16 18:39:51 -05:00
.flake8 python/qemu: delint; add flake8 config 2020-05-31 18:25:30 +02:00
accel.py python/qemu: delint; add flake8 config 2020-05-31 18:25:30 +02:00
console_socket.py python/qemu: Add ConsoleSocket for optional use in QEMUMachine 2020-07-11 15:53:00 +01:00
machine.py python/qemu: Add ConsoleSocket for optional use in QEMUMachine 2020-07-11 15:53:00 +01:00
pylintrc python/qemu: delint and add pylintrc 2020-05-31 18:25:30 +02:00
qmp.py python/qemu/qmp: assert sockfile is not None 2020-05-31 18:25:31 +02:00
qtest.py python/qemu/qtest: Check before accessing _qtest 2020-05-31 18:25:31 +02:00