From nobody Sat Sep 28 22:55:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1547550753982700.8665033717383; Tue, 15 Jan 2019 03:12:33 -0800 (PST) Received: from localhost ([127.0.0.1]:37916 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjMdx-0003Tx-9F for importer@patchew.org; Tue, 15 Jan 2019 06:12:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56024) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjMcJ-0002Yz-J3 for qemu-devel@nongnu.org; Tue, 15 Jan 2019 06:10:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjMcI-0003Bl-Q6 for qemu-devel@nongnu.org; Tue, 15 Jan 2019 06:10:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56102) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gjMcB-00030q-OQ; Tue, 15 Jan 2019 06:10:39 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5AB71356F5; Tue, 15 Jan 2019 11:10:36 +0000 (UTC) Received: from localhost (ovpn-117-211.ams2.redhat.com [10.36.117.211]) by smtp.corp.redhat.com (Postfix) with ESMTP id D573B5C1B4; Tue, 15 Jan 2019 11:10:35 +0000 (UTC) From: Stefan Hajnoczi To: qemu-devel@nongnu.org Date: Tue, 15 Jan 2019 11:10:07 +0000 Message-Id: <20190115111007.27159-3-stefanha@redhat.com> In-Reply-To: <20190115111007.27159-1-stefanha@redhat.com> References: <20190115111007.27159-1-stefanha@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 15 Jan 2019 11:10:36 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 2/2] iotests: add LUKS payload overhead to 178 qemu-img measure test X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Stefan Hajnoczi , qemu-block@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Stefan Hajnoczi Reviewed-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..23eb017ea1 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-secret= =3Dsec0 \ + -f "$fmt" -O "$IMGFMT" "$TEST_IMG" fi =20 echo diff --git a/tests/qemu-iotests/178.out.qcow2 b/tests/qemu-iotests/178.out.= 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