From patchwork Tue Jan 16 13:04:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 10166821 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E439160325 for ; Tue, 16 Jan 2018 13:10:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D733928470 for ; Tue, 16 Jan 2018 13:10:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC08428516; Tue, 16 Jan 2018 13:10:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2AF0A28470 for ; Tue, 16 Jan 2018 13:10:45 +0000 (UTC) Received: from localhost ([::1]:35202 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebR0m-0007PS-9C for patchwork-qemu-devel@patchwork.kernel.org; Tue, 16 Jan 2018 08:10:44 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55711) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebQvS-0002lt-03 for qemu-devel@nongnu.org; Tue, 16 Jan 2018 08:05:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebQvM-0006X4-9G for qemu-devel@nongnu.org; Tue, 16 Jan 2018 08:05:13 -0500 Received: from mail-ve1eur01on0091.outbound.protection.outlook.com ([104.47.1.91]:25568 helo=EUR01-VE1-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 1ebQvM-0006Va-1n; Tue, 16 Jan 2018 08:05:08 -0500 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; bh=YJYYgwJeXUALYUDKK6pUf+1JDnmajCvLmb7FSm9Uii8=; b=HjX01YmYLXUz31rm7s9t4qiH9jvP19idWURzf5vA6F/OboavItHBQEwIztxFz3FMi2ADN0qQFcT9TRNRP49DwKqfIQ7e8ODKF/p8FKB67lEckfATcfoG3apx22v/Cbl5yzPnzoQsQXWw4oDpTNw7YYumbx52yOp5a0slwnOkgls= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=anton.nefedov@virtuozzo.com; Received: from xantnef-ws.sw.ru (195.214.232.6) by VI1PR0801MB2000.eurprd08.prod.outlook.com (2603:10a6:800:8a::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Tue, 16 Jan 2018 13:05:06 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Tue, 16 Jan 2018 16:04:30 +0300 Message-Id: <1516107870-8110-10-git-send-email-anton.nefedov@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516107870-8110-1-git-send-email-anton.nefedov@virtuozzo.com> References: <1516107870-8110-1-git-send-email-anton.nefedov@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HE1P190CA0006.EURP190.PROD.OUTLOOK.COM (2603:10a6:3:bc::16) To VI1PR0801MB2000.eurprd08.prod.outlook.com (2603:10a6:800:8a::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 37a17278-b19f-4f25-07fd-08d55ce1c429 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:VI1PR0801MB2000; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB2000; 3:f2gYnQCCrFNa4CNztfqAbV9Zfe4zfRnuHMG0zS+lhj9G5puPt2hUmBopEuRSDQQDahhPbaBoYPhRRa+ju9WcM4bt/ynaoSx30CYRaHHW6NHnMZfXxNotRa0O884qcwvAiNvP9pG5LnCzM3/rBd7eHzwxC0yG+v2DHSW6xvYwGfOF5Br25+9GkO5fxXB3Pb1ZcIwwDeU3GJmA5ve78NPTIrNWi6xS3GaqyR9Ocrxmyh++e19X/owBQPQGpcHnGkQa; 25:kxtFK3N5vAJ0BDQQLwsFz5jSKiieWKoWQQyv/VKZFP2V1q0gP0YfGH6FbSYMQ5im4uGIEZ4e9Fsg1vx2ub7gIKsO7+GsfGLOB16pD1hiRydnKoibcOCITg31TBVgEA6foRz+3XaNwBSAi5drAw5W9EqiX9gSNvxKu71AC3YUWXnp3hCp9SnNQ7zq7LtmeQMZhC9Qpc3EldTyV3YWpHA74i7+lUobZv7vVgFXhZSejIGbkwNPirP3orE0fiq+pUOO81DPhgDyaf4dA29CClBCwpCdYF+QSJC563cWnxbhfCYCNOOllUzLDVJaBPuqo86yb4lbfRIlk5r8htXFO9tDKQ==; 31:J+Zp0VQRbwM7zZxRwRJiqigAf4/tZbqQ5uMHsXlMGOGzBcf8BB+sFjOCIRE8+EjEp3+IlmT3J5r8zt98hkkPULeXl0/l3leNUO/onQJ7dh/j0zw/5JVaato1NjL9VuYTBxF8X8wt/m5nTmfjEx7WmuJjgjaGKl1RPEaaE/Gl/FE5P0rjki710VrT4E7jNEVhGOs/EmYnHnuYA5vHyknnkB8RVmwt+ygZ7vRfaTwvO+0= X-MS-TrafficTypeDiagnostic: VI1PR0801MB2000: X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB2000; 20:sOkmzjg0Q9BKDTSWEyCXIVM77RjvwcF5KU+TNwTNuyEcXLb8a9Ng+vwl7fxhki7bdYmDhsEhwNLuk5W1scJy5bqE6mQYAvs5/aZT8GdVMgaHTKo7tEj5b2EugXsHb5zpBT53kt+SmD7YB8VZ49rdnUplSIUUeGvzic0zoDnvwWAXYvKDSI+W44ItHA1ibN6ySkPXldDFEBffV68ILfm18im5O31cyj57e6X5hb+tvi46jtyqlwJHiojApFflVGDBWBXJ/ehAlum+252pTGAZ75RekelX1/jX/Q2L6I1eg5VtaDFGIocD88s6iQBMcv44a8yzuY4rFDNSS/+wzS+GdPp1cfP8SlZrPqcBPZM7egA8iuaYJEVB4uUaeBrgyVYLaU7qHiTytof+rofywkyFxKBh6F96Jjc0kbCoy9msCRk=; 4:OAbY/gzLZuLqCarSPy9QiUgje66q+IbKRzOl3xNGmk7YnyP+aDf2y1uIuvNNQILvPQPLfJQ/ZBX/365xL6Hl/g2tTGSFC9/e5d4ShIr/zVdnIJ7lvex+VFTiF5Eh78U0dy9B7VwuJq7ImluWzgvWC9HoDqRSMo56x+4yu1ZMHesSECQflcTfQKJGitsKM0TXrEAUbi9GgRerpokZ5d2ZQC0EUGKfs+xHCv+fimpCrddrKK6TgNzbhgPREFj9AytqxxWxpHcoqeIWUe3SlMFj9w== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(3231023)(944501161)(10201501046)(6041268)(20161123564045)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:VI1PR0801MB2000; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:VI1PR0801MB2000; X-Forefront-PRVS: 0554B1F54F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(346002)(396003)(366004)(39380400002)(376002)(39840400004)(189003)(199004)(105586002)(2906002)(48376002)(6916009)(2950100002)(5660300001)(53416004)(66066001)(6512007)(53936002)(26005)(50466002)(47776003)(16526018)(6666003)(2351001)(478600001)(36756003)(106356001)(2361001)(69596002)(51416003)(305945005)(68736007)(4326008)(8936002)(81166006)(386003)(52116002)(3846002)(25786009)(8676002)(81156014)(59450400001)(6486002)(50226002)(76176011)(6116002)(6506007)(97736004)(316002)(16586007)(86362001)(107886003)(7736002)(21314002); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0801MB2000; H:xantnef-ws.sw.ru; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0801MB2000; 23:/p+7iCPAOKc57Fic7z0ThuL0IbZxBYZUKWe6jhF?= =?us-ascii?Q?wAJPkPHztb8X61G9AXGrLXW9vLh9fAMsS5tqUJfrJ/C/b/KHHjykvgUxEo/u?= =?us-ascii?Q?hUu/y86p9UcE8g3C8vBOC0d00waRL1H4JBK3mapbkYmlvr2genoVSnmNdq9z?= =?us-ascii?Q?Hf3XjKOP8QKGjmjZwVz/FEtGtUJ1Bxi6JALLDiBED+eOluK8sohX3DXQp39m?= =?us-ascii?Q?lyJelpT1rv+D5FRmYDAixs4OxRMUUEXgPKn9+2ROHGhxP07aLskCGHXsmjvp?= =?us-ascii?Q?hc6h2VGJgWFWm1GQbuk3Jxp4YuzBqio9YG3TUZ4nH3jAFUzg+gHECkUSbJAl?= =?us-ascii?Q?QWfbCf8O+A2TUXN+QsP5UNBeXhvd+FTo3cNINAAm0CCHqDV6bceoKuY5uLIb?= =?us-ascii?Q?lkOF7QnMilKYZ+TJPwhMdd3w6gPAsCQXiMMb5tHMRewddOGONwRvtzLOD/v8?= =?us-ascii?Q?dPhskkX7klci3+kstgthEYr6m0pwzTTOILVI7D416ku0zHnpLqkE1pVrsUI/?= =?us-ascii?Q?58zz+IkmUouGFWH1fy/dfaia34kR+00Rkr2QblwsOyfqu+kuL2s3qosX+3pi?= =?us-ascii?Q?CTZK6DqFvX7db8rxwy625rNVjKqPtjIVCIXu8s8kzpMDVEAYhvKvlKJAubNP?= =?us-ascii?Q?hxV6ABqIrfS8WQpSUikTaShWtoWFIZS+j0ZD69f0dWPtLVtit6TKYaCQB0pW?= =?us-ascii?Q?llJdnDLKIn+Ly/TJleLNrNHBSHwQSST+sPRs/8PN916TkW4z5gBIK7ZW8vq4?= =?us-ascii?Q?ARa/sZH+U/IdTgRlvKKxPn4A+x9T1Gwd072bAvEmFgr7NmGPn01T/s5q6rqI?= =?us-ascii?Q?5ealY8p0esEBsR4uK1I8gS2FuxBXNJYCB01q1IJec4z2I39TmidOLKUuCPef?= =?us-ascii?Q?7Y9DicXcHrikUpxesG1+m+jpWtEYfAfdYNZ0/DsUoy7xr0xpyk2jkmjJjGsf?= =?us-ascii?Q?ZxL7E5QfJoyL9L86+sNP42TUV/HEYNme4mQ5ZoP56fHQ4T4sUSiL2qsV8yc8?= =?us-ascii?Q?TOdkfBl6zQRBjxpJACuYU6tZEMBOjhmd/oTAynToAXNET8ljbp3ju7qZv1RP?= =?us-ascii?Q?pJwVFVcY2mevesKyYm8axSCHcYBGHYbKYbqd5Au/aoVdPMnEZGYTWKrg877Z?= =?us-ascii?Q?ttAjYXgzmibiWThWf2lz5olkBnVjX0Dj+a0EEh3ccda7EB4DG5a+C88Ob7V5?= =?us-ascii?Q?V9lCdaJdCwXWpYZSwSKmcvP9ez6Zqqy3fmXYlyryhY1VBQQt2wJNORZfxRg?= =?us-ascii?Q?=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB2000; 6:y/QJz+w1MBW1s2/G1MMvMOKP6QCK7Yi3PuvhzeNDMpLhoI0IIbKeiKl47pZeVva1WV00XIgGl98I8eroif1U+PingTZqxoAmBaHAwyoXP5JxA9CsSlYHOkgbwvXFIsSJVYASE6+6owRm+768uqmgG0cNx5iWz80xEkEG12W2dcqZNLsY0J0o5A9ypM0dDtWf+IriKMFHLkOLa09v8mu586cAWMyQaqcN3eTDEgPJ2UAltbnXJo9GXTSKTS/OyyyRDZmtOJMBqNpi/qqThmlaKLjHHLJih7KEkZBwxTgQiDm835jNSjeBU8Z04FKH+38lpdk+LzT4PIg01LuDQ9lOtCp9fCp/sSl0v9BHpzsZ26o=; 5:qedxOIZNjf3pQG/SKikjOAoabf8j7+3+sbjiddbNjJFPyvKeXfBubB8ab0zJNmTdOOpgLr4K0/eV39wQCJrfXl42wqoEHTbinVfomVZTv1cbn1hfwLdNyb6YMycgg0ADOq2aTAZWwB/SxTyTU4G90acEYevmXEy1TzJGOjuU97g=; 24:XpclGgve6WezYQky2CxRvPbvGBANkmdT43BMu1hZ0prb0WUFPnMShIpgQyU1F7mr0ZFrwlLyHr0owaIlb/1Zpohs7F21n1uN0zK/GGAMV3Y=; 7:UwonMi26G/ASmpzm+D14cgH+9pu7T2noc/SdsWmDTdfOg0w8kRLfysSdGb3+vTPGFZ3zbXfDfLf9K24fgU/0/eipAWeoK5ggC3LhiC/I74SFANE0o1DcZORMWhHAPti6xWwYuY1li65zGkvYF/W1H6i/zNOgsKBKJ6XD7OsRQtEvb78LnYDu3Z4yCrfvXT9A7yZcAwl5G9xWE9KqKtVm7AgRbM6jWNKE2eUyxUsjSVMm4uS3Go5fFDGvDYjkzYX3 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB2000; 20:OcprxaMiLKFLITRdcpi+3gTfg2JTg5sh3UOL8bmFPNzr5SOaNDF9Pw9on4ZUggi14/3F0Fd8uyGyqF4mHou0f0TJkJbsK2YZP8uJpu57ZHWDhKo/FgZzCczFnZY8bBVNuMR4Psgt3UfRxdCR75pOGKTicL8ZO25Pfa7ZfJM5DA8= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jan 2018 13:05:06.4182 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 37a17278-b19f-4f25-07fd-08d55ce1c429 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB2000 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.1.91 Subject: [Qemu-devel] [PATCH v6 9/9] 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 , berto@igalia.com, den@virtuozzo.com, qemu-block@nongnu.org, mreitz@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP COW (even empty/zero) areas require encryption too Signed-off-by: Anton Nefedov Reviewed-by: Eric Blake --- 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 9914415..6083ae4 100755 --- a/tests/qemu-iotests/134 +++ b/tests/qemu-iotests/134 @@ -59,6 +59,15 @@ echo "== reading whole image ==" $QEMU_IO --object $SECRET -c "read 0 $size" --image-opts $IMGSPEC | _filter_qemu_io | _filter_testdir echo +echo "== rewriting cluster part ==" +$QEMU_IO --object $SECRET -c "write -P 0xb 512 512" --image-opts $IMGSPEC | _filter_qemu_io | _filter_testdir + +echo +echo "== verify pattern ==" +$QEMU_IO --object $SECRET -c "read -P 0 0 512" --image-opts $IMGSPEC | _filter_qemu_io | _filter_testdir +$QEMU_IO --object $SECRET -c "read -P 0xb 512 512" --image-opts $IMGSPEC | _filter_qemu_io | _filter_testdir + +echo echo "== rewriting whole image ==" $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 972be49..09d46f6 100644 --- a/tests/qemu-iotests/134.out +++ b/tests/qemu-iotests/134.out @@ -5,6 +5,16 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 encryption=on encrypt. read 134217728/134217728 bytes at offset 0 128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +== rewriting cluster part == +wrote 512/512 bytes at offset 512 +512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) + +== verify pattern == +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) + == rewriting whole image == wrote 134217728/134217728 bytes at offset 0 128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)