From nobody Mon Apr 14 03:27:28 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.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 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1522075490251128.92747935870523; Mon, 26 Mar 2018 07:44:50 -0700 (PDT) Received: from localhost ([::1]:57107 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+importer=patchew.org@nongnu.org>) id 1f0TMf-0002Hj-Cu for importer@patchew.org; Mon, 26 Mar 2018 10:44:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45542) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <kwolf@redhat.com>) id 1f0TEV-00035l-5S for qemu-devel@nongnu.org; Mon, 26 Mar 2018 10:36:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <kwolf@redhat.com>) id 1f0TEU-0004Bq-9I for qemu-devel@nongnu.org; Mon, 26 Mar 2018 10:36:23 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:47460 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <kwolf@redhat.com>) id 1f0TEN-0003yJ-PH; Mon, 26 Mar 2018 10:36:15 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 553BF4068030; Mon, 26 Mar 2018 14:36:15 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.36.118.75]) by smtp.corp.redhat.com (Postfix) with ESMTP id A39497C2D; Mon, 26 Mar 2018 14:36:14 +0000 (UTC) From: Kevin Wolf <kwolf@redhat.com> To: qemu-block@nongnu.org Date: Mon, 26 Mar 2018 16:35:52 +0200 Message-Id: <20180326143600.7724-12-kwolf@redhat.com> In-Reply-To: <20180326143600.7724-1-kwolf@redhat.com> References: <20180326143600.7724-1-kwolf@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Mon, 26 Mar 2018 14:36:15 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Mon, 26 Mar 2018 14:36:15 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kwolf@redhat.com' RCPT:'' Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PULL 11/19] qemu-iotests: Enable 025 for luks X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: kwolf@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+importer=patchew.org@nongnu.org> X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" We want to test resizing even for luks. The only change that is needed is to explicitly zero out new space for luks because it's undefined. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Daniel P. Berrang=C3=A9 <berrange@redhat.com> --- tests/qemu-iotests/025 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/025 b/tests/qemu-iotests/025 index f5e672e6b3..70dd5f10aa 100755 --- a/tests/qemu-iotests/025 +++ b/tests/qemu-iotests/025 @@ -38,7 +38,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.filter . ./common.pattern =20 -_supported_fmt raw qcow2 qed +_supported_fmt raw qcow2 qed luks _supported_proto file sheepdog rbd nfs _supported_os Linux =20 @@ -62,6 +62,13 @@ length EOF _check_test_img =20 +# bdrv_truncate() doesn't zero the new space, so we need to do that explic= itly. +# We still want to test automatic zeroing for other formats even though +# bdrv_truncate() doesn't guarantee it. +if [ "$IMGFMT" =3D=3D "luks" ]; then + $QEMU_IO -c "write -z $small_size $((big_size - small_size))" "$TEST_I= MG" > /dev/null +fi + echo echo "=3D=3D=3D Verifying image size after reopen" $QEMU_IO -c "length" "$TEST_IMG" --=20 2.13.6