]> Git Repo - qemu.git/commit
iotests: add hmp helper with logging
authorJohn Snow <[email protected]>
Tue, 31 Mar 2020 00:00:10 +0000 (20:00 -0400)
committerMax Reitz <[email protected]>
Tue, 5 May 2020 11:17:36 +0000 (13:17 +0200)
commit239bbcc0ae6ba24733839150955bdf8402e9ec55
tree55903433b03da09b3dc24917249dae08388451d1
parentb031e9a5a65ceef722ba506bc5ee69ec785dc5c5
iotests: add hmp helper with logging

Minor cleanup for HMP functions; helps with line length and consolidates
HMP helpers through one implementation function.

Although we are adding a universal toggle to turn QMP logging on or off,
many existing callers to hmp functions don't expect that output to be
logged, which causes quite a few changes in the test output.

For now, offer a use_log parameter.

Typing notes:

QMPResponse is just an alias for Dict[str, Any]. It holds no special
meanings and it is not a formal subtype of Dict[str, Any]. It is best
thought of as a lexical synonym.

We may well wish to add stricter subtypes in the future for certain
shapes of data that are not formalized as Python objects, at which point
we can simply retire the alias and allow mypy to more strictly check
usages of the name.

Signed-off-by: John Snow <[email protected]>
Message-Id: <20200331000014[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Reviewed-by: Kevin Wolf <[email protected]>
Signed-off-by: Max Reitz <[email protected]>
tests/qemu-iotests/iotests.py
This page took 0.026193 seconds and 4 git commands to generate.