From patchwork Thu Jan 18 17:49:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 10173775 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 40957602DC for ; Thu, 18 Jan 2018 17:58:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2B9F7283C3 for ; Thu, 18 Jan 2018 17:58:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1F2EF283F2; Thu, 18 Jan 2018 17:58:22 +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 6B233283C3 for ; Thu, 18 Jan 2018 17:58:21 +0000 (UTC) Received: from localhost ([::1]:44897 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecESC-0003ot-Dx for patchwork-qemu-devel@patchwork.kernel.org; Thu, 18 Jan 2018 12:58:20 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52280) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecEJg-0004Mu-MG for qemu-devel@nongnu.org; Thu, 18 Jan 2018 12:49:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecEJf-0004Kj-KC for qemu-devel@nongnu.org; Thu, 18 Jan 2018 12:49:32 -0500 Received: from mail-am5eur03on0716.outbound.protection.outlook.com ([2a01:111:f400:fe08::716]:42208 helo=EUR03-AM5-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 1ecEJf-0004Ce-CZ; Thu, 18 Jan 2018 12:49:31 -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=Zhknt/8UzvVxChRuLc/BwdR5Fadkzg21OOFPSB0IPZI=; b=OMxVunCEsXYRFcnQ32RFNIoxlyUm8r6USDT2MuPlR0pBkjVPA5oFeDjRjnwvKqp7w8dMzm6y2CySCzE4oNhRA1bWU26ETo4PREqbmWCdnS0rKTubqVYdO4WoamBUIy88ayO99TrcVlTX5vbq1p9vwjmZs6gGmwwx0pQG0Pht500= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=anton.nefedov@virtuozzo.com; Received: from xantnef-ws.sw.ru (195.214.232.6) by HE1PR0801MB1995.eurprd08.prod.outlook.com (2603:10a6:3:50::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Thu, 18 Jan 2018 17:49:27 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Thu, 18 Jan 2018 20:49:07 +0300 Message-Id: <1516297747-107232-10-git-send-email-anton.nefedov@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516297747-107232-1-git-send-email-anton.nefedov@virtuozzo.com> References: <1516297747-107232-1-git-send-email-anton.nefedov@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HE1PR05CA0132.eurprd05.prod.outlook.com (2603:10a6:7:28::19) To HE1PR0801MB1995.eurprd08.prod.outlook.com (2603:10a6:3:50::8) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 01a78f33-fac8-4d44-8309-08d55e9bd221 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:HE1PR0801MB1995; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1995; 3:D/970s7/e2xh7kTL8l4diokv17infEEP8LI2xICgkh35hV5nZaFUp1RVUkjjryQ6tc2yz3N/FUae+qGjXsw4di9TxqdCOLOBCPGwle7HrG7Yhm44GID8BTBOu/IS3nh9jSCdL0QCC+kgYSjy1Iea+B4n+XETrpHV8EPf3xNGpEii5mzfcRDxwwfaQLatsniBTNA9YoqYNhhhxqnYBn/+3lpJ78mgisH5gRGzRhBdqqw7s2DiB7efdDa1J1j21qy1; 25:MtCasa+wVclkUZo7o/O1W+aWERxY5sSp1xbU4XY3q42lXZ+LthZHlajJo84hQic7dzsL2l9UNs9IB3LxQSolFJ0etgJk4PMehediz5+ANb5UOPKFmvynnjq+DtL+ui+jTqYRYLoPw72s04HZYGj0I604OzBn13IQoFHuRqd80v684AoWgsccfhF8vvF3Kvp3svVbbPLr43vqZsZUAPTgff/GtXsAXyNqTXabwxQR4V7kX/h0dnjp4W/gXlqovB4t6oXzVAS3FIY768Vi+MZiqMkpZJYN49zrhEnc5CmZ59II5y/R93ss+Vovz8FuWGCbZPKeu1Ug/q9Y1ITl15MBHA==; 31:8QsiHePKuFaEjWprRdTxT5jneaANk1VdCYLsH6Hu1IyhhAuJNuMuraAfgO7Jy0cQUFhXalihuaH+V+4EaQFfwYgvqijLZfK/59USLzQWBbboHzbi9DBNZ0bbCY84X9yOJYK1HmHeBy8tbnwBC3cvIFNWRwlSwKoENLyP7JH2cpXH1Ov6eWAethKe3FharZrV/e6zMXecDnG74RXOjAZ39wkIFT6H7Q6BY7fFXr8vcHo= X-MS-TrafficTypeDiagnostic: HE1PR0801MB1995: X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1995; 20:utvsEPqrlCObhDAnQr6oWPzfUMH2fSx33H+hMFMsTv9x7yKYs0j794Ysk3VsQCZa8OQW+LFuR7SicspfAlxg34WF2XutSGkxMe0Wx6UYaI1e7xDcCk1EA8JGflQW/IkYX7PGsIL359VqGOIWjET7jz2Nl2VcekGIGDMFuiheFgnptN54hbvPANORPf33nE2U+ugVVopGrHgy5noHhm+eGLcxBV/TKJY+NK+JWNgbqWTDD5MditnrErfleRZ1Ths7tEv5daVV1QxPGGWhh9RSI9JNDCLOVlpeRWbN10yICphYpkMyAh2IW35fLoXo7gc5zBrZpV/jmQonWvsWYEPQDqBJJqQtd/T+kx9mx06Gd3/P5u5tm81a4zzW9mDLD7nvJ1vequUPmjO/leOYKfnCAlOB5oQ434KezL5pZgbJCTs=; 4:UDTkPZkjQ7ALhRI/gOOGAZ/tvFeNnOxnfBTKO49uMCFt9vVPGONPC66sCGGPagfHKfBTEwd7QdnMaHYNagjzT0ITf2fz1oHO37MK0u1HCXw41BeqQjjblmfcde++9eKWpvfiiWAACVsIYe2N+f04WWs/CrN/MtDNU0LKZOMKIo43tu4b4z0mEuJZi+rich5UMN0E0LYErT8wPEcCszlcaV2G1yk8XwBbXm8FT9s1xqPgWcbOrXHac2RyJuq6gf3tLpQ0DwV+8dXBUs2O0M0V5w== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040495)(2401047)(8121501046)(5005006)(10201501046)(3231023)(2400065)(944501161)(3002001)(93006095)(93001095)(6041282)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123560045)(20161123562045)(6072148)(201708071742011); SRVR:HE1PR0801MB1995; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:HE1PR0801MB1995; X-Forefront-PRVS: 05568D1FF7 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(346002)(39850400004)(376002)(396003)(39380400002)(366004)(199004)(189003)(50226002)(6512007)(16586007)(316002)(2906002)(16526018)(53936002)(2351001)(6666003)(5660300001)(66066001)(51416003)(6916009)(69596002)(59450400001)(7736002)(2950100002)(86362001)(2361001)(76176011)(478600001)(97736004)(107886003)(105586002)(50466002)(6116002)(47776003)(68736007)(52116002)(26005)(8676002)(6506007)(305945005)(3846002)(386003)(36756003)(81166006)(81156014)(53416004)(6486002)(8936002)(25786009)(106356001)(4326008)(48376002)(21314002); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR0801MB1995; 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; HE1PR0801MB1995; 23:4TadWQHz8f7Ji/+fUQnYB6towauPjv/S8fWU6pw?= =?us-ascii?Q?ew98k40fIDpNQWJmiF0zwRyQznnlBn9FsIK7xpI0W2ey5lhEi5dVbsJeBI59?= =?us-ascii?Q?yCUaxu+cWYYsdWAnr2JISY4IdA5+tvKi/LTZ8vV7GM4sW3T1ObVZ3ehO1GJs?= =?us-ascii?Q?y9uWSQ7o/NusqMXCI+yAqd98jLQoqFLLqGjKhHac0m3lSxqtWUMCNK2sHnEf?= =?us-ascii?Q?vhdkcCVtVMudYCj/Xf+/or89p2nPb3lDacTkK9qh+jgtReeuO07OHRovQpUr?= =?us-ascii?Q?Yft/6LyFAMdx8dGj2de9XCetyL6BTPnEFMTVJZi8d/2TRtmgs7tPZz1O8yLj?= =?us-ascii?Q?6vAUT0NprgxOyGRVv/LOGFTtfwzMrnfgw9LOD8mTAdm/bMEbe/1IVSgD/ahk?= =?us-ascii?Q?K32CEe5neme9qujqgTnbvSTuNxBp706yg7IU7kfDPpufyyNRo8So5Lc8+aXh?= =?us-ascii?Q?Xcre2rAZDOTe3AnIvNHV8g8Yu49tnUj0xjvm7Q/rp5EJLtBy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ange-CrossTenant-OriginalArrivalTime: 18 Jan 2018 17:49:27.8334 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 01a78f33-fac8-4d44-8309-08d55e9bd221 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1995 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 2a01:111:f400:fe08::716 Subject: [Qemu-devel] [PATCH v7 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)