mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
tests/functional: add a QMP backdoor for debugging stalled tests
Support the QEMU_TEST_QMP_BACKDOOR=backdoor.sock env variable as a way to get a QMP backdoor for debugging a stalled QEMU test. Most typically this would be used if running the tests directly: $ QEMU_TEST_QMP_BACKDOOR=backdoor.sock \ QEMU_TEST_QEMU_BINARY=./build/qemu-system-arm \ PYTHONPATH=./python \ ./tests/functional/test_arm_tuxrun.py And then, when the test stalls, in a second shell run: $ ./scripts/qmp/qmp-shell backdoor.sock Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20241121154218.1423005-18-berrange@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20241121165806.476008-18-alex.bennee@linaro.org>
This commit is contained in:
parent
97d79319f0
commit
1a8755a51e
2 changed files with 17 additions and 0 deletions
|
@ -176,6 +176,16 @@ primarily depend on the value of the ``qemu_bin`` class attribute.
|
|||
If it is not explicitly set by the test code, its default value will
|
||||
be the result the QEMU_TEST_QEMU_BINARY environment variable.
|
||||
|
||||
Debugging hung QEMU
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
When test cases go wrong it may be helpful to debug a stalled QEMU
|
||||
process. While the QEMUMachine class owns the primary QMP monitor
|
||||
socket, it is possible to request a second QMP monitor be created
|
||||
by setting the ``QEMU_TEST_QMP_BACKDOOR`` env variable to refer
|
||||
to a UNIX socket name. The ``qmp-shell`` command can then be
|
||||
attached to the stalled QEMU to examine its live state.
|
||||
|
||||
Attribute reference
|
||||
-------------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue