From patchwork Mon Jan 14 11:18:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 10762253 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 24D8B1390 for ; Mon, 14 Jan 2019 11:27:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 14CF528AD3 for ; Mon, 14 Jan 2019 11:27:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0661228AE7; Mon, 14 Jan 2019 11:27:54 +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=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1DA6E286BD for ; Mon, 14 Jan 2019 11:27:52 +0000 (UTC) Received: from localhost ([127.0.0.1]:50799 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gj0PH-0007nj-TR for patchwork-qemu-devel@patchwork.kernel.org; Mon, 14 Jan 2019 06:27:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37510) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gj0Gd-0000XN-S5 for qemu-devel@nongnu.org; Mon, 14 Jan 2019 06:18:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gj0GY-000174-SI for qemu-devel@nongnu.org; Mon, 14 Jan 2019 06:18:53 -0500 Received: from mail-ve1eur03on070b.outbound.protection.outlook.com ([2a01:111:f400:fe09::70b]:6069 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 1gj0GX-0000i2-6i; Mon, 14 Jan 2019 06:18: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=LxLvyWpV+tB15iyYgwjMaBcJEv1NUh2zFw32Qu65eMW7EHh0LUmbhtJC5Pfzzm24FMEik+n9rPHOvuLwgJPLLa1M0ZfkYLSDLUor0GhAreT0aamDHIg2WciBV4V0tKXLEYgkiN2CG6qTdjOMqHvfHc/dD6YM/UZ+O2kdi2dgLeo= Received: from AM0PR08MB4292.eurprd08.prod.outlook.com (20.179.33.17) by AM0PR08MB3092.eurprd08.prod.outlook.com (52.134.93.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1516.18; Mon, 14 Jan 2019 11:18:31 +0000 Received: from AM0PR08MB4292.eurprd08.prod.outlook.com ([fe80::d13a:1305:bb54:1916]) by AM0PR08MB4292.eurprd08.prod.outlook.com ([fe80::d13a:1305:bb54:1916%6]) with mapi id 15.20.1516.019; Mon, 14 Jan 2019 11:18:31 +0000 From: Anton Nefedov To: "qemu-devel@nongnu.org" Thread-Topic: [PATCH v12 10/10] iotest 134: test cluster-misaligned encrypted write Thread-Index: AQHUq/rh+JsWfNJSRUScsuM7Yl0lBA== Date: Mon, 14 Jan 2019 11:18:31 +0000 Message-ID: <20190114111744.113188-11-anton.nefedov@virtuozzo.com> References: <20190114111744.113188-1-anton.nefedov@virtuozzo.com> In-Reply-To: <20190114111744.113188-1-anton.nefedov@virtuozzo.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HE1PR0701CA0065.eurprd07.prod.outlook.com (2603:10a6:3:9e::33) To AM0PR08MB4292.eurprd08.prod.outlook.com (2603:10a6:208:13b::17) authentication-results: spf=none (sender IP is ) smtp.mailfrom=anton.nefedov@virtuozzo.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [185.231.240.5] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM0PR08MB3092; 20:FXarOPv5GnWgjuCJvfxTEkPG+962oBXneMMw54wA5NACmM/drPleL+gSa4wz1fi5HpQIWYtDWfNt5y0o3XFekIpUVq7sxmBjJHh0mighFPiMDFkhmSH99YHwUOlNMpux8IwrcmSBkVWKHOFYGNe3+Mz7yIDVCzxX2z2on7D9xMY= x-ms-office365-filtering-correlation-id: 24eee93f-4332-4bb4-301c-08d67a120402 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(2017052603328)(7153060)(7193020); SRVR:AM0PR08MB3092; x-ms-traffictypediagnostic: AM0PR08MB3092: x-microsoft-antispam-prvs: x-forefront-prvs: 0917DFAC67 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(979002)(396003)(366004)(346002)(376002)(136003)(39840400004)(199004)(189003)(316002)(2616005)(478600001)(11346002)(6916009)(486006)(8676002)(6506007)(4326008)(14444005)(256004)(81166006)(86362001)(81156014)(386003)(3846002)(1076003)(44832011)(6116002)(68736007)(50226002)(66066001)(36756003)(54906003)(71190400001)(476003)(71200400001)(446003)(5660300001)(105586002)(2501003)(8936002)(5640700003)(53936002)(6436002)(26005)(6512007)(6486002)(305945005)(2351001)(25786009)(2906002)(186003)(102836004)(107886003)(14454004)(97736004)(7736002)(106356001)(76176011)(99286004)(52116002)(21314003)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1102; SCL:1; SRVR:AM0PR08MB3092; H:AM0PR08MB4292.eurprd08.prod.outlook.com; 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-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: C83cn2geY8ImoZtlBlnq5XIJgI4oylYvBAsZMTzQCTCOE9oSDo+/RhepsefNtpS/0CVFw5/mX3Jy/xMKiKW2t/ZowFPebSl5KgJwdGiJjaUNF1Cdeh2CDDKEbqjACFgn7LcJqHmDIfFQFwsDlIzIK0BozZeME6+qU5iL0Dx+RYBbmYK9rkE12ZUw3pIBND8xOX5KDucwAFO/ZmDjjWyX9O1Hu5mZ1Ov0KjxhKZMrP2xMJVtuRM1EjP0nHoCoPpMy86zu1Q0nRHUz/k7/Ir1OQv8ujhSDJUs2XSTqpZ4uimkDimHUYE05iaXuE90w0yxTTUKLycwPYdLB1YcWQBgpI+OPyT+wxcm7pYTAnzu6NH3BZC/BxZyHo3RlrlV4KG6Xs9AwrP3HeSDFWFfj9lvwDcaum3aQdI0HZuAl7BRGzHI= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 24eee93f-4332-4bb4-301c-08d67a120402 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Jan 2019 11:18:30.8872 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3092 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 2a01:111:f400:fe09::70b Subject: [Qemu-devel] [PATCH v12 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)