diff options
author | Kevin Wolf <kwolf@redhat.com> | 2018-04-30 19:09:46 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2018-05-23 14:30:51 +0200 |
commit | 1dac83f1a10c4c66858075970e199f4e4a8d8b71 (patch) | |
tree | 3bd1963ad8654e0644e09f2874a5caa2a15ae14c /tests/qemu-iotests/124 | |
parent | bf42508f24ee1368267b421e145fa90315b77936 (diff) |
job: Add JOB_STATUS_CHANGE QMP event
This adds a QMP event that is emitted whenever a job transitions from
one status to another.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/124')
-rwxr-xr-x | tests/qemu-iotests/124 | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/qemu-iotests/124 b/tests/qemu-iotests/124 index 8e76e62f93..3ea4ac53f5 100755 --- a/tests/qemu-iotests/124 +++ b/tests/qemu-iotests/124 @@ -151,10 +151,17 @@ class TestIncrementalBackupBase(iotests.QMPTestCase): return self.wait_qmp_backup(kwargs['device'], error) + def ignore_job_status_change_events(self): + while True: + e = self.vm.event_wait(name="JOB_STATUS_CHANGE") + if e['data']['status'] == 'null': + break + def wait_qmp_backup(self, device, error='Input/output error'): event = self.vm.event_wait(name="BLOCK_JOB_COMPLETED", match={'data': {'device': device}}) self.assertNotEqual(event, None) + self.ignore_job_status_change_events() try: failure = self.dictpath(event, 'data/error') @@ -172,6 +179,7 @@ class TestIncrementalBackupBase(iotests.QMPTestCase): event = self.vm.event_wait(name='BLOCK_JOB_CANCELLED', match={'data': {'device': device}}) self.assertNotEqual(event, None) + self.ignore_job_status_change_events() def create_anchor_backup(self, drive=None): |