From patchwork Tue Jul 11 12:40:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Butsykin X-Patchwork-Id: 9834669 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 DC19A60363 for ; Tue, 11 Jul 2017 12:54:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB08228462 for ; Tue, 11 Jul 2017 12:54:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BFBA428470; Tue, 11 Jul 2017 12:54:51 +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 D55BC28462 for ; Tue, 11 Jul 2017 12:54:50 +0000 (UTC) Received: from localhost ([::1]:46207 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUugk-0005lE-4n for patchwork-qemu-devel@patchwork.kernel.org; Tue, 11 Jul 2017 08:54:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34647) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUuXZ-0006O9-QV for qemu-devel@nongnu.org; Tue, 11 Jul 2017 08:45:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUuXY-0005ms-CZ for qemu-devel@nongnu.org; Tue, 11 Jul 2017 08:45:21 -0400 Received: from mail-eopbgr30108.outbound.protection.outlook.com ([40.107.3.108]:53030 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 1dUuXU-0005jN-KV; Tue, 11 Jul 2017 08:45:16 -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=OwO1JBkF6Ie6m/Q3T4i6TGu1vDDWnNU1O5y/rLzIvf0=; b=YjAi1tbnrtqTiRNEhGeiDfYw6ffDcCzRyhMUFkf2o5tfo0Nzl4Zfi2ngxKEYc6F8giMgCXBooauTtcsy6V1PcZRnvYeo1E3LNK+P1IC2VoVgj0MmBWAPsk1wBp0ZKhRgg6n+0CiauBgUZ9wtOT5CU3TlIKwEkxu+7L9oBAwDU5c= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none; nongnu.org; dmarc=none action=none header.from=virtuozzo.com; Received: from pavelb-Z68P-DS3.sw.ru (195.214.232.6) by HE1PR0802MB2555.eurprd08.prod.outlook.com (2603:10a6:3:e1::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1240.13; Tue, 11 Jul 2017 12:45:14 +0000 From: Pavel Butsykin To: qemu-block@nongnu.org, qemu-devel@nongnu.org Date: Tue, 11 Jul 2017 15:40:24 +0300 Message-Id: <20170711124024.1396-5-pbutsykin@virtuozzo.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170711124024.1396-1-pbutsykin@virtuozzo.com> References: <20170711124024.1396-1-pbutsykin@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: AM4PR05CA0001.eurprd05.prod.outlook.com (2603:10a6:205::14) To HE1PR0802MB2555.eurprd08.prod.outlook.com (2603:10a6:3:e1::20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c9371efa-f0d7-47d9-642b-08d4c85aadf2 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:HE1PR0802MB2555; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0802MB2555; 3:LJ+nwrzCMItEb+d1rVqFk/WTwKdM3xu4iaGXWsqQ5q6tTK7iib9Po94/g0nFfU39eQdY9tjR/4TfjkwEcrIdKNgHzYskdzuYBtgeHVpFIUTiz2JvR4eNDXwx1tQIdFpLeKkhoUZgcUKOU9oC980JE25gp/xvFQWhwFKFWqrqcozwXD5IvGG0siQTsUJkulXPSbu+yRkiv4d88HNRNqAx1iPWrPg4wm6+hLCbAK8kaFeDupTDLUQ0BheRXBn9NxSXvR7vDfI+2FsUAWJbee3jLlyk3vf+uIpCEODfDiZNG7RnSsNQdvVJhNNQvyIFy7oNwxw+54FpH3y74elhjj+/bfiJWaaY4vo0aKUeY96fT51WQVwofIGoWpQue1RB7/CAL++jVJzBqbM+DmrOzRNR2dJY3ghyblU36dt7C1RTAsQjAchRfxzcqu/koqNxe8g+Y42qhg2nJQxRvU4742dfRMbWrnOcso3AYLg0H5HkcY+poxfY+0JCBOeBirrBDRkoQ9lnsoPmGz/eXupiWo29r/+XsIIfUtjE/0TNk1XehhNY8JINX9jbrpqU0dkgwPr5enRyvy7urA32TdnZpPpFfyEK4YM7wqVds0EPlOT1hl1tEiFBUWwSnzG70+E1Kz8bJTru+40q6Gs+BlQWLeLhE8Ca6rQirfN/tNkVv6wNxfUFIUaGPgEHhOvdpK1kq7bnBrMdtf9N0JhAlqWqNyr1Fl7dc8mFIFxApZP1L8wKkMU= X-MS-TrafficTypeDiagnostic: HE1PR0802MB2555: X-Microsoft-Exch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qnBqyHGwNEw4TPs= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(250305191791016)(22074186197030)(236129657087228)(48057245064654)(148574349560750)(50300203121483); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(2017060910075)(5005006)(8121501046)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6041248)(20161123555025)(20161123560025)(20161123558100)(20161123564025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:HE1PR0802MB2555; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:HE1PR0802MB2555; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0802MB2555; 4:0/2wYr1kG8Hb8JvP3BTb3zj2bJANPOyjsuOkrrKw?= =?us-ascii?Q?4FUozX+bXIWgRgqvzi7cVi+C8pDGIhdbdW+EptzhDliKciBcEIzneC59n8CG?= =?us-ascii?Q?K7t0sqLV2KSAxTFvOEXQsUN3p/ks79Vys2fBbZIq6f7sVfRsZcj4LOzrjih6?= =?us-ascii?Q?zVJ0SW1Daibo5d4nf1bd77eZcXcbJg3gd9gzAPV7MkWqIOvUmrjF7iD9x68d?= =?us-ascii?Q?OCGOdVgWX8d5ZsH7rMuNM74W3hQ2UXGlR7y+c2I4vzULjQBjmSZgvFw/xibM?= =?us-ascii?Q?EuZ/w7Pck93cVObgeBc9P/jFu1VDmzztiFg3f8v4L4j7KSeejBE9ulfSB86A?= =?us-ascii?Q?tz4b0Nta85RjVGUlIbfHA0CVXX3KpjNGUqPddAHMwa7mVMURMrs3jW4gQguo?= =?us-ascii?Q?wfFXJO2uUA/AcUTsD7erqGeXrTtuhis8lgCWLBCzJS0Zwy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4arHZyz6wAfgT0V8zRPHq7Od073QP2CGiz9XYOZlAeAbfEvDpQO?= =?us-ascii?Q?9GY9sLrgmLV3Ivy+0BpI0l06/CskGoKngshmssntXZbbIgxO?= X-Forefront-PRVS: 0365C0E14B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(7370300001)(6009001)(39450400003)(39830400002)(39400400002)(39410400002)(6666003)(2906002)(478600001)(5003940100001)(86362001)(5660300001)(2950100002)(36756003)(8676002)(50226002)(1076002)(50466002)(6506006)(6512007)(53936002)(6486002)(50986999)(6306002)(48376002)(76176999)(7736002)(6116002)(305945005)(53416004)(3846002)(42186005)(33646002)(81166006)(7350300001)(4326008)(25786009)(110136004)(38730400002)(189998001)(66066001)(47776003)(107886003); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR0802MB2555; H:pavelb-Z68P-DS3.sw.ru; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0802MB2555; 23:vHY8Ay6tqfhgj9mZgqgjoqBKZdodST/08tvF0ut?= =?us-ascii?Q?y8b7U0ceShKcuPBJN53RbHxdXTBhS98vgMKg9FXC4tHtzgUsfZBYUrS9lJM8?= =?us-ascii?Q?kEsFJXGm+1jtyj0MFjkoSdYakxKJGDF2MSMbpMtv2bG6XQzeQJmmiMSDxDVx?= =?us-ascii?Q?3IjcUyugc0yXYSNP9kA8wQ7jP6enfsGbmvDW2qWGPWM2onUX9LnJHER7SxNf?= =?us-ascii?Q?oa9lEvfko5blK0HXJb0FMeG2KpuAIUsbc8ZeU5+oOtW2ksfqYpvUXdIh94oR?= =?us-ascii?Q?/ITlynpVh/ltBgf5JgGDlPF3HTEvCdykYDyxFIypxHIpnd6eAeGw6z9veU+1?= =?us-ascii?Q?DSL5xuIORtQLizPtuMBz+hgZgLcIYcmYRx7i0l4I/SDekay/nbNDSXP2RWsD?= =?us-ascii?Q?yMx8Mr3zDOaKxAApJCvCdOLyXrGH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RnzO?= =?us-ascii?Q?C/U=3D?= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0802MB2555; 5:5pefH0nN7OjcGhfu1YB0O9meGzaNf4BDFnu41TWpDxpnEHZa2EQi279ObOpYTWcEHELGwATfjThEk/nfs2/2e21mi52nn2fCffsIsbK13E3+Sjnf1m/oD8vqOPQ1HNakvPkybB+tGKHjK7fWXtskMgx898QuIBFpVKRdKOQkGksk1iNVzoESUD1Bly8y/eXjiFnRZ6pK5OqGjWPFh8wn9LFRQm4v6BfnckZ+6JgeNGEjBBsNd87+jns2gxrnYfhRfd8/wxmnmpuw2Hcby5bRWbVyZik9Ida/ZtGKcS+xhv0WvhMdPwu/Hz6bq7J7YojUCyIlkdVJWn8KNPSvtu1bfgQ2Nfbsg8o5vqKpn6szz6JZKISjjW8nTJytb2FZjV3e5EGNy6GwuKtmdSWzoft+NRwOrQg2p5tZGXHA21fyfGV59OyHm/R7fzTCuyt9TMXNNl7IuZ8os3nNyjI7xo0X9SroYK+7c1aZ3X4LVByAPOLdj5U2SLNvgDYfiQLL6+M9; 24:UbJMg60nMjAZpoLckiZkRumAfrX5lP57zejSC6ZrXxiN3Ytjz+QDJAWiPz/PIo5gUUBTJY8vX3LIQ3Am5l1jZKlwjiNbONLsiXnQrCvmPHE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0802MB2555; 7:kFYg4j95kmCK2sSUwUsfOWKRk6PYicPBqPrIvbyUH1plmVuRX6c+wcIgKFX+QZgaTCLka69tzLnaZmeeBfaasWAR4qj2m400p9rCp9qLRq6SnK04Zv/YEc3coLlFVsIUEhKql8Lr2z9zRfnDrkkDIHpQ34MDm7LmspeGDRFa9UdTKFcRmRtTkRIm1HZiUODXfYLDXNFG181L+uJeCRotm8LTqGouDAEft6gEXa1SlDgukw2nyItEil+1B+1fZMi40+NYAsGcPSfauQ71ldsUUoU6z3KsS3hZtXrFuoeZJmcaYgCoFdV+7QqT/kWVHDbcWLmNTv2bJV9a1bquwmH8scZdPrfLnFrq82RtDeinNxn/Ggz5X1eP/lEoZqbailsEKk6Uq4OyY2+B/in2im30WmbYUAmCGupPVbmvmTkA4ULMC5/8silwXl1eYIa33zWDbxSm2zIFiq04V119N6UWuuqM/y3hngr+MB1j8xnH3W625D900PQS8eMlJQoC4WC0e1tuAZ/NWmvcfBaWEzN0NrvimV5ab2BYiSyTunrWsGtVsb6MvI3anwPd3xiJM0cXOWMKX6nzRPxe64Nr3RrX2rO8VqZLBKylVJKQ6Y+qdLgNtnn42r8O2eYnh8y6jXj2CO6qko0Dt0a8BvHcY3HsBszWmbHlzduKYlZv80e6HqqyMz45+WLw9K1UY7ObsHTSqqgifOtlNjby+maDrzGlky717zyXCvdigQVbe463lmKbBsPrPaVE7KgzlT61rSdtKdBk4u53e2ncx9HsERo5cyxUQmNdLfMYll4l3rN3e+8= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0802MB2555; 20:1y1m6GrY1Q7G4AdmwZxiTsuCcBhb3r94K1iqNtEU34faeLTd/ZCVh/lasy2LH0BTdB/jdcyCLQx5hsFu0T1erBb7OnLf2jwNYR3rS7FVYGbm9B7U4YG7TiewABgXLcTpHR085fuMIHn3FZw7yi35wd/+CsZD8IzvBT9IjkJ9X2U= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jul 2017 12:45:14.8131 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0802MB2555 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.3.108 Subject: [Qemu-devel] [PATCH v4 4/4] qemu-iotests: add shrinking image test 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, pbutsykin@virtuozzo.com, armbru@redhat.com, mreitz@redhat.com, den@openvz.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Pavel Butsykin Reviewed-by: Max Reitz --- tests/qemu-iotests/163 | 170 +++++++++++++++++++++++++++++++++++++++++++++ tests/qemu-iotests/163.out | 5 ++ tests/qemu-iotests/group | 1 + 3 files changed, 176 insertions(+) create mode 100644 tests/qemu-iotests/163 create mode 100644 tests/qemu-iotests/163.out diff --git a/tests/qemu-iotests/163 b/tests/qemu-iotests/163 new file mode 100644 index 0000000000..403842354e --- /dev/null +++ b/tests/qemu-iotests/163 @@ -0,0 +1,170 @@ +#!/usr/bin/env python +# +# Tests for shrinking images +# +# Copyright (c) 2016-2017 Parallels International GmbH +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +import os, random, iotests, struct, qcow2 +from iotests import qemu_img, qemu_io, image_size + +test_img = os.path.join(iotests.test_dir, 'test.img') +check_img = os.path.join(iotests.test_dir, 'check.img') + +def size_to_int(str): + suff = ['B', 'K', 'M', 'G', 'T'] + return int(str[:-1]) * 1024**suff.index(str[-1:]) + +class ShrinkBaseClass(iotests.QMPTestCase): + image_len = '128M' + shrink_size = '10M' + chunk_size = '16M' + refcount_bits = '16' + + def __qcow2_check(self, filename): + entry_bits = 3 + entry_size = 1 << entry_bits + l1_mask = 0x00fffffffffffe00 + div_roundup = lambda n, d: (n + d - 1) / d + + def split_by_n(data, n): + for x in xrange(0, len(data), n): + yield struct.unpack('>Q', data[x:x + n])[0] & l1_mask + + def check_l1_table(h, l1_data): + l1_list = list(split_by_n(l1_data, entry_size)) + real_l1_size = div_roundup(h.size, + 1 << (h.cluster_bits*2 - entry_size)) + used, unused = l1_list[:real_l1_size], l1_list[real_l1_size:] + + self.assertTrue(len(used) != 0, "Verifying l1 table content") + self.assertFalse(any(unused), "Verifying l1 table content") + + def check_reftable(fd, h, reftable): + for offset in split_by_n(reftable, entry_size): + if offset != 0: + fd.seek(offset) + cluster = fd.read(1 << h.cluster_bits) + self.assertTrue(any(cluster), "Verifying reftable content") + + with open(filename, "rb") as fd: + h = qcow2.QcowHeader(fd) + + fd.seek(h.l1_table_offset) + l1_table = fd.read(h.l1_size << entry_bits) + + fd.seek(h.refcount_table_offset) + reftable = fd.read(h.refcount_table_clusters << h.cluster_bits) + + check_l1_table(h, l1_table) + check_reftable(fd, h, reftable) + + def __raw_check(self, filename): + pass + + image_check = { + 'qcow2' : __qcow2_check, + 'raw' : __raw_check + } + + def setUp(self): + if iotests.imgfmt == 'raw': + qemu_img('create', '-f', iotests.imgfmt, test_img, self.image_len) + qemu_img('create', '-f', iotests.imgfmt, check_img, + self.shrink_size) + else: + qemu_img('create', '-f', iotests.imgfmt, + '-o', 'cluster_size=' + self.cluster_size + + ',refcount_bits=' + self.refcount_bits, + test_img, self.image_len) + qemu_img('create', '-f', iotests.imgfmt, + '-o', 'cluster_size=%s'% self.cluster_size, + check_img, self.shrink_size) + qemu_io('-c', 'write -P 0xff 0 ' + self.shrink_size, check_img) + + def tearDown(self): + os.remove(test_img) + os.remove(check_img) + + def image_verify(self): + self.assertEqual(image_size(test_img), image_size(check_img), + "Verifying image size") + self.image_check[iotests.imgfmt](self, test_img) + + if iotests.imgfmt == 'raw': + return + self.assertEqual(qemu_img('check', test_img), 0, + "Verifying image corruption") + + def test_empty_image(self): + qemu_img('resize', '-f', iotests.imgfmt, '--shrink', test_img, + self.shrink_size) + + self.assertEqual( + qemu_io('-c', 'read -P 0x00 %s'%self.shrink_size, test_img), + qemu_io('-c', 'read -P 0x00 %s'%self.shrink_size, check_img), + "Verifying image content") + + self.image_verify() + + def test_sequential_write(self): + for offs in range(0, size_to_int(self.image_len), + size_to_int(self.chunk_size)): + qemu_io('-c', 'write -P 0xff %d %s' % (offs, self.chunk_size), + test_img) + + qemu_img('resize', '-f', iotests.imgfmt, '--shrink', test_img, + self.shrink_size) + + self.assertEqual(qemu_img("compare", test_img, check_img), 0, + "Verifying image content") + + self.image_verify() + + def test_random_write(self): + offs_list = range(0, size_to_int(self.image_len), + size_to_int(self.chunk_size)) + random.shuffle(offs_list) + for offs in offs_list: + qemu_io('-c', 'write -P 0xff %d %s' % (offs, self.chunk_size), + test_img) + + qemu_img('resize', '-f', iotests.imgfmt, '--shrink', test_img, + self.shrink_size) + + self.assertEqual(qemu_img("compare", test_img, check_img), 0, + "Verifying image content") + + self.image_verify() + +class TestShrink512(ShrinkBaseClass): + image_len = '3M' + shrink_size = '1M' + chunk_size = '256K' + cluster_size = '512' + refcount_bits = '64' + +class TestShrink64K(ShrinkBaseClass): + cluster_size = '64K' + +class TestShrink1M(ShrinkBaseClass): + cluster_size = '1M' + refcount_bits = '1' + +ShrinkBaseClass = None + +if __name__ == '__main__': + iotests.main(supported_fmts=['raw', 'qcow2']) diff --git a/tests/qemu-iotests/163.out b/tests/qemu-iotests/163.out new file mode 100644 index 0000000000..dae404e278 --- /dev/null +++ b/tests/qemu-iotests/163.out @@ -0,0 +1,5 @@ +......... +---------------------------------------------------------------------- +Ran 9 tests + +OK diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group index 318ae74b10..542947eeba 100644 --- a/tests/qemu-iotests/group +++ b/tests/qemu-iotests/group @@ -163,6 +163,7 @@ 159 rw auto quick 160 rw auto quick 162 auto quick +163 rw auto quick 170 rw auto quick 171 rw auto quick 172 auto