[PATCH 0/5] python/aqmp: improve support for device-crash-test

John Snow posted 5 patches 4 years, 2 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20211111143719.2162525-1-jsnow@redhat.com
Maintainers: Cleber Rosa <crosa@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>, John Snow <jsnow@redhat.com>
python/qemu/aqmp/protocol.py | 24 ++++++++++++++++++------
scripts/device-crash-test    | 33 +++++++++++++++++++++++++--------
2 files changed, 43 insertions(+), 14 deletions(-)
[PATCH 0/5] python/aqmp: improve support for device-crash-test
Posted by John Snow 4 years, 2 months ago
When I switched machine.py over to using AQMP, I caused a regression in
device-crash-test that caused many spurious errors to be printed during
the test, obscuring real test failure cases.

This series fixes the vast majority of false positives, though there is
one remaining bug in machine.py itself that would affect both
A/QMP. Rarely, when QMP fails to accept a connection from the server,
machine.py may enter the teardown phase quickly enough such that we do
not yet have an exitcode from the VM process. In these cases,
device-crash-test presumes there to be a more serious failure. That
issue is going to take slightly longer to fix and test, so I am instead
offering the majority of fixes now.

In the meantime, switching over to the legacy QMP module is possible by
setting the environment variable 'QEMU_PYTHON_LEGACY_QMP' to '1' (or any
non-empty string).

Reported-by: Thomas Huth <thuth@redhat.com>

John Snow (5):
  python/aqmp: Fix disconnect during capabilities negotiation
  python/aqmp: fix ConnectError string method
  scripts/device-crash-test: simplify Exception handling
  scripts/device-crash-test: don't emit AQMP connection errors to stdout
  scripts/device-crash-test: hide tracebacks for QMP connect errors

 python/qemu/aqmp/protocol.py | 24 ++++++++++++++++++------
 scripts/device-crash-test    | 33 +++++++++++++++++++++++++--------
 2 files changed, 43 insertions(+), 14 deletions(-)

-- 
2.31.1



Re: [PATCH 0/5] python/aqmp: improve support for device-crash-test
Posted by Thomas Huth 4 years, 2 months ago
On 11/11/2021 15.37, John Snow wrote:
> When I switched machine.py over to using AQMP, I caused a regression in
> device-crash-test that caused many spurious errors to be printed during
> the test, obscuring real test failure cases.
> 
> This series fixes the vast majority of false positives, though there is
> one remaining bug in machine.py itself that would affect both
> A/QMP. Rarely, when QMP fails to accept a connection from the server,
> machine.py may enter the teardown phase quickly enough such that we do
> not yet have an exitcode from the VM process. In these cases,
> device-crash-test presumes there to be a more serious failure. That
> issue is going to take slightly longer to fix and test, so I am instead
> offering the majority of fixes now.
> 
> In the meantime, switching over to the legacy QMP module is possible by
> setting the environment variable 'QEMU_PYTHON_LEGACY_QMP' to '1' (or any
> non-empty string).
> 
> Reported-by: Thomas Huth <thuth@redhat.com>
> 
> John Snow (5):
>    python/aqmp: Fix disconnect during capabilities negotiation
>    python/aqmp: fix ConnectError string method
>    scripts/device-crash-test: simplify Exception handling
>    scripts/device-crash-test: don't emit AQMP connection errors to stdout
>    scripts/device-crash-test: hide tracebacks for QMP connect errors
> 
>   python/qemu/aqmp/protocol.py | 24 ++++++++++++++++++------
>   scripts/device-crash-test    | 33 +++++++++++++++++++++++++--------
>   2 files changed, 43 insertions(+), 14 deletions(-)

Works, for me, thank you very much!

Tested-by: Thomas Huth <thuth@redhat.com>