xemu/python/qemu/machine
Nicholas Piggin f0ec14c78c tests/avocado: Fix console data loss
Occasionally some avocado tests will fail waiting for console line
despite the machine running correctly. Console data goes missing, as can
be seen in the console log. This is due to _console_interaction calling
makefile() on the console socket each time it is invoked, which must be
losing old buffer contents when going out of scope.

It is not enough to makefile() with buffered=0. That helps significantly
but data loss is still possible. My guess is that readline() has a line
buffer even when the file is in unbuffered mode, that can eat data.

Fix this by providing a console file that persists for the life of the
console.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: "Daniel P. Berrangé" <berrange@redhat.com>
Message-Id: <20230912131340.405619-1-npiggin@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Acked-by: John Snow <jsnow@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230914155422.426639-9-alex.bennee@linaro.org>
2023-09-20 15:06:33 +01:00
..
README.rst tests/acceptance: rename tests acceptance to tests avocado 2021-11-08 17:00:22 +01:00
__init__.py python: Fix broken ReST docstrings 2021-06-30 21:57:08 -04:00
console_socket.py Fix some typos 2023-01-24 13:37:12 -05:00
machine.py tests/avocado: Fix console data loss 2023-09-20 15:06:33 +01:00
py.typed python: expose typing information via PEP 561 2021-06-30 21:54:04 -04:00
qtest.py Fix some typos 2023-01-24 13:37:12 -05:00

README.rst

qemu.machine package
====================

This package provides core utilities used for testing and debugging
QEMU. It is used by the iotests, vm tests, avocado tests, and several
other utilities in the ./scripts directory. It is not a fully-fledged
SDK and it is subject to change at any time.

See the documentation in ``__init__.py`` for more information.