xemu/python/qemu/machine
John Snow 50465f94d2 python/machine: raise VMLaunchFailure exception from launch()
This allows us to pack in some extra information about the failure,
which guarantees that if the caller did not *intentionally* cause a
failure (by capturing this Exception), some pretty good clues will be
printed at the bottom of the traceback information.

This will help make failures in the event of a non-negative return code
more obvious when they go unhandled; the current behavior in
_post_shutdown() is to print a warning message only in the event of
signal-based terminations (for negative return codes).

(Note: In Python, catching BaseException instead of Exception catches a
broader array of Exception events, including SystemExit and
KeyboardInterrupt. We do not want to "wrap" such exceptions as a
VMLaunchFailure, because that will 'downgrade' the exception from a
BaseException to a regular Exception. We do, however, want to perform
cleanup in either case, so catch on the broadest scope and
wrap-and-re-raise only in the more targeted scope.)

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-id: 20220201041134.1237016-3-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
2022-02-02 14:12:22 -05:00
..
__init__.py python: Fix broken ReST docstrings 2021-06-30 21:57:08 -04:00
console_socket.py python: create qemu packages 2021-06-01 16:21:21 -04:00
machine.py python/machine: raise VMLaunchFailure exception from launch() 2022-02-02 14:12:22 -05:00
py.typed python: expose typing information via PEP 561 2021-06-30 21:54:04 -04:00
qtest.py python, iotests: remove socket_scm_helper 2021-10-12 12:22:11 -04:00
README.rst tests/acceptance: rename tests acceptance to tests avocado 2021-11-08 17:00:22 +01:00

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.