From patchwork Fri Jul 7 14:30:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Butsykin X-Patchwork-Id: 9830583 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 2C89460352 for ; Fri, 7 Jul 2017 14:35:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C35BF28647 for ; Fri, 7 Jul 2017 14:35:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B79402868D; Fri, 7 Jul 2017 14:35:13 +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 B8BC728647 for ; Fri, 7 Jul 2017 14:35:12 +0000 (UTC) Received: from localhost ([::1]:56852 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTULf-0003lj-7Z for patchwork-qemu-devel@patchwork.kernel.org; Fri, 07 Jul 2017 10:35:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49051) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTUI6-0001Lw-B1 for qemu-devel@nongnu.org; Fri, 07 Jul 2017 10:31:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dTUI4-0007pF-Ud for qemu-devel@nongnu.org; Fri, 07 Jul 2017 10:31:30 -0400 Received: from mail-db5eur01on0127.outbound.protection.outlook.com ([104.47.2.127]:43891 helo=EUR01-DB5-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 1dTUHz-0007l9-J1; Fri, 07 Jul 2017 10:31:23 -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=c1U3TR7ifv9oLk0ijCdLmACLlYvmHvZha7ZtLCzHieq5ELiEypZ+hPb00HPd4YZDpupUCV0mxnoNEfDsqSV82e1TsZ60vt072Kz28osQGl157lge8A6qnd0wK4/Qv3CBWmBBwY3G7Ci3IIAZtRWGyzaS11WU4WqHH1xsYk4e6+Q= 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 AM5PR0802MB2546.eurprd08.prod.outlook.com (2603:10a6:203:a0::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1240.13; Fri, 7 Jul 2017 14:31:15 +0000 From: Pavel Butsykin To: qemu-block@nongnu.org, qemu-devel@nongnu.org Date: Fri, 7 Jul 2017 17:30:28 +0300 Message-Id: <20170707143028.692-5-pbutsykin@virtuozzo.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170707143028.692-1-pbutsykin@virtuozzo.com> References: <20170707143028.692-1-pbutsykin@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: KL1P15301CA0023.APCP153.PROD.OUTLOOK.COM (2603:1096:802:2::33) To AM5PR0802MB2546.eurprd08.prod.outlook.com (2603:10a6:203:a0::22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1c289e2d-e148-4e69-495a-08d4c544d60b 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:AM5PR0802MB2546; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0802MB2546; 3:bS++WenUoCOEfoIvPmN1wfc0u1E2lVBUGX3g8I+rO/Y0h8krULnoFEqlXDoE4TtWNrZQLzPqiqYQW1P5O3IIxR3ZsBarVWva4CtEU7MOjynMGS8T8WFLjKgcRXRCsT2AQM5kdm8H16v3aawt+TNWVMY3gL0/cYPQUzIK1ze7VUdgOcKBrQyd96yCcJK+HdCfLqyY1esDwdIAnpYYyTnlp0+GLrdygmHNLvskyJ+jegAcCah7mM7yEOaC0UUhUFrnNocat+lAaGmr20BAtzG3aGeLZ0BHvTJy08dYl/tM6jJGhR+eUjIWtWCyld9DI/dwWi60iq5mRLjJwoRf2skAr7l5maa8CugLoFX6H0awadzDgdSWNUr1e6AErwsAb0ev8UkhVL3DNVJg+11Y+Rfrpv2VGUOYK+3eb9hCwCWgo33NRe788+IpSayYoYZ6S5wKAuBc82mwcjceaKkloQfWJWD92/eCkvGBg14xZsv6VM7MKbJ4Yb37vgV4Gxq14fyntobdCAfejrlCqeNoK22kHLobsqqC82yP5rKhvvWLLTdchmg0IXRGKX2ys6eYWpUmwm2JAQtxD1OdzRwUnIt8ttxjh3D+ounqy0D0OSVnDD0n/3R5WUo9gFmuKD46ijbYvPyx0xn8a9Z+w5ADsxaP1B21JJs7bNveiuxVjF9uYnlWd4w6Qy9UOjF1HRFdlyV5Zd4AIcXWFAHySCTtFz0bPB9z0mRmTrcpa2tMbSKYv9aLJGyEelb0rL4ftb//1/L3 X-MS-TrafficTypeDiagnostic: AM5PR0802MB2546: X-Microsoft-Exchange-Diagnostics: 1; AM5PR0802MB2546; 25:trnvFLvulcfC1Jk9m6Kst15FHXrrsCg5HS08l05yYOl6rXgFgBovrD4kAm1X1K8K/7M6LmqXImDI9YtnDIXOuda/txl7mEnpPo8NtzXXkjXGCWHdbpTPvvLddrG60bgwDH4rRmNsq9R50T5j/7iHhFrRfS7qiFedYF6i3TwvO8+gAn6oKLPaOoJqNGCJ3Et3qbfz1evPh+/QEkEZ2BxG4an04rRMc6gN9MkPzgJBFoI7uDsNTj3FjezbnOnYC2hmObNPGWLg5watsTDgsjQY+2qgh1PdKZFSuMNyL5a/Cy6FO7et++L8tIxQlCAYY26PfttHHL8V8o/hWvvDzh6DBj3ljRJtKXxItPkZnPzs9H6ZCYnISkc+EnveH9HSTTSJrAafoeRAJTqTRT+ba+HMH75cB6vx8OINjXJJimG7O6oDSlPFX2aAWlTTXwXGoO64iv3YaPSsNwLYRlO34e2teF3H0sS227qcspO+0QsF9/BqMICwuAzYjEFkzPbhN0WQQftIovSpXqqXRWidFXX8CqV5bFGYTHK0VWTgBWyVH5bt44s/2kSV4JXGIyQcO5zF0mHByUJaCIUqZftLcukt5X7L8Kh+/cR+0Dr6y4VnMOIBsNcH70KWCzX/j0zwmGewl75HcbVvPbu9orF/H3CZjttpXIX+U1XirdBQbBr22vfHRDJCZxUOrI89WfGUrLDRzPgR8nI/hKPb6lAws+4j/r1sf3epd6Unrr5H8A65L8gRByo38KURUEdFaF+HYu2UJAbLhGZE/joiXUHv9/zEvSw9409udQHja6S9MnJOjz1H9U9f4Fc+CUuER6dt+q9Z/5GfwmMYzt0Sz5SWmjxbhqzXtdlxZcjSmBzUykYUMtqeONZYWlxNED2fGDzsNCVAfywlZ0IJgWZ7IBZYGjcm3Am02LSUSpLuBWAlasLtSjM= X-Microsoft-Exchange-Diagnostics: 1; AM5PR0802MB2546; 31:X/VeEV0SlmLzQ++b5H6nTCDnxdGY5whrKtECnZ5fzvUEbal1Fv/D78USwFoLxyXH86r7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mqC2kw= 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)(8121501046)(5005006)(2017060910064)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(3002001)(6041248)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123562025)(20161123564025)(20161123560025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:AM5PR0802MB2546; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:AM5PR0802MB2546; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0802MB2546; 4:bGuphTHPpZYSk7FIBdst2QNf3rEGvr+ltlCIvstw?= =?us-ascii?Q?dGMLMCVDGHl5oebpr2KbF69kzEkAeyfBKxzxekXE847M8Uv4N2zL+t4UmKB3?= =?us-ascii?Q?KV4//bWQt6hDZkQaN3bBfmFKl12+WQAbBs0P+7Yl1/60SCTx0rtj/HDXTzbh?= =?us-ascii?Q?TvE0b+kBZ3yy2QutGxCgQ+QF93GdZdP7AWKbfZtWy5hBAnyF4Rbjzl2E28nq?= =?us-ascii?Q?zPWzWG1kILlLG7v+2BrHUbfLU7pCponipIeWHNvw2+Iec+o5jXh0uQy3pZR7?= =?us-ascii?Q?Ofj8mfw6H73lnxXEFQRbF84Z5JeWtTlO9GLXNv/7icnH5Rte4iWZR+LKfCfT?= =?us-ascii?Q?+ztipdXxcFXEMqBlr9LA0GOKwKbo3hD3BdMxi9i1TXUK8DUSasksGPajCcG4?= =?us-ascii?Q?zVCROQYdG7Bf+QuBWjiKrdbPY+JX2dnoc4sovx4jNAvqGyIHJSEdgR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2UEPgs3F4e8SvNnQe4sDIQuut2g4NjAQ1cIYCzgk5L5?= =?us-ascii?Q?R89L/6rPfxsUbRe4YUoz+zYeGEMWRV26SS0KmyXfAcJT9l/A?= X-Forefront-PRVS: 0361212EA8 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39410400002)(39840400002)(39450400003)(39400400002)(81166006)(36756003)(53416004)(8676002)(42186005)(50226002)(5003940100001)(189998001)(33646002)(6666003)(2950100002)(5660300001)(1076002)(6306002)(47776003)(76176999)(50986999)(6512007)(25786009)(48376002)(50466002)(305945005)(3846002)(7736002)(6486002)(53936002)(86362001)(66066001)(6506006)(6116002)(38730400002)(478600001)(107886003)(110136004)(4326008)(2906002); DIR:OUT; SFP:1102; SCL:1; SRVR:AM5PR0802MB2546; H:pavelb-Z68P-DS3.sw.ru; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0802MB2546; 23:jkrZum/IIG3CJGhXH+P6P/IMn9GWTya9xmVlmU/?= =?us-ascii?Q?+JuOLgxitzJwDcB/5SJqkoZainNFcCHnTFagdvot1Rw07g4wmh8r9ZGCd5Yq?= =?us-ascii?Q?L/C5g0VrY0BcV0tsOR2xUDAg7MlQMPJy7tdYcYVM3Cdp5qBILY19DYA3+Ff4?= =?us-ascii?Q?0xtR+xarvDXWRqj+rj4SAiIOQfGfuUYdyGsYpMMd4ptJZpkE5hoElSOU1Tj/?= =?us-ascii?Q?k4TwOhhkcsYZ4gIkFiMx6R8PIqRsZXxQi5vazwF7JClHfcmXlezBCRidCITu?= =?us-ascii?Q?PaKoJX6ydt9YhzisJtQyZvS4ATCoqN0VGHiAPpGURWS6R4u+fuOnnUTIX3rp?= =?us-ascii?Q?viQp2etjT6m/ByjhX3TZ86m53RxVUYMhI9bsjsRVOuBPvTXKStZ8PMf67DIk?= =?us-ascii?Q?MvFAZZ+ohXqOo8XuwnAnpnsRDkWQH4q1QPIg3hFS8hvdjRe4W+G8YetxIetp?= =?us-ascii?Q?jigQ7LSM6POsY+5kZU8UslKpBwVC5FQiioh4EouC96JaVmLfNx/+soujyM0+?= =?us-ascii?Q?bxwWpPdLjpD5xWn06IKoxjt2elfix50GvDQTIEJgLBtJ465Uy5EygWEOB5VV?= =?us-ascii?Q?NcYEGlRKogKFOqWuViq13TfqRQsON21LZjxreb3HbnKxwR/8WKDIEE/JS+w+?= =?us-ascii?Q?yCZwGf0xdXZVIdroHtBXwIaKLfortdq5elq+XuYbdlCBA6CUhRIYwbmVVUJW?= =?us-ascii?Q?f33obSY+ltSvQ+Jp7uGo62KlrsOFkuJOC6SkrJvjwZ13yY1cu8US0DQHydcg?= =?us-ascii?Q?O9GJksZjbhyc4DPDGLEzDNWdCPzqTvOib+CK1Ghevur6euoHpVnu7QRtJieM?= =?us-ascii?Q?RTO3NdL6kBWa9rsDZuy0IrFBOGrvPPeIaVxucdedCsypsLi64ta15h4zvWiW?= =?us-ascii?Q?MqyU96wj2D68dEQmNoIKdFJBcnc6cJWaCmdZBYQ/3Oab2j6egDbNOCedltBv?= =?us-ascii?Q?qL4jw/Aua9WNybCWsKdVzyrCBs26Wrb/VjMLulP6LpyOhFCbH9qeJf/ko3lE?= =?us-ascii?Q?3VaVTmurrceAddKCxtKGNWFHLROKa42CmYFiIu+OxgFQtZgCQguixkHC16LT?= =?us-ascii?Q?oR7Nx014=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0802MB2546; 6:tArPFnRUsaWxT9Xm1mGAYVG1gzAeCTJBskwD++Qc?= =?us-ascii?Q?O+mhTZqpj17K9TNmTy+mMg7PuJZwVNUF/qIGdbkfdYWg446ke6inQQAwGG/2?= =?us-ascii?Q?Qch49XynC/hXmmwcPYVRlB5NyN2BPy05ZnkYHboHXU8HaSL9UUbkChliplCD?= =?us-ascii?Q?m3/vKRZDb/8E5z54/aJ3Le7xxM7fAE9FC0uvS+F5fB3V7EUR5DggMNG6G4Yr?= =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F8i5w7CWDKzQhAK6fXgwqXWnsCOSTJ951/0vGDaV4meWq+071gusHrwaUTrLnIUPiA1dof8fB9LhQV+GfUVq7KdtdzRxz8aUIPRM8HBgMKKe7YVfja7F7yPHWFv3CcOvp2iG8QaLOjtJoCpz2jtkYvMSHJO61O2cA/C+Y+/TkqtHw3w6b9NC5wwt59t/tCatJXSQjG0JmRBk5VaY2/9f67lGD7JF+PBPpIGv1YU14CyLV4zvRDeqSB1iwyZ3znIQ9DsW4v8ZafSEdy76kPPtRvakq/CwaA9euj/NdswEpL4vaKuRkCh/TK5mj7P2wo53yhg/PoyOGIqqFG+IV56fjPNw7Bc40Qfk+gfNFwUvAkdMUeJHZep+gSVMJ2K2aTIo= X-Microsoft-Exchange-Diagnostics: 1; AM5PR0802MB2546; 20:ce/d99j6xrVDIEYrzSruCY3pcTMSuZrej21O+VhxDLff7de0bhg+KKEp0MbyoMvf4iQI0VRjlV23w4xxXhFGz8EIzDxQuoMFLPAH2AJBFJ+ekiRDHPr+nU1m+wwyhJygc14loPu0Fe78r3vPH/q1Xd+uCIHKHDffwM6PeSlRkL8= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2017 14:31:15.7156 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2546 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.2.127 Subject: [Qemu-devel] [PATCH v3 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 --- 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