diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2017-06-23 17:24:13 +0100 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2017-07-11 17:44:56 +0200 |
commit | 426d52d88c54cf048385eeb73d802dd87c1317bd (patch) | |
tree | 14b7c815b42b02035efd05df6f8b41a8c9063964 /tests/qemu-iotests/087 | |
parent | 4652b8f3e1ec91bb9d6f00e40df7f96d1f1aafee (diff) |
qcow2: add iotests to cover LUKS encryption support
This extends the 087 iotest to cover LUKS encryption when doing
blockdev-add.
Two further tests are added to validate read/write of LUKS
encrypted images with a single file and with a backing file.
Reviewed-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 20170623162419.26068-15-berrange@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/087')
-rwxr-xr-x | tests/qemu-iotests/087 | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/tests/qemu-iotests/087 b/tests/qemu-iotests/087 index 1d595b2737..f8e4903f4f 100755 --- a/tests/qemu-iotests/087 +++ b/tests/qemu-iotests/087 @@ -119,7 +119,7 @@ run_qemu <<EOF EOF echo -echo === Encrypted image === +echo === Encrypted image QCow === echo _make_test_img --object secret,id=sec0,data=123456 -o encryption=on,encrypt.key-secret=sec0 $size @@ -152,6 +152,39 @@ run_qemu <<EOF EOF echo +echo === Encrypted image LUKS === +echo + +_make_test_img --object secret,id=sec0,data=123456 -o encrypt.format=luks,encrypt.key-secret=sec0 $size +run_qemu <<EOF +{ "execute": "qmp_capabilities" } +{ "execute": "object-add", + "arguments": { + "qom-type": "secret", + "id": "sec0", + "props": { + "data": "123456" + } + } +} +{ "execute": "blockdev-add", + "arguments": { + "driver": "$IMGFMT", + "node-name": "disk", + "file": { + "driver": "file", + "filename": "$TEST_IMG" + }, + "encrypt": { + "format": "luks", + "key-secret": "sec0" + } + } + } +{ "execute": "quit" } +EOF + +echo echo === Missing driver === echo |