aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/296
diff options
context:
space:
mode:
Diffstat (limited to 'tests/qemu-iotests/296')
-rwxr-xr-xtests/qemu-iotests/2968
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/qemu-iotests/296 b/tests/qemu-iotests/296
index 099a3ee..f80ef34 100755
--- a/tests/qemu-iotests/296
+++ b/tests/qemu-iotests/296
@@ -174,8 +174,12 @@ class EncryptionSetupTestCase(iotests.QMPTestCase):
}
result = vm.qmp('x-blockdev-amend', **args)
- assert result['return'] == {}
- vm.run_job('job0')
+ iotests.log(result)
+ # Run the job only if it was created
+ event = ('JOB_STATUS_CHANGE',
+ {'data': {'id': 'job0', 'status': 'created'}})
+ if vm.events_wait([event], timeout=0.0) is not None:
+ vm.run_job('job0')
# test that when the image opened by two qemu processes,
# neither of them can update the encryption keys