Peter Xu c3988519c4 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>
2018-04-10 07:42:48 -05:00
..
2018-02-22 15:44:07 -08:00
2017-09-22 10:46:25 +08:00
2018-03-21 15:13:40 +01:00
2018-03-26 14:17:04 -07:00
2017-11-17 18:21:30 +01:00
2017-10-20 13:32:10 +02:00
2017-10-20 13:32:10 +02:00
2018-02-09 05:05:11 +01:00
2018-03-06 14:01:27 +01:00
2018-02-08 09:22:03 +08:00
2017-09-05 22:34:40 +02:00
2017-12-20 22:01:24 +08:00
2018-02-21 07:24:50 -05:00