From patchwork Tue May 8 14:58:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 10386319 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 BA0C46037F for ; Tue, 8 May 2018 15:04:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A900928793 for ; Tue, 8 May 2018 15:04:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9D31028E74; Tue, 8 May 2018 15:04:20 +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=-7.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, MAILING_LIST_MULTI, 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 1AACD28E00 for ; Tue, 8 May 2018 15:04:19 +0000 (UTC) Received: from localhost ([::1]:51658 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fG4A7-0004QD-6X for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 May 2018 11:04:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47969) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fG44q-0000MH-Eq for qemu-devel@nongnu.org; Tue, 08 May 2018 10:58:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fG44m-0001dT-4L for qemu-devel@nongnu.org; Tue, 08 May 2018 10:58:52 -0400 Received: from mail-db5eur01on0106.outbound.protection.outlook.com ([104.47.2.106]:58640 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 1fG44l-0001bO-TF; Tue, 08 May 2018 10:58:48 -0400 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=3SuavverubBYMiuKWKs7v4oLZkCJfON8z+/1zkFuxYE=; b=Kb0wmeSxzNf+rSm14tZoOoLBZ82W8m0u5UqFyhsEgtpXzExlRYWjZ+cL4vaCb0btQyFGBA93F0AG12Tl/1inAGlR2Utkj6uobBopiShuXSMNY9dnBTSZaK18m2tzHwHpUXe6CFZErGGG7QxGfIUS6bLQvrY9dXw03z7wY2s0xx4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=anton.nefedov@virtuozzo.com; Received: from xantnef-ws.sw.ru (195.214.232.6) by AM0PR08MB3347.eurprd08.prod.outlook.com (2603:10a6:208:5f::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.755.16; Tue, 8 May 2018 14:58:44 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Tue, 8 May 2018 17:58:16 +0300 Message-Id: <1525791496-125188-10-git-send-email-anton.nefedov@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1525791496-125188-1-git-send-email-anton.nefedov@virtuozzo.com> References: <1525791496-125188-1-git-send-email-anton.nefedov@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: DB6PR07CA0020.eurprd07.prod.outlook.com (2603:10a6:6:2d::30) To AM0PR08MB3347.eurprd08.prod.outlook.com (2603:10a6:208:5f::20) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(5600026)(2017052603328)(7153060)(7193020); SRVR:AM0PR08MB3347; X-Microsoft-Exchange-Diagnostics: 1; AM0PR08MB3347; 3:Ybruy5j8xcHb2MiTKgkYOCsSxwaTJEOALNJIC7pOavkKN2gReM0vFYAEekltUKvK52RpJI0t4CEDQsRmVcMMsQDjP4fqmGoLjrcy35VHoY4LTp3gKF3PaLA936k2CuNHaq2nKLfkp5ziJMdIQHTEzJkcdJUvulLpCC5Shte1k5tCVw+RAoPs+pE4SatmMZNuBRrYF6jZ7CIhGdFIPLs/xqT8C2/PLD/oedxiZMco79Ye+vkI+FnzbrSy59npjglO; 25:0upyadUXDBItglWjuU1njAH48vcIjGGj8SJ9ExQLa8Vc/qQmTBadXgfZfjBY47L6w2d46zTAycqTiACm83WS7hlhgo2aMKoY9LvpW+2JezTsZj9na79bknevEC2WTfups7jMHoyX3oXXtgjLdUFa2iaGcyYW/hv2yPdhasqA/LhLj++XZ0jlR6edfLE18wPOI7u9yJO3W+n1Nyv5cbzJng2D84Td1CuWl434UyGDhw3BfOdzEAbBlIloT5/ViiRot3XabZkqg+xbC5D0v1kArQLfXJJPzHn5xdeO5WW8emUegFs9HKIEvM6O8lSp29yFdQy715Tae1OABhMcq+/MTA==; 31:WvUVffB6XGxljCpOxeFwW9bzqVnwSxYY1xIIuEsQNW7V/PYsIJeqWOm+XG5ONLifRXVApuAdrzxorM4MsOlADfzQ9tDe++vsRDid2Wyy553HJTNdCjwFhn6Ap23nkxAzVexIQKffQdW0tms7JyUPS8bvZ9CYnigB7o6BXLOtpi14C1IPsnuFUAugN7ibF734P87pfwvxTcIhf98F4Q9i32K3hogg8CiP1k8vpgg65T8= X-MS-TrafficTypeDiagnostic: AM0PR08MB3347: X-Microsoft-Exchange-Diagnostics: 1; AM0PR08MB3347; 20:QpSli/GFHB20EW72RqNTHYvA0x8QNPrzgRZ3t6/qbX1hZ0ih8xe4PyJSDaM3Av5/U7hLAQ7PjLri38ShVsLNIBc6SQKI3LdsEYbLPsKYgQXJvi/1srZLnEqmSdOcaLL6fHvLbYr7BViKlkRTzMKLcsfPFgg6rusCOQEdN+GzwDBq0caVErCwmw7vi/IxRMH8vN6S5orkqoCV4xwWmelsMCn6rqebj01n9gAnE0tZNK0HTrZrjfAwUP4zg7zfjWk1He8/AYiOyjR9i2YZHJIA0Qz35jiRWI3qFwwu+7qsarBxWauZDUnAvuhDQzmbgeCXl0zI6LmRQERQ88KrJrU3THUaVmqmjzLrXn8cbaxn3rzFqcGtQ6jNmL9Pl5oQranTPcsEttSFPzra2E6E6HZKMOH96qOMHrWtm8dwtNilSAXLOSnzefawP7Dav189GPhRbMXugIBTDqgsVVTFXuj4yvVHFtlkQQcln29WSCBNdmX2lPZn0hI3fE7NYMy9ptR/; 4:gX4ZUFgIb10DMQ80+M5599u2YkhnK0yB0oDRCVnK96hRgBN0Oca0V/eryV6mARMfiUryjQ8MIpqUmfeW4ZbCxNj2vJFUPe4RmAedZjkQmfynpYLkkG+wiS+zDb+2nIspNRJo0F0hkuenzI9YjJ4p+vSYXnMfeP503I24gLw1vdd89JsFLNLjPAWdH6OmdRP03bT+wSG6oSA0vjDbnnLO3Az0Zxy/pUzOuwcu+Qa/lqa0+8X46Fa6m7Xj/+9fmtRXiE822XM4PiewGYdkST9Tew== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3231254)(944501410)(52105095)(3002001)(149027)(150027)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011); SRVR:AM0PR08MB3347; BCL:0; PCL:0; RULEID:; SRVR:AM0PR08MB3347; X-Forefront-PRVS: 0666E15D35 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(39850400004)(366004)(376002)(396003)(346002)(39380400002)(199004)(189003)(5660300001)(6486002)(81156014)(8676002)(81166006)(97736004)(2361001)(6116002)(3846002)(2351001)(446003)(2616005)(44832011)(16586007)(956004)(486006)(316002)(305945005)(476003)(86362001)(11346002)(25786009)(68736007)(6916009)(6666003)(36756003)(69596002)(51416003)(66066001)(47776003)(386003)(6506007)(52116002)(8936002)(26005)(53416004)(55236004)(76176011)(105586002)(186003)(106356001)(16526019)(107886003)(53936002)(4326008)(7736002)(50226002)(50466002)(59450400001)(48376002)(478600001)(6512007)(2906002)(21314002); DIR:OUT; SFP:1102; SCL:1; SRVR:AM0PR08MB3347; H:xantnef-ws.sw.ru; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM0PR08MB3347; 23:IwJMqNUjlU3qcvdmF0sbqLByK90YDGohT6tQ3gLRe?= =?us-ascii?Q?70hLysfqMxOGJumE4xJyw2QtB9Fh+jAsq4IitjgoR/nGe5TZmEbRWKiCYqfe?= =?us-ascii?Q?EGtyqXLMauW5lTUB9f9QIOY31l+fHI0YCqIi8N2Utk8sG5n5ih6U7OstLBZX?= =?us-ascii?Q?ytp/XIE97Qk2g9G3+ptwNN97pklOj5MWXDueGLydOCQyHpa12+Sj8PlQY+QF?= =?us-ascii?Q?n8QBT915fe2kHJ4v1qNcvZ5MjhPpbMqJcALgHViy3KnMMgbGeNQaUkE1B7KF?= =?us-ascii?Q?xij6iR4Xd8U4cLeU7nPNoeBz2qKwmhSqB1Cs96/Jb2ZoI1EO64PiTTT7LZGO?= =?us-ascii?Q?iiQW05RFtHd5AV93MZl6yXHlT2waJWF3fGDTOhsq587RHYPuQAP/Qha836xM?= =?us-ascii?Q?qf1OV/ABOZ0Co1i7OSfECtysgmfB994/nRl32LPRdI2YfOtgq12u0h/QU0hA?= =?us-ascii?Q?KsfAsiXiOlRbXy1uQUvatlN7CijIkddu57FkVVawc7/Kskosg+/JPpYCbK9Y?= =?us-ascii?Q?pNsiGYxcN+hoAI2IRW896tdyqFCL7M6UuX5snQCbkcUy+enl/KnMDit/Tw5d?= =?us-ascii?Q?YscEC9LcBUko9qVUGcTBuZKS6OM/22Qbii0/mxTPyrmwhan+GdKa32rtbtoV?= =?us-ascii?Q?QY7zYss0k4HKgMgYsdXoyX7rruQ0UpD2o/FIqsR47IL2qOCxI/u84WMYzEV2?= =?us-ascii?Q?DNvWGnbwhqVMfdAcXapi4g6ZiSSh08uv3iz2SBcKuGL+IjvejwuzAUv80aBF?= =?us-ascii?Q?vprNVpW3NUh/X2EiY0mISKcHI38xjomboR/01AlMHznXibQQpqv/6ZdvFL0r?= =?us-ascii?Q?ELAUSE/flehJd4H4OPETmjqX5zWn8n0HtQH8Rj8QuUVcLNdHjVrppHYPbFeK?= =?us-ascii?Q?mfAi7FnB0vqGN9FTmMyp62V7RPBLviJ8saJuZmoNzfMsSaNDGRxswdcXXRTL?= =?us-ascii?Q?okwW1i+3cyfkwiAEh4gp96vc2xpfMfl2IrOCwd86vkIfXDySFreLJvbEePdu?= =?us-ascii?Q?N/V1uS5LmAtRXbZSNqLSVv1CVIInivJDk8TpTbxRcC6j1CzMN4mqQWl99bb2?= =?us-ascii?Q?WiwgXDO547l/4jKurCPcAKQPidyuJ0qx0FLSHuPr6OnXnfC+T7EB9NwtfQsy?= =?us-ascii?Q?x0IMug9Os7xgOipn7NLuI2pFRtXmAN7NjyAhALOmNy/yEgiqdF10fU0kaChH?= =?us-ascii?Q?ddDuG82Pjex4k8/5oNtSUYwZV4aNhenxkWFgSgQhv2qWAJ2Aqua4aHEuFJvV?= =?us-ascii?Q?yZbyAxemVdm+uMFna8qRxlQBy4pYPkA2OvbhhefAp70UmfN2ujNAFnVbb337?= =?us-ascii?Q?khvAyyySNUQugb9CdEgJ0mCFLWgYtgg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5B/l7Hh0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM0PR08MB3347; 7:sZE73gr1zsbrB+TlZj07Kopc/C/aEFKU4B/GB2xGq0ja/pmnZ/8p0oLduiGXP41dhvtSbIbG9SEKzf+aQ0JMPRrtGfa0Sh3Be5alZBrU5kX6tx4T1X3R9xZqC/qDLI/KIhBDGdBSsNRxJE6otpZ5NYxWcGoE+yXRMWQdVkK74cm/zolH0NE1wuQu+P8HfQGWQ9+uZulrKMe5kVuFOhs809J2tCWocIWIYdUMbFWjqj8VEnCT2LTXKp6NO8Y8b8LB; 20:CtYcnfgOdyTJRp6Vl1663/g8rDgOb00BTLbfrxgPM/rjcr98dRycsMdxqGWrYX6jjV7Sf3uH6KmwobjZ9lH25K4qmjWabiI+J1f897UAaGRfM9n/EDKh12jtKECAbC7+tvsubZgJ8Fq1NZAfBwDiY7wYSHBWr/8OWzjT/8gDGeE= X-MS-Office365-Filtering-Correlation-Id: 1f1fc2dd-6edd-4a5b-74a7-08d5b4f432a8 X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 May 2018 14:58:44.9901 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1f1fc2dd-6edd-4a5b-74a7-08d5b4f432a8 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3347 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.2.106 Subject: [Qemu-devel] [PATCH v9 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 Reviewed-by: Max Reitz Reviewed-by: Alberto Garcia --- 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)