From patchwork Mon Mar 12 10:16:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 10275919 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 1935160467 for ; Mon, 12 Mar 2018 10:24:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B6FE28C01 for ; Mon, 12 Mar 2018 10:24:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1015828CC0; Mon, 12 Mar 2018 10:24:50 +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 8EF1028C01 for ; Mon, 12 Mar 2018 10:24:49 +0000 (UTC) Received: from localhost ([::1]:57537 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1evKdM-0000qf-NW for patchwork-qemu-devel@patchwork.kernel.org; Mon, 12 Mar 2018 06:24:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33687) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1evKWO-0002pV-4p for qemu-devel@nongnu.org; Mon, 12 Mar 2018 06:17:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1evKWJ-0006ur-Tu for qemu-devel@nongnu.org; Mon, 12 Mar 2018 06:17:36 -0400 Received: from mail-eopbgr10092.outbound.protection.outlook.com ([40.107.1.92]:46366 helo=EUR02-HE1-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 1evKWJ-0006pb-Ka; Mon, 12 Mar 2018 06:17:31 -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=U+RZyh7ZrgnvGz+fwUOvG7p1nHrIO9CzQjKqhUrvmZopaWbnFwxLGFfMTwRsK67GvIcxBt98zA6VpwsEDYo6FNeWKbcd0pVZHydGVOlk7/dUH90mTR1TZRaZRHxomMbp6Fz5ILqABvPx3G5/QDzUUNw9ys1aVPosxP9qTK0NIB4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=anton.nefedov@virtuozzo.com; Received: from xantnef-ws.sw.ru (195.214.232.6) by DB6PR0801MB1991.eurprd08.prod.outlook.com (2603:10a6:4:76::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.567.14; Mon, 12 Mar 2018 10:17:28 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Mon, 12 Mar 2018 13:16:58 +0300 Message-Id: <1520849818-6915-10-git-send-email-anton.nefedov@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520849818-6915-1-git-send-email-anton.nefedov@virtuozzo.com> References: <1520849818-6915-1-git-send-email-anton.nefedov@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HE1PR06CA0148.eurprd06.prod.outlook.com (2603:10a6:7:16::35) To DB6PR0801MB1991.eurprd08.prod.outlook.com (2603:10a6:4:76::8) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 705e10cb-26d8-469e-1c2b-08d588027639 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:DB6PR0801MB1991; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0801MB1991; 3:/+/kFrDO8wE202mddxebw1VrCOmUeJTqtmfDSEpP/i9iRJS53EnPLgqjb6sGW4zcDdtDwPtMdAMrsPB1I/kD9Xfivrry3bHaf+ZLWUFeRr+wAPDX0AKOJSkP7of9xxeK5Mhp4W6P9ex4hfVZOJDYfrlVR8E44HnnKfWTrPTlqI0TxI8wnszUOQINhRWEtlpgJn09CYs2c3kwAcpDqAwUpGclamjboEBxIdqxUQLTkmC3RDtLE/LNvHHwb7nhDbE1; 25:j0J1IXGdxhLjnYVygCapSspRBlWYY6xEdplbjvPUQeGbFkhO5S0UmD2KZXq5ApUuwSjXqetAhRX6eqP2cB8kO/tMJp3RqPhcQWIT8Nw9TMQikksEMIWQERbXSRrTkUztRoOz7DzNw9ZmRGVR4+VLa63kU0m5H2LjY1JTjP2U8Tav8egVJYwqUk5FwEQcMnVcRd2PY9SZec+uOuRWvRkAnfi2BIJR9mnc5MCjna+h6NTAaGLH3aCBPGbvmwMbQU4h5AWbWhem67/Q4GZGZh/HW+WqcnvYwDRzHhE/kQnOAcnkLsOsnpe2TFj20rGLnPBuI9+2JhHLP3lJT1WPkbhiUA==; 31:uJ3/BvnFb0FOJekjwDrZowe9CPnuvSYrLmeoeP4y9kNfO4UhmS+/iPwrOwtbMzb/JVaGv037S1HvqAOlhdicd5cML+uv0jpbHuqlutX/ViYD3UAj7dYXsou4rzPY0iuxLmglBuADyRmlIpNw2PkhkXWwjZx0O04L0GYCH0ANlhzyf7Q/HEh9xa8ktUQysF3Z5+z/dfbVUMNxuAsp0o4KyoOQWGva4+t6QPXG/CDY4JY= X-MS-TrafficTypeDiagnostic: DB6PR0801MB1991: X-Microsoft-Exchange-Diagnostics: 1; DB6PR0801MB1991; 20:ncrMmOhGEokPo73sW9N0M5YACcfYtxXA0SZMgmlCiCaJdI0uL4MKBmOKqqigDAg+dkx5LlE7hGRVQgvFjMLO5iLQCVrMl8CBTO0/0E2K21p28kXpmJAKi+iLapTaN9WGLZ5JP7t1zbL2gmG2YnYur7w5nEZuH3mvkyOTTTupbojSKhkPGh/XtHo+j3xigNCf33jGLGRmMTn5OosJ/9XMks4UXoPKd2RlrNpLy8BYXCNFkeTvEfKpyc6pY8nNXD8zg6CjOpkSCPpdONUfiXaqphaYB+NE/MlFYYukcHph59/T74QkZEeQSuIFhiS8oE24YEDAdYusg0+qkftW19fFKHxfIg6s+4FcAOU7nKfLZUgEun0aZoHCmeqYQ+P0ANRFtRpxobjZhLbcVNQwQG0ee3Fg8IkHEWpfcmONVnty8w6d8Pq85oQXjn95qybzWtAgxCOQAmgDJXb0dulxa5xAWmVuaIcNWjyDCXK//xzZTTny5vskEoLjMTi/5H8uUCSM; 4:9RB2Shtrn9x7bo7AJ43Nv/sWCvxolWFoftNwR+Q60M9q6Ihaw1QivEJcMGGrbMSn+KwHSqDvvsvu9deYTqlBYiP7Fq+vxpqoMSp1gVJlsl2NGePOTAAyl1WCy6YvWs5u5TKzApIoKj4DrlAp5wkxNJc8vSh8fuusN6imAfAA97684g6LnbIoQXTb6eMGtzjkYwDxMc+KfT9rFdaO6jLbts13I05kKih4QiqdniKXkVxD7DIQ3W9wND4XFTcSAEVlWvE4VGukjiXYXRKjdL7Tmg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(10201501046)(3231220)(944501244)(52105095)(6041310)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123558120)(6072148)(201708071742011); SRVR:DB6PR0801MB1991; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0801MB1991; X-Forefront-PRVS: 06098A2863 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(39840400004)(366004)(346002)(39380400002)(376002)(396003)(199004)(189003)(47776003)(106356001)(4326008)(81166006)(16586007)(107886003)(8676002)(69596002)(6116002)(68736007)(3846002)(105586002)(50226002)(386003)(6506007)(81156014)(8936002)(55236004)(2906002)(36756003)(478600001)(2351001)(2361001)(25786009)(316002)(59450400001)(6486002)(53416004)(76176011)(97736004)(52116002)(51416003)(66066001)(48376002)(50466002)(6916009)(6666003)(6512007)(2950100002)(5660300001)(26005)(86362001)(53936002)(16526019)(7736002)(186003)(305945005)(21314002); DIR:OUT; SFP:1102; SCL:1; SRVR:DB6PR0801MB1991; H:xantnef-ws.sw.ru; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX: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; DB6PR0801MB1991; 23:qeY8ar9HQ+JdbEBx43m23JZBAl5IK+mznxCDUBi?= =?us-ascii?Q?+kRT4DlHd1Fzh+O29hssiOvHsQDP1jdafEj14qUpbuKbak+dHOvBQei4IxUc?= =?us-ascii?Q?lqxcToHXKMIlL2g8Yu3/FMaOOJVJ53IGIQot8s5jmWmcWtZ3BnTWKI7UdXEj?= =?us-ascii?Q?Fb8rD08xEb827D4jpEInSXlmoW10sYZJP9oMwvCWxyrxiWlLCOdxNwRU9vKy?= =?us-ascii?Q?K3/a+1sSwr5DLxthPNJd9jxktSKxXb04StMBv3pWGjreWu/9VTZxgGt7FDPu?= =?us-ascii?Q?tlvOsBBtH+9aFuBJA61r6Xm7otXf18APJhrltD3iRvTctjm+zCr3c5Wp3OKq?= =?us-ascii?Q?rhh96B5pwj26IaQ664C728lRhjROjo7i2kPXYND8ivr0TmOiEgnB35Dpw+86?= =?us-ascii?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Tb5/sKFb1vsnOgC3AV+vJKl0/8/rp+NLPBIkPV8z0PxHEgjt5VFerYpowNQ3pRHFSGLMV8yIYo1BGvIGfwzGRV SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB6PR0801MB1991; 20:j2qS+IoXlDmwSFXGh/dGbWMeDzA+v79jQjJuPNcA3/hNAV2UpB9cYoqVwA9fZcxXiuWd/xOYy/WawbrNnzVVcI7sEckgN3ZIUi7EGXOck8o4+x8CfSOIjtHJYZCQUGYtUAadT4Een5LDGNQVVFOEmuNBbjEbFRNwXiLBkYzxF/s= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Mar 2018 10:17:28.9746 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 705e10cb-26d8-469e-1c2b-08d588027639 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB1991 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.1.92 Subject: [Qemu-devel] [PATCH v8 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)