From nobody Thu Apr 25 23:41:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1557842215; cv=none; d=zoho.com; s=zohoarc; b=TstuXsxjUKZk6/wiRNJqnEPNNMEimDgSylyJoy7+/GMKlP4enhoGB2xPKJ8H/OGYUUfzCe1IrO5nqgUfbSZzB9PAxy/tLjyiGYF5fLcpsynhUhNFEjDbH6K/H73ABrLXyR6Uzcwrm91UOkA0Tb8UWjYlaEaxig9OhsEF28msahg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557842215; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=Ha9v/mj7CFKfQE2RMbNIRPym71vuoqL6gmzlwemIDdg=; b=Q4utvIyBJ4uRbeK/rKdxRWRZxLxgKomYHEINXUxDJHI8h2RRh4Xa+N5Nn12Ldoqs7EI77ZFols5kJmtnGvWFMMXXS0P1HjOWUWkhnC2GvE26R11i6XKzzCz1nM+gGJEwfapAFxy10kYbgcJnWoRE45atsgUJpjZ2XyZmvo98ze0= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 155784221584666.1137334721526; Tue, 14 May 2019 06:56:55 -0700 (PDT) Received: from localhost ([127.0.0.1]:48596 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQXvH-00063A-Ps for importer@patchew.org; Tue, 14 May 2019 09:56:51 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQXu3-0005BH-2E for qemu-devel@nongnu.org; Tue, 14 May 2019 09:55:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hQXu2-0006EU-0I for qemu-devel@nongnu.org; Tue, 14 May 2019 09:55:35 -0400 Received: from mail-eopbgr150109.outbound.protection.outlook.com ([40.107.15.109]:50035 helo=EUR01-DB5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hQXty-00063f-Ct; Tue, 14 May 2019 09:55:30 -0400 Received: from VI1PR08MB4078.eurprd08.prod.outlook.com (20.178.127.92) by VI1PR08MB3117.eurprd08.prod.outlook.com (52.133.15.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1878.22; Tue, 14 May 2019 13:55:26 +0000 Received: from VI1PR08MB4078.eurprd08.prod.outlook.com ([fe80::8ce8:ffb4:fe9:4900]) by VI1PR08MB4078.eurprd08.prod.outlook.com ([fe80::8ce8:ffb4:fe9:4900%3]) with mapi id 15.20.1878.024; Tue, 14 May 2019 13:55:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ha9v/mj7CFKfQE2RMbNIRPym71vuoqL6gmzlwemIDdg=; b=cBrn83hGXjOz5t8r1FQk8bO8YnhPd6cwW8wKFx5wkLqDC06/yaIvp9soas8n7TytkkECwaxrGJHY7QKCwNESF0o1WBYW8B8oDReg9cr0sARPEV9EdSWaBvZHDf3s364+CV61CFI97VwIDvmnRYj1q1tpUnaa+OLgIYVKZz6L/ag= From: Anton Nefedov To: "qemu-block@nongnu.org" Thread-Topic: [PATCH] iotest 134: test cluster-misaligned encrypted write Thread-Index: AQHVClyuZmHg12OSEkK/joUO9Y+YdA== Date: Tue, 14 May 2019 13:55:26 +0000 Message-ID: <20190514135515.34355-1-anton.nefedov@virtuozzo.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HE1PR0202CA0002.eurprd02.prod.outlook.com (2603:10a6:3:8c::12) To VI1PR08MB4078.eurprd08.prod.outlook.com (2603:10a6:803:e5::28) authentication-results: spf=none (sender IP is ) smtp.mailfrom=anton.nefedov@virtuozzo.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [185.231.240.5] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2ea2bc3a-8d5b-4776-8203-08d6d873d15c x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(2017052603328)(7193020); SRVR:VI1PR08MB3117; x-ms-traffictypediagnostic: VI1PR08MB3117: x-ms-exchange-purlcount: 1 x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:883; x-forefront-prvs: 0037FD6480 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(366004)(376002)(346002)(136003)(39850400004)(189003)(199004)(478600001)(316002)(68736007)(54906003)(86362001)(66066001)(1076003)(36756003)(5660300002)(6436002)(6116002)(2906002)(3846002)(6486002)(64756008)(66446008)(66476007)(73956011)(66946007)(66556008)(5640700003)(71190400001)(71200400001)(2501003)(44832011)(476003)(2616005)(486006)(8936002)(81166006)(386003)(14454004)(99286004)(6506007)(53936002)(966005)(81156014)(107886003)(6512007)(4326008)(6306002)(52116002)(2351001)(8676002)(14444005)(256004)(102836004)(25786009)(7736002)(6916009)(186003)(50226002)(305945005)(26005)(21314003); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR08MB3117; H:VI1PR08MB4078.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; 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; received-spf: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: NCVFCk7DH0ttWlQ1I8xqros937yXKEMmTsmlQIYcoMxd9pZYVT9ve9ccxZgHWONBIiCmxzUH7FwFxliNg5rSAvjkAEFIsJzitjtMmiitmQltaSxRpE761qWyg7fu+P20QNHGmPw7avKfLmHhTPV+Ru0dL+0WKn8dkTvFSvv7ENRTAkkL6XonCIdDQiJXz7zTfX1RSN+3d9tODRidJlDxD/yTPvRNTXwjMI+FxtHjLLzjiC3SvJ9wLYNdYprGbLmCdAwf1Dn4rDHNmN1oW34P4rVjSMmRam0aDbfZTMhVH0Q7m/DAT9nI7yjcjXcppfnga+/WHJ9PlmJV1nIk1PKu0Kq8b9Eeu6me2QyBn6fdYSYDyFY212fcJ45jJsemlgaVEY9pkfq0JbwNmZ5qCDf6U08eLj5Rg308s9RqdGhY7d0= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2ea2bc3a-8d5b-4776-8203-08d6d873d15c X-MS-Exchange-CrossTenant-originalarrivaltime: 14 May 2019 13:55:26.6584 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3117 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.15.109 Subject: [Qemu-devel] [PATCH] iotest 134: test cluster-misaligned encrypted write 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: "kwolf@redhat.com" , Anton Nefedov , "qemu-devel@nongnu.org" , "mreitz@redhat.com" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) 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 --- used to be a part of 'qcow2: cluster space preallocation' series http://lists.nongnu.org/archive/html/qemu-devel/2019-01/msg02769.html 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 e9e3e84c2a..f5fd3b7f34 100755 --- a/tests/qemu-iotests/134 +++ b/tests/qemu-iotests/134 @@ -57,6 +57,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.17.1