iotests: 153: Wait for an answer to QMP commands
authorSergio Lopez <slp@redhat.com>
Fri, 15 Mar 2019 11:46:55 +0000 (12:46 +0100)
committerKevin Wolf <kwolf@redhat.com>
Tue, 19 Mar 2019 14:49:29 +0000 (15:49 +0100)
commit9cd97956cfdde85d5887f2ea54ff598f615ee1b1
tree0b51165694126718dd545f23b1d5eb2e89343177
parent2345bde647a179ac88723e8e0c2fc1643b3a7a7e
iotests: 153: Wait for an answer to QMP commands

There are various actions in this test that must be executed
sequentially, as the result of it depends on the state triggered by the
previous one.

If the last argument of _send_qemu_cmd() is an empty string, it just
sends the QMP commands without waiting for an answer. While unlikely, it
may happen that the next action in the test gets invoked before QEMU
processes the QMP request.

This issue seems to be easier to reproduce on servers with limited
resources or highly loaded.

With this change, we wait for an answer on all _send_qemu_cmd() calls.

Signed-off-by: Sergio Lopez <slp@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
tests/qemu-iotests/153
tests/qemu-iotests/153.out