From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:38967) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gyI6V-0001zK-Hm for qemu-devel@nongnu.org; Mon, 25 Feb 2019 10:23:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gyI6R-0002EF-Ac for qemu-devel@nongnu.org; Mon, 25 Feb 2019 10:23:38 -0500 From: Kevin Wolf Date: Mon, 25 Feb 2019 16:20:51 +0100 Message-Id: <20190225152053.15976-70-kwolf@redhat.com> In-Reply-To: <20190225152053.15976-1-kwolf@redhat.com> References: <20190225152053.15976-1-kwolf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 69/71] iotests: add LUKS payload overhead to 178 qemu-img measure test List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org Cc: kwolf@redhat.com, peter.maydell@linaro.org, qemu-devel@nongnu.org From: Stefan Hajnoczi The previous patch includes the LUKS payload overhead into the qemu-img measure calculation for qcow2. Update qemu-iotests 178 to exercise this new code path. Reviewed-by: Max Reitz Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Stefan Hajnoczi Message-id: 20190218104525.23674-3-stefanha@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/178 | 8 ++++++++ tests/qemu-iotests/178.out.qcow2 | 24 ++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/tests/qemu-iotests/178 b/tests/qemu-iotests/178 index 3f4b4a4564..927bf06e4d 100755 --- a/tests/qemu-iotests/178 +++ b/tests/qemu-iotests/178 @@ -142,6 +142,14 @@ for ofmt in human json; do # The backing file doesn't need to exist :) $QEMU_IMG measure --output=3D$ofmt -o backing_file=3Dx \ -f "$fmt" -O "$IMGFMT" "$TEST_IMG" + + echo + echo "=3D=3D $fmt input image and LUKS encryption =3D=3D" + echo + $QEMU_IMG measure --output=3D$ofmt \ + --object secret,id=3Dsec0,data=3Dbase \ + -o encrypt.format=3Dluks,encrypt.key-secre= t=3Dsec0,encrypt.iter-time=3D10 \ + -f "$fmt" -O "$IMGFMT" "$TEST_IMG" fi =20 echo diff --git a/tests/qemu-iotests/178.out.qcow2 b/tests/qemu-iotests/178.ou= t.qcow2 index d42d4a4597..55a8dc926f 100644 --- a/tests/qemu-iotests/178.out.qcow2 +++ b/tests/qemu-iotests/178.out.qcow2 @@ -68,6 +68,11 @@ converted image file size in bytes: 458752 required size: 1074135040 fully allocated size: 1074135040 =20 +=3D=3D qcow2 input image and LUKS encryption =3D=3D + +required size: 2686976 +fully allocated size: 1076232192 + =3D=3D qcow2 input image and preallocation (human) =3D=3D =20 required size: 1074135040 @@ -114,6 +119,11 @@ converted image file size in bytes: 524288 required size: 1074135040 fully allocated size: 1074135040 =20 +=3D=3D raw input image and LUKS encryption =3D=3D + +required size: 2686976 +fully allocated size: 1076232192 + =3D=3D raw input image and preallocation (human) =3D=3D =20 required size: 1074135040 @@ -205,6 +215,13 @@ converted image file size in bytes: 458752 "fully-allocated": 1074135040 } =20 +=3D=3D qcow2 input image and LUKS encryption =3D=3D + +{ + "required": 2686976, + "fully-allocated": 1076232192 +} + =3D=3D qcow2 input image and preallocation (json) =3D=3D =20 { @@ -263,6 +280,13 @@ converted image file size in bytes: 524288 "fully-allocated": 1074135040 } =20 +=3D=3D raw input image and LUKS encryption =3D=3D + +{ + "required": 2686976, + "fully-allocated": 1076232192 +} + =3D=3D raw input image and preallocation (json) =3D=3D =20 { --=20 2.20.1