From patchwork Wed Jul 12 11:47:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Butsykin X-Patchwork-Id: 9836555 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 F23DB60363 for ; Wed, 12 Jul 2017 11:53:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E142D285F1 for ; Wed, 12 Jul 2017 11:53:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D3954285F3; Wed, 12 Jul 2017 11:53: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=-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 ECF67285F1 for ; Wed, 12 Jul 2017 11:53:53 +0000 (UTC) Received: from localhost ([::1]:52028 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVGDI-0007JY-QY for patchwork-qemu-devel@patchwork.kernel.org; Wed, 12 Jul 2017 07:53:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49429) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVG7A-00035T-Bz for qemu-devel@nongnu.org; Wed, 12 Jul 2017 07:47:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVG77-0003kV-Oz for qemu-devel@nongnu.org; Wed, 12 Jul 2017 07:47:31 -0400 Received: from mail-ve1eur01on0107.outbound.protection.outlook.com ([104.47.1.107]:46733 helo=EUR01-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 1dVG73-0003eJ-UW; Wed, 12 Jul 2017 07:47:26 -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=jyFG92OcmOvWxy4PpTI9MHL9ksqhuWCF0+NfTUweUXI=; b=cxhhb7h67/rVbtyoYx4HOxneXkgSqG70t1m12KDjYhuUWvmslT0bqqgS5/69Uzl1nnD5D9u+mYfuD4JpSatr20hIUHsfvBb8shW19RV2teWC53M+gJ0dU/ZyQyYRzotr5o6JXqC67kyhqwIo0PhXZyu1mp+iZbm1uXWvH3BF/Hw= 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 DB6PR0802MB2551.eurprd08.prod.outlook.com (2603:10a6:4:a1::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.13; Wed, 12 Jul 2017 11:47:20 +0000 From: Pavel Butsykin To: qemu-block@nongnu.org, qemu-devel@nongnu.org Date: Wed, 12 Jul 2017 14:47:00 +0300 Message-Id: <20170712114700.20008-5-pbutsykin@virtuozzo.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170712114700.20008-1-pbutsykin@virtuozzo.com> References: <20170712114700.20008-1-pbutsykin@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: AM5PR0201CA0023.eurprd02.prod.outlook.com (2603:10a6:203:3d::33) To DB6PR0802MB2551.eurprd08.prod.outlook.com (2603:10a6:4:a1::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4db2f28c-fc01-4411-0edc-08d4c91bc1b1 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:DB6PR0802MB2551; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0802MB2551; 3:hXJBOGByvq+HG8DQNP13015PAD5zbQYwp8cI/ozs4y1JsDYGXJGAGpySI6zQrAbX6nHbuHz7YelvIeAOilzzvEF7MRpHktjbEgFHofoK3BmjR4Nomx4SpgI48Pss/KYB8KT96T6GjPNKPPf4VO0Hzi1z/1Z9H8i1pTg+8242WE0VxTkVIdU/zQHyxDM760Nrn1IB9cj6NkKVZIWIef9KL0WEO6ytwqulwrxyrRCSlgJMiA0v+Gg5LCm/strMyrMB8MtfCseXeVKOeNg6uIGU148y6p9QeSdXOVPloakFnuVjmrMhg7cC2z0B2Qw786URw/L8t5ROEOr21GkuktxsgbkxdQgZ1sXdUucalbJfUrJsgo8coIRZuYyn0ICGDE8BUmGgx6SWZcm8yu2BqyDyJdNE5pqE7EDUM3SWU0l3YAv86fAC5JG+XY/fJfLMbEPFeZdxz2g+g/Q0CXg7aICNhzIKpHG4yq6mBsqAy7+g2F27YJbmctnuTd9PG3DSYcERifJvAankol65GwN3F4IEIlxXuXlgCGljvzF84fTq4CqlL/v/QFkRo3nNpOM3GKMRX0J3MGgw8YGprIxruSINKsMZe5FFXDphdU8ckwO2ZcF6qRAWs7E1plbm+gCfEtZtRMHnq87OomS3G/ctyC2OP6NYV1RqNel75YKgno2OSaRRPBD5omsL4fI/ktCtRPXXJGsxgVdlHH1ZvxPOVqGF1gwTlcc7tn2bFndOy9/s0vM= X-MS-TrafficTypeDiagnostic: DB6PR0802MB2551: X-Microsoft-Exchange-Diagnostics: 1; DB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:(250305191791016)(22074186197030)(236129657087228)(48057245064654)(148574349560750)(50300203121483); X-Microsoft-Antispam-PRVS: 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)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123562025)(20161123555025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DB6PR0802MB2551; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DB6PR0802MB2551; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB6PR0802MB2551; 4:6IEf+oz37pyf25rgK3/usaNga2s4VMKTsTdlJtGt?= =?us-ascii?Q?bz2Qneyv6bJSzSnPsjmEDO8Xo3VNoBxVGyBNg9X7W0KyOtTaZ3OlnwpWmM+N?= =?us-ascii?Q?ypQhkVVMmq34bioN7tP/FOsg4yH94RcNLm5d11R4Up437mRn/1XDAFLWdCDu?= =?us-ascii?Q?MPlc4Aw9c0640+IXveDf6FjtIEWRvX5jeKJEMNO83NKuzUX206a1JkPpdK4D?= =?us-ascii?Q?cOTtUFq3gGHptesQjAjZVPhPlboZx3Ky723C4CSGCs0RzwaPzbQVeCSAWpSY?= =?us-ascii?Q?fGMUWUQMkr7CRO4AZ6z1Aio+DvYTajIyhErwAhIH9xBK1LESpbu2FfswQW9u?= =?us-ascii?Q?mfcil7JxH7uxxwIf1rKvDzBG4G9VmRw9BYEs0UyZXH3taINkpckywRvKa04I?= =?us-ascii?Q?gdPmfgjnjydP0L7JRfGa+rUaj4HkB5rP6Y2Ud8qXB+1dOMRqHk+kaW7AQkwS?= =?us-ascii?Q?b65jYb64ULhugeis/Idj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ggkyS?= =?us-ascii?Q?aoGIR6HPSpX7lnmmSXW+53hGXQGfe2jqfNKAn3zmhjcshuyb?= X-Forefront-PRVS: 036614DD9C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(7370300001)(4630300001)(6009001)(39410400002)(39400400002)(39830400002)(39450400003)(6486002)(66066001)(478600001)(6512007)(81166006)(7736002)(4326008)(8676002)(3846002)(5660300001)(42186005)(86362001)(53416004)(1076002)(110136004)(33646002)(6116002)(53936002)(76176999)(50986999)(2906002)(6306002)(38730400002)(107886003)(5003940100001)(36756003)(25786009)(6506006)(189998001)(50226002)(305945005)(50466002)(6666003)(47776003)(48376002)(2950100002)(7350300001); DIR:OUT; SFP:1102; SCL:1; SRVR:DB6PR0802MB2551; H:pavelb-Z68P-DS3.sw.ru; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB6PR0802MB2551; 23:8fraJ32KvXfMohw1ZZCuTtxm5GWvki/eCd5zgHo?= =?us-ascii?Q?TtBYBFFjTHUrJ7FV3+bPjlmUiUNeMnNPuMIypzIcDHx//f2VJrZUjZoPRRcD?= =?us-ascii?Q?9vVrHu/WRJdA2baboednAXivpSLY2buYgr1MgPbLQ7+6p1rYcRgvxMoWIRFw?= =?us-ascii?Q?TEIzL/YJ1b/+EKg6MXfAtwQ3LQFmyi8n31AVM4MbY+qyXH/RCwA2i0EhXL7U?= =?us-ascii?Q?x6sHUhMy5NPj4IjqbYwJD4df8wbl/Pzmdm6ss2JCaOYoc8sGWgt70l4KIui/?= =?us-ascii?Q?Q3RGRFxyX38Bsub3UKxIXveF6Lwk8Tp7dqiIlaEzeGu8ugsJm/xpevyN6oQ5?= =?us-ascii?Q?jqRbLn5YbNY/RzGd0H/ABAMMXM/+skgYZGIqK2IOFESJK63AjAOFfsG6ZnFG?= =?us-ascii?Q?TCXCmE8CC9UKu40ua0jDEfkY4QgqM+o/eef9E9n8Y47wWkkG1OzbcGJbyVNh?= =?us-ascii?Q?XUJQ2nNn+AGgLGqZZ2qef3tKTdGV87EyyhoX1XtpFsND6Vupo2l8x8ryHiZB?= =?us-ascii?Q?y0RzUJ88KuEo55GPmtXw0Vhi/cQvwiqzDObKSttRTHmTYr7R/CSp2QTU5nVO?= =?us-ascii?Q?JaqPtUKcm3/B2fo5bqnCtjFpbY8K7rLnoQpYGAs765n0KLJBpEO6jLwvkpMc?= =?us-ascii?Q?Tqvj0w43guTU4wV0irdFPkXc27dFBbLCFPyHysmz5zx344Q7kZHalAlB+0l6?= =?us-ascii?Q?YOtB5XqqDrNr9GuhAnf78Kd8RIwhDz8su2Zw/+KWcCLHr/4zOLdDJyQ6KFZf?= =?us-ascii?Q?Xod/w/yCEehmyw3ybtguOXtXJ1SyU9Po7hFcwGsJD413UMvHU5TWFLUImViK?= =?us-ascii?Q?Q34VF8fIDfC4ymhr75mSaGIOO7gh8KRUdf0GiX0kNBhk+LzaF7zzvpZ1z3Ty?= =?us-ascii?Q?iA7OHmop34U+qndfNw8Dkaq1AF4KINYGJEE5s4U2SXWcRgbhE1TPqrvcXBLs?= =?us-ascii?Q?0pvQVmU6+aD9uvEvbejaT9yMvLkJwtge8yGwhQoFF9kV5ForFKxcUDy2Dcnj?= =?us-ascii?Q?MQmcNjCIjL9gdBcVkmnXi3LcFhDfKr76X0PIBdHnXlvq59ExReWlXyaG69jE?= =?us-ascii?Q?do7YLbD4HMCUMOd4PDuh2q1IvnCBmcy2XZsn60YOcJoLcJljxOE/M+QLJosa?= =?us-ascii?Q?mTfNeYwZAzYA=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB6PR0802MB2551; 6:nR5GhIiOxsSBpodtu09MUpA/JCyBczFGWKBknmPf?= =?us-ascii?Q?BYKlAVG8yCyt019k4P6006g364iHe/fc8jbleMM5FGzZnhe0dpsVUTStZO2k?= =?us-ascii?Q?AJfF9gyD0RAY6zRfiMdiu8QTw0Ajktdr+ePodo2YASVMoTl0rNxRUV9MrdXY?=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Diagnostics: 1; DB6PR0802MB2551; 5:tspg0FcXxtNlakluI92v9tf+A/PlLlajO/HE7FXlSm3KCRMjcdvwd6CJuIC3eUCcZSoP92AEWvCphqQgqCqmMluPz8A6Cl1xyXv34/d+Uf8gY4MqFqE5IM4Kk9cnm3d0ujNjFFRfgHbF9wnWqo4j9rFBSo87s+YmCVrZyDffN6grv70X7JMyAr7Zuya8uWiuAonuaydfaSCvjzjTE/bo2QBXIFc1etGTUICjJESMufoAHgMYhljU713i1qjE1sn1lNAA1Q6cAifWFYDUUDHnZeZkDo/uVCWaXnY22oiaE7VLhhY2t0NG53NHJ3KsbRIeS0PRcAxah3rNHz5DrnElc3irVzImKhvl3T/mfykYlaqSg2Jq8vHJt9+Q5j/k39rpdNiEC9my/uvifp9feNEMnvrK9co2jFxAQ8pXmndNzv4ZTrQXgV3uU+o48akBjxxos5kjhMZdOc2Pq+XPMZt36KocOLUoiQUBwJHuPOvG2R33pQHJUYYhCXGHfc5oq1eW; 24:A4dFF/Hro4kpaS+l7WsYKaFQLLdGVouGLKlat50MO7ejGN07vI11HcuvxsAIC40BNy0ZeDJWni357BfUoDFiiO5iXlG6FUAFxYiByvSJU60= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB6PR0802MB2551; 7:x8OtHWGMQ0t2AOFxliQACu6MBYNNge2tFAmBJz4BhAoH2JgJuoaEO2szG5tf+0LNsOWR+ozFm9x5aoApKrvJ2Hgu2ijkg7nNNGyYfHdvdBo7k1wgIRE0V/DJY1T69kk3M3V7pcuSMtRLkf4Km5CAkmji7k0RKeY5B/SDDoFEVXOWacVfid3hdJVvjK1tL2pU1cb4TrzDBCQTNyHIzQaK3uaFVfXDU59xSDpK9/0lTVqjYyGdYCzXL42KBTOUqadAEeDMs1Ms+mcjN9dkJDFAWfLvWnpLoq/5L+pdErcx1+ZPYVGEFjKx04rQMXPNKFWC8JEJgPoYJ/zKvDOII04iXFaPDjoBw4zclvNmqN7F5tdhGbtGvQovCdfeJhnMpZGA8D7kVZ9NHZ7akAA00RKdxpVvywt0jVZaKnH0+k9KtpobYijRDo7Nut0Mz7bJO45um9cKzvZixpTIrgLGt077Vqwq9xSoQpMIiJTFTYIwEaNQMlr6Kh5TSpTDoVlU4Qw7EtvbCBdzad/VSqIvu1gmBe/q5oEV0ViLW0nmpz28pq8SZhyTm/iohs95SNHeXqbnfsZcg9ljVImjoRyD+E7ur8jVAdtgItWHc+jYhzg/DEsxHkHaVzOHZoIsgX6937taxTVIDHSCAV64M9JZNw2xp+2QT1UUuIVQxDn6wPaV2fgBYTeBU9czrVFhsRuCuyAqKfpF1hjxApxhnR31tCUCRetrzDgmYb4Xro5klGXuI3czJhYxLm/eUjYVqTTTqkaNLRMRlx6tJYI/FPeoovUHmWJOZinlsGNs/yDIGgzxCYc= X-Microsoft-Exchange-Diagnostics: 1; DB6PR0802MB2551; 20:53M7X7XCRlL4G0LyO5hk5nAU6JAOBnpfqVU6EK4/nE5IPLiaShCFKFnusQIz/aENv3UgF8AlvSC+Hh8FAAaQfk2pN24LZUK0+cLBJnLbpOCeIhsu786Y8BqYzTn+HonadL83IWcQ6QYmuaIIMXpNWe+5Gvk1Rdusl5DmjRKtfOs= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2017 11:47:20.9957 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0802MB2551 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.1.107 Subject: [Qemu-devel] [PATCH v5 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 2aba585287..1d985c3b45 100644 --- a/tests/qemu-iotests/group +++ b/tests/qemu-iotests/group @@ -166,6 +166,7 @@ 159 rw auto quick 160 rw auto quick 162 auto quick +163 rw auto quick 165 rw auto quick 170 rw auto quick 171 rw auto quick