]> www.infradead.org Git - users/dwmw2/qemu.git/commit
iotests: fix wait_until_completed()
authorPeter Xu <peterx@redhat.com>
Sun, 8 Apr 2018 03:05:42 +0000 (11:05 +0800)
committerEric Blake <eblake@redhat.com>
Tue, 10 Apr 2018 12:42:48 +0000 (07:42 -0500)
commitc3988519c4fc3e458fbac4f7814dd775ef4a68d7
tree6a62f4ffe09424d7cd33ab4557229b4bba203fdc
parentfb4fe32d5b6290deabe752b51cc1cc2a9e8573db
iotests: fix wait_until_completed()

If there are more than one events, wait_until_completed() might return
the 2nd event even if the 1st event is JOB_COMPLETED, since the for loop
will continue to run even if completed is set to True.

It never happened before, but it can be triggered when OOB is enabled
due to the RESUME startup message. Fix that up.

Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20180408030542.17855-1-peterx@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
tests/qemu-iotests/iotests.py