From patchwork Wed Nov 1 15:44:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 10036699 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 A3D57603B5 for ; Wed, 1 Nov 2017 16:02:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A58F728CA3 for ; Wed, 1 Nov 2017 16:02:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9A82E28CAA; Wed, 1 Nov 2017 16:02:49 +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 27E5D28CA7 for ; Wed, 1 Nov 2017 16:02:47 +0000 (UTC) Received: from localhost ([::1]:56507 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9vTb-0005LZ-4G for patchwork-qemu-devel@patchwork.kernel.org; Wed, 01 Nov 2017 12:02:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60846) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9vCO-0008Li-0J for qemu-devel@nongnu.org; Wed, 01 Nov 2017 11:45:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e9vCJ-0006p4-Df for qemu-devel@nongnu.org; Wed, 01 Nov 2017 11:45:00 -0400 Received: from mail-eopbgr50122.outbound.protection.outlook.com ([40.107.5.122]:48576 helo=EUR03-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 1e9vCJ-0006nj-0K; Wed, 01 Nov 2017 11:44:55 -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=YJYYgwJeXUALYUDKK6pUf+1JDnmajCvLmb7FSm9Uii8=; b=CTaNgXu7j9isD1Lg0wT1iXl6j9AHYOVHRnJRC/qrSCpME/hX5Q3YVsGmCrQ04peetzO9kH80rEEsx0NC6LtyFpAdDjRfC8YvO1HWli418kZJ7k3TsIVfvZu6B4bdvl9WgUtgygwo9+obgywAuNz+jLBrQuCl6L9iBxjMTJIDATc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=anton.nefedov@virtuozzo.com; Received: from xantnef-ws.sw.ru (195.214.232.6) by AM5PR0801MB1987.eurprd08.prod.outlook.com (2603:10a6:203:4b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.178.6; Wed, 1 Nov 2017 15:44:51 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Wed, 1 Nov 2017 18:44:08 +0300 Message-Id: <1509551048-129830-16-git-send-email-anton.nefedov@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509551048-129830-1-git-send-email-anton.nefedov@virtuozzo.com> References: <1509551048-129830-1-git-send-email-anton.nefedov@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: VI1PR0501CA0017.eurprd05.prod.outlook.com (2603:10a6:800:92::27) To AM5PR0801MB1987.eurprd08.prod.outlook.com (2603:10a6:203:4b::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2da5e2eb-d8df-4f1f-79ac-08d5213f7e3b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(2017052603199); SRVR:AM5PR0801MB1987; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1987; 3:VRVEHzzQNfX5HTvlSFtj8hcaduME/scBT9qqPCcvAcuJ3xTrn1BIYnkayHp+3b2TJxZbz7lBOHBYJy7tjSrAALI+MlG3QiTeR8iI2mrkOHB97RkYvV9nvOMmStEkJ7nuqt8iT4YiOY1pi8o9bhpzYuxQ+1PKkVVi8mvNQNo9h/dbpTDT+DNNF3kXAsm1Rf/P+7e/g4HE2xmzG/0K1RXiIIX21Q852u/86Vo+Cc1KH6FRVKhywiLAQW8U901Hx5Mf; 25:zgc75FJNda029yzJHj0ri4JbdZj9LGPOigsWF8FeKqCd0qFuj6rvsTzS4e66kV/4QBFcwFyEjfJvCcha4lJLA779NuqxJz7qcnh34sTEDxtHoJafyQ1tFykWLgaWdTbdjmAtgkjlLl+opOETA3HoGDypkLM1Zi6LbgXDJkJGRfFmsQ3OoUo8v6kC0Jr1OywkEG4r5A1m01/e1TxEkbUb4TQmR3ZmR4kCIwYdYoMW2Ism/xHerSyQmWj7CCjF0J07DLiqHeExCr2RVgnTBrFX7/Ew6SX/N8dHELJokF1pMGsFvNrPKFu9R2ITOvKXMfc5BHQxabv6hNSCIe4XXCIMzQ==; 31:0ShPJ4wfjfYvKDKYbpQhh3R2oLhaVujM7WBxWLgiBxVHxiZeW8nNVK97A+YeHSkYAyIMSSzHy2yaxDoMTiVfixUA1ZzGUeiUIHXni8eHVeNgjyuQl+oV+lwzcVWSSVCZsg3U+45MZDUPV3LpU+I4Pp4s+liSTc7ojz78x1NwutYXEFH8+auMzpTOA1Rx91ntpX2CuhHs9b+dFCehTP/qjRpbK7c9D7PlITMhYsL/Q0g= X-MS-TrafficTypeDiagnostic: AM5PR0801MB1987: X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1987; 20:1miDHMpjg9WG7s2c3T/eHJDtRsICv54omL56GaOGymORshEb6FdL232IlFkMh/fSW/w15996/GkNIvZ4f4SFJIdORl9LfdFeDdmgmUnBfBFPGj+IIkmm+nrM/o1Gq/3gnUk8W4NfGtqXIW/n5pyjBqaKS7y74k+A5QTgRwrvIbj0qHSfqIftKSLx/7LK38xJ4qGw2Lhi/k1/rD4omaa5qs+axg9RYGw1KB41La7hQrShppPqNOUDwpyQ/Cvt/j27bE2vAPcf9I4GdTmlcM/pW/rWYYYrXmjXAq76JX6zDdKyws5V9ZCYP8iAVckzyxSnOGSQ7qHx1mEvu95zE5nL+y79KAoedzJMzydxJeSMJuVNSngtfIcoszRR1IH6I8ypbDeHSBb7x6J6TdTQkCyIoWNG1j27xlxS7mivZ90N0nU=; 4:eXqFLwb0twkAvEJpQvuoZc0xnivx+p1F9eYb2uj7B2xku1rCOwu86fMsP7frSnh7irXOmbhxJXvwRe+UsO7wJIgwgbIBbmZ/h/qFNIxQQ8yuaYfDYPPAVBy4iyPiRj2n5DpkMdiuiJEqsBDlMOdihhZVTRPMJq6mmEdg80fxAPhMSd3NvYxFoaldCaievXFqSih1dTTfmqELJUdCNQUWw6HFyoJp6rp9UI87WfEdgp9uCHcYC5o+VO5VGBnyMaqC7Uw/+92ZUaGxVwKZqdxv+A== X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3231020)(100000703101)(100105400095)(3002001)(6041248)(20161123555025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123564025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:AM5PR0801MB1987; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:AM5PR0801MB1987; X-Forefront-PRVS: 0478C23FE0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(376002)(346002)(189002)(199003)(6666003)(16526018)(53936002)(107886003)(48376002)(86362001)(6916009)(2950100002)(3846002)(6116002)(101416001)(50986999)(76176999)(106356001)(69596002)(5660300001)(25786009)(105586002)(316002)(53416004)(2351001)(16586007)(2361001)(33646002)(4326008)(5003940100001)(478600001)(66066001)(36756003)(50226002)(6512007)(47776003)(2906002)(8936002)(6506006)(97736004)(6486002)(68736007)(305945005)(50466002)(81166006)(81156014)(8676002)(189998001)(7736002)(21314002); DIR:OUT; SFP:1102; SCL:1; SRVR:AM5PR0801MB1987; 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; AM5PR0801MB1987; 23:9vZMkot+JE2Wjx/bbfS2Y6PqqXlIB8OVpebKygV?= =?us-ascii?Q?P19SGKopPYyVxYzZNoAuSjMrRQpssYvfqtdpq4TOPFIQ5Tyh9dYyed+JpF0L?= =?us-ascii?Q?ImHvMNTxMz9oHStxHoK+alnHiorM6aKcgWDyEC+pQUpZM/kVKfM3tDrmVOFM?= =?us-ascii?Q?w9j8mnHkL2kSJDBXcA4bjs0OQTWMT5ohc6at+k17qv26tb/fdLp5/WVjBafZ?= =?us-ascii?Q?tD+2fR+Ha9mUiP96sdF4dmr76CfBTd4D+75CPWESdspoJQ5OeIPjwaT4rQ//?= =?us-ascii?Q?RwJVVA1TN2kB3TR+XwCgic2/EgmR9jkV03Zbx1L2SxjYcqVcactCqZxijQHb?= =?us-ascii?Q?P9t2rC5g/StrqjTrejDqIR+n039O7GwJ1XbT4YUWO03Od3QGmat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YAgJ//JGP9O/jlLKS13FAviyecxMvptb9juBeRZRxubFSzmQWbrjqOtmgcrENEsk4zv3Wcox9FqA+gv+H5LF0OIIf8j8qicnmyoSOp6IpbQlDiw2l035hv6Oee50Xp+AWiG+uKHG0yy+Bqc14e2j8eXrTvyHyrmCy4t6T+59o3hvKqVFt0t2cq+ikPx9YUuEhWh8ho+KX9xMm47oYPCt9v1zRxGsHXy+inxY7xNN7ZzwMd4uf7xqD1V1y2m5Q72klg+i0X9HjDmFF4l5Lj6Lje9pnoBavaItrK1SUv89VTb+SA8kFGvlWQT05HazkaAmBoN5aED70+780=; 5:jkkH4sWu/PytdvUJJG9t4DpE9zFu83lii61oCor2gK59j6WoEjQuYe6reR77sNi0JDKHOuR6NkdyoW9xM1hMplcOYolFuyVQRy6WMBmN9R7VQvmAXTEEcOZazYFNejYd2ZvqM7eg+ZLumM6UydP1iOCwMqOZ55P1SiJdwe3EOkM=; 24:EbZZ+NuiAHWigMmhe2pKkFyP6YiqVp/3FKengcq4eJwumrjgVxodtboYxB7FL3VmFTZFBBVtniMtp1tGwBx7G8YdyQWbwGLOExZ0J8mZPl8=; 7:ZoeNDvTPaWf4bj9Ti7C33+yf8HNPCr+tBiYxRJnhgvnPio40P87xzN3xuENRGteiXROCd//oFsbFPhs3slA+lWuxwG5TilzkgE3ez2cYCWj6q4tmypHY8hDpL13RV51unCzro07fNEBWkBE8nVgTYfgEAV/ioak6OAu335TiNRu4zPWp/5tb1SXAH9siRQPPT9J0wmWFsgMdMqY96Pu64L71YUjfzlH6Ky9EyfBaedn9zGCkc4UDaWVN+bkut5Uo SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1987; 20:bYMH8e7Nha0O7q1I52XVsJ++9NVaZiaRxpzZJ5dsRYuBdjY7msgXDz5gcfE51PY1NDsgroxAseugAj3COUtpLVy0iQOcApDGuYKjuGmRqFSU0q7X5/smiQ6rTgKDhPK3tRbNt9HUTQiIjrOlHaAt/vGcncIxoKDqy63D+TELZhI= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Nov 2017 15:44:51.8995 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2da5e2eb-d8df-4f1f-79ac-08d5213f7e3b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1987 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.5.122 Subject: [Qemu-devel] [PATCH v5 15/15] 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 --- 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)