]> git.proxmox.com Git - mirror_qemu.git/commit
iotests: port 141 to Python for reliable QMP testing
authorStefan Hajnoczi <stefanha@redhat.com>
Thu, 18 Jan 2024 14:48:22 +0000 (09:48 -0500)
committerKevin Wolf <kwolf@redhat.com>
Fri, 26 Jan 2024 10:16:58 +0000 (11:16 +0100)
commit9ee2dd4c22a3639c5462b3fc20df60c005c3de64
tree187917bfe6f5d5c605698834f38094d922c6dc18
parentda62b507a20510d819bcfbe8f5e573409b954006
iotests: port 141 to Python for reliable QMP testing

The common.qemu bash functions allow tests to interact with the QMP
monitor of a QEMU process. I spent two days trying to update 141 when
the order of the test output changed, but found it would still fail
occassionally because printf() and QMP events race with synchronous QMP
communication.

I gave up and ported 141 to the existing Python API for QMP tests. The
Python API is less affected by the order in which QEMU prints output
because it does not print all QMP traffic by default.

The next commit changes the order in which QMP messages are received.
Make 141 reliable first.

Cc: Hanna Czenczek <hreitz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-ID: <20240118144823.1497953-3-stefanha@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
tests/qemu-iotests/141
tests/qemu-iotests/141.out