From nobody Wed Dec 17 21:48:17 2025 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 ARC-Seal: i=1; a=rsa-sha256; t=1561123782; cv=none; d=zoho.com; s=zohoarc; b=aJmi/4jXSSwItXLbnxHELJrWbT72NYzphs2zMD8H+lX/iW0efYzJnQWbUTXvre1+Ojax+PupuuX+lakk9PsH0bIgLqqexWirP3SLsmfUr5qV6IaZT8smHwUb/9UWBJE1lHby1sWwbKVDpsSnGcJgvMeh+atLECZAGS0Kv1qiBbg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561123782; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=wKyVu2r+HVjO+DxqHw3YZi4kQcrckFxyjlvdF0wdlTA=; b=SyeJ77AkkQdGdmTxMQxqmeodkqZdiVypUDKMU7FSDHwf6rT+5UhfuSzUowQ6T0Fvf+x+SI+EKIVPkgvNay4VncX6E1/KFK1BVKzxnm0jFb4NWNNgpqM0jBq0zCSFAtlFuIaWZRRRLpjqyAu58i1m5+en3tFFrlgZ6SDlZ6WpS6k= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1561123782623345.91403844824526; Fri, 21 Jun 2019 06:29:42 -0700 (PDT) Received: from localhost ([::1]:34860 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1heJbp-00046Q-Gm for importer@patchew.org; Fri, 21 Jun 2019 09:29:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50421) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1heJW7-0006I5-KN for qemu-devel@nongnu.org; Fri, 21 Jun 2019 09:23:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1heJW4-0004TI-Hj for qemu-devel@nongnu.org; Fri, 21 Jun 2019 09:23:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51758) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1heJVw-0004Mx-4V; Fri, 21 Jun 2019 09:23:36 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BC8BB821EF; Fri, 21 Jun 2019 13:23:34 +0000 (UTC) Received: from localhost (ovpn-204-30.brq.redhat.com [10.40.204.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 51C915B68B; Fri, 21 Jun 2019 13:23:34 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Date: Fri, 21 Jun 2019 15:23:19 +0200 Message-Id: <20190621132324.2165-4-mreitz@redhat.com> In-Reply-To: <20190621132324.2165-1-mreitz@redhat.com> References: <20190621132324.2165-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 21 Jun 2019 13:23:34 +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] [PULL 3/8] iotest 134: test cluster-misaligned encrypted write X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Peter Maydell , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Anton Nefedov COW (even empty/zero) areas require encryption too Signed-off-by: Anton Nefedov Reviewed-by: Eric Blake Reviewed-by: Max Reitz Reviewed-by: Alberto Garcia Message-id: 20190516143028.81155-1-anton.nefedov@virtuozzo.com Signed-off-by: Max Reitz --- tests/qemu-iotests/134 | 9 +++++++++ tests/qemu-iotests/134.out | 10 ++++++++++ 2 files changed, 19 insertions(+) diff --git a/tests/qemu-iotests/134 b/tests/qemu-iotests/134 index 141a2eaa7e..5f0fb86211 100755 --- a/tests/qemu-iotests/134 +++ b/tests/qemu-iotests/134 @@ -56,6 +56,15 @@ echo echo "=3D=3D reading whole image =3D=3D" $QEMU_IO --object $SECRET -c "read 0 $size" --image-opts $IMGSPEC | _filte= r_qemu_io | _filter_testdir =20 +echo +echo "=3D=3D rewriting cluster part =3D=3D" +$QEMU_IO --object $SECRET -c "write -P 0xb 512 512" --image-opts $IMGSPEC = | _filter_qemu_io | _filter_testdir + +echo +echo "=3D=3D verify pattern =3D=3D" +$QEMU_IO --object $SECRET -c "read -P 0 0 512" --image-opts $IMGSPEC | _f= ilter_qemu_io | _filter_testdir +$QEMU_IO --object $SECRET -c "read -P 0xb 512 512" --image-opts $IMGSPEC = | _filter_qemu_io | _filter_testdir + echo echo "=3D=3D rewriting whole image =3D=3D" $QEMU_IO --object $SECRET -c "write -P 0xa 0 $size" --image-opts $IMGSPEC = | _filter_qemu_io | _filter_testdir diff --git a/tests/qemu-iotests/134.out b/tests/qemu-iotests/134.out index 972be49d91..09d46f6b17 100644 --- a/tests/qemu-iotests/134.out +++ b/tests/qemu-iotests/134.out @@ -5,6 +5,16 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D134217= 728 encryption=3Don encrypt. read 134217728/134217728 bytes at offset 0 128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) =20 +=3D=3D rewriting cluster part =3D=3D +wrote 512/512 bytes at offset 512 +512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) + +=3D=3D verify pattern =3D=3D +read 512/512 bytes at offset 0 +512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +read 512/512 bytes at offset 512 +512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) + =3D=3D rewriting whole image =3D=3D wrote 134217728/134217728 bytes at offset 0 128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) --=20 2.21.0