From patchwork Tue Dec 18 07:57:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 10735005 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 39C6B14DE for ; Tue, 18 Dec 2018 08:04:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A81629426 for ; Tue, 18 Dec 2018 08:04:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1D30729853; Tue, 18 Dec 2018 08:04:02 +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.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 990DD29426 for ; Tue, 18 Dec 2018 08:04:01 +0000 (UTC) Received: from localhost ([::1]:52383 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZAMC-0002ID-N9 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 18 Dec 2018 03:04:00 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47691) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZAGH-0006ZA-JN for qemu-devel@nongnu.org; Tue, 18 Dec 2018 02:57:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZAGE-0003mi-Bo for qemu-devel@nongnu.org; Tue, 18 Dec 2018 02:57:53 -0500 Received: from mail-am5eur02on0706.outbound.protection.outlook.com ([2a01:111:f400:fe07::706]:42592 helo=EUR02-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 1gZAGD-0003ly-Vw; Tue, 18 Dec 2018 02:57:50 -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:X-MS-Exchange-SenderADCheck; bh=ZsPRd/+7V0SoxigRqm20RMePq0NSbY8JpO+QRsCj7AQ=; b=LmgEd9CXLFEGZgMZRJuy1PqUyw6WDSuFTFLousG/P0X/UuXajKsNaYJ32j16vD3H8lQt5eynz4g2r2BBPL8YFxxYLS5ap813Gq5pKBDGtbvPDXdDnLbiTfRrK5oy9x27b46IjsXDJ2g1OdsENb7qxU5wZahwUAAzkTn9RnQ6YIA= Received: from AM0PR08MB3347.eurprd08.prod.outlook.com (52.134.94.148) by AM0PR08MB4033.eurprd08.prod.outlook.com (20.178.119.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1425.22; Tue, 18 Dec 2018 07:57:48 +0000 Received: from AM0PR08MB3347.eurprd08.prod.outlook.com ([fe80::cceb:42e9:4742:393]) by AM0PR08MB3347.eurprd08.prod.outlook.com ([fe80::cceb:42e9:4742:393%2]) with mapi id 15.20.1425.023; Tue, 18 Dec 2018 07:57:48 +0000 From: Anton Nefedov To: "qemu-devel@nongnu.org" Thread-Topic: [PATCH v11 10/10] iotest 134: test cluster-misaligned encrypted write Thread-Index: AQHUlqdeR7AMLYK31EugEGRz/j0x3Q== Date: Tue, 18 Dec 2018 07:57:48 +0000 Message-ID: <20181218075707.12006-11-anton.nefedov@virtuozzo.com> References: <20181218075707.12006-1-anton.nefedov@virtuozzo.com> In-Reply-To: <20181218075707.12006-1-anton.nefedov@virtuozzo.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HE1P191CA0007.EURP191.PROD.OUTLOOK.COM (2603:10a6:3:cf::17) To AM0PR08MB3347.eurprd08.prod.outlook.com (2603:10a6:208:5f::20) authentication-results: spf=none (sender IP is ) smtp.mailfrom=anton.nefedov@virtuozzo.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [185.231.240.5] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM0PR08MB4033; 20:sIz7fZgFa1bEGFgCGRV1gG+8phexWcoqA7kJ/KvfhD5/s4GP88oqKq221JstXwWbBbVWhFpfpdTrc/LymKYu3XkWYEMJ1Z9beyQTmIA/tTmqrH8Bz9BcaD3MioToAociX0zBy0LR579YQhZQk/k7E/kCLGLaInMv1NmhDe+qHWw= x-ms-office365-filtering-correlation-id: 4ccea9e1-6b61-417a-75cb-08d664be805f x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:AM0PR08MB4033; x-ms-traffictypediagnostic: AM0PR08MB4033: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(3230021)(999002)(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231475)(944501520)(52105112)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201708071742011)(7699051)(76991095); SRVR:AM0PR08MB4033; BCL:0; PCL:0; RULEID:; SRVR:AM0PR08MB4033; x-forefront-prvs: 08902E536D x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(396003)(366004)(136003)(376002)(39850400004)(189003)(199004)(14454004)(6436002)(5660300001)(66066001)(52116002)(102836004)(2906002)(54906003)(99286004)(6116002)(316002)(107886003)(6486002)(76176011)(4326008)(6512007)(3846002)(1076003)(478600001)(53936002)(7736002)(68736007)(5640700003)(25786009)(11346002)(26005)(14444005)(486006)(44832011)(186003)(2351001)(2501003)(305945005)(8936002)(105586002)(476003)(81166006)(97736004)(6916009)(106356001)(71190400001)(81156014)(8676002)(71200400001)(386003)(6506007)(86362001)(256004)(446003)(2616005)(36756003)(21314003); DIR:OUT; SFP:1102; SCL:1; SRVR:AM0PR08MB4033; H:AM0PR08MB3347.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 1Yz+TN2oSMr6PbehRSAm76uKMdjn9bXqyWYLA5VNNgPV/wu//epXnwcFKHhK/ucl+m8c33Zmvy6oKlPuUKCwB5K1iThau1JpA2SA2T5qfrGeCAq6c+JtHXVhgTlj4m5c9p0rUtLGEctl4JCqQUAyiKPGwiZlJvjKw8GRxbDSqE1xrjlNUw9Sli9fG4beS/8rQReGNwFh4WisM/k9zmmitEjUbIru4K56/qHM/mss4/BKkShx2Qy6M7ATUZSyRqYLNlW24mCMNcdXpdpHJWQ3ZhTRum41L0MA2h22Pna3nk7eiXW5T7sGCgL95JvQdYhO spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4ccea9e1-6b61-417a-75cb-08d664be805f X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Dec 2018 07:57:48.1994 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4033 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 2a01:111:f400:fe07::706 Subject: [Qemu-devel] [PATCH v11 10/10] 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" , Vladimir Sementsov-Ogievskiy , "berto@igalia.com" , Denis Lunev , "qemu-block@nongnu.org" , "mreitz@redhat.com" , Anton Nefedov 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 cacabcd28b..792c8ca12f 100755 --- a/tests/qemu-iotests/134 +++ b/tests/qemu-iotests/134 @@ -57,6 +57,15 @@ echo 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 972be49d91..09d46f6b17 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)