aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/296
diff options
context:
space:
mode:
authorAlberto Garcia <berto@igalia.com>2021-07-08 13:47:07 +0200
committerKevin Wolf <kwolf@redhat.com>2021-07-09 13:19:11 +0200
commit3908b7a8994fa5ef7a89aa58cd5a02fc58141592 (patch)
tree2cc8053b3f32ea3e1123aa8e05d795cf5a33d1a8 /tests/qemu-iotests/296
parent6cf42ca2f9782f0335abf3e6b611fbced40cd099 (diff)
block: Support multiple reopening with x-blockdev-reopen
[ kwolf: Fixed AioContext locking ] Signed-off-by: Alberto Garcia <berto@igalia.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20210708114709.206487-5-kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/296')
-rwxr-xr-xtests/qemu-iotests/2969
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/qemu-iotests/296 b/tests/qemu-iotests/296
index 7c65e987a1..fa07b98bb4 100755
--- a/tests/qemu-iotests/296
+++ b/tests/qemu-iotests/296
@@ -120,8 +120,7 @@ class EncryptionSetupTestCase(iotests.QMPTestCase):
command = 'x-blockdev-reopen' if reOpen else 'blockdev-add'
- result = vm.qmp(command, **
- {
+ opts = {
'driver': iotests.imgfmt,
'node-name': id,
'read-only': readOnly,
@@ -131,7 +130,11 @@ class EncryptionSetupTestCase(iotests.QMPTestCase):
'filename': test_img,
}
}
- )
+
+ if reOpen:
+ result = vm.qmp(command, options=[opts])
+ else:
+ result = vm.qmp(command, **opts)
self.assert_qmp(result, 'return', {})