iotests: Make 144 deterministic again
commitcc29c12ec629ba68a4a6cb7d165c94cc8502815a
authorKevin Wolf <kwolf@redhat.com>
Fri, 9 Feb 2024 17:31:03 +0000 (9 18:31 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 15 Feb 2024 16:40:06 +0000 (15 16:40 +0000)
tree04792d86f60ac9d3e6f8ee910ed1f909875da41f
parent5767815218efd3cbfd409505ed824d5f356044ae
iotests: Make 144 deterministic again

Since commit effd60c8 changed how QMP commands are processed, the order
of the block-commit return value and job events in iotests 144 wasn't
fixed and more and caused the test to fail intermittently.

Change the test to cache events first and then print them in a
predefined order.

Waiting three times for JOB_STATUS_CHANGE is a bit uglier than just
waiting for the JOB_STATUS_CHANGE that has "status": "ready", but the
tooling we have doesn't seem to allow the latter easily.

Fixes: effd60c878176bcaf97fa7ce2b12d04bb8ead6f7
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2126
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20240209173103.239994-1-kwolf@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
tests/qemu-iotests/144
tests/qemu-iotests/144.out