From patchwork Fri Jul 14 15:37:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Butsykin X-Patchwork-Id: 9841353 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 5F0D960381 for ; Fri, 14 Jul 2017 15:40:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4DA9E287AC for ; Fri, 14 Jul 2017 15:40:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 423A6287B5; Fri, 14 Jul 2017 15:40:24 +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 408E9287AC for ; Fri, 14 Jul 2017 15:40:23 +0000 (UTC) Received: from localhost ([::1]:38592 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dW2hY-0005IS-JM for patchwork-qemu-devel@patchwork.kernel.org; Fri, 14 Jul 2017 11:40:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40431) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dW2g0-0004xE-AW for qemu-devel@nongnu.org; Fri, 14 Jul 2017 11:38:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dW2fy-0004yK-Qu for qemu-devel@nongnu.org; Fri, 14 Jul 2017 11:38:44 -0400 Received: from mail-eopbgr20101.outbound.protection.outlook.com ([40.107.2.101]:45280 helo=EUR02-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 1dW2fs-0004uM-69; Fri, 14 Jul 2017 11:38:36 -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=UmA4LyiKIyqwXLx4z8TheyNveMB1r4pJGoRwiNoAOYGW1rOWhFGWQrTiYWqg5ks8KkmW0ytMTyqdbsJIy9m1Lh2wuHUTUNREYTbCOk0LZYOimDY3SLaAg93mUP+/NfCsKVJ4wt7PHX6+y/0wfWBCOhdTNX4/kiEGH0vsR7Ut8oc= 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 HE1PR0802MB2556.eurprd08.prod.outlook.com (2603:10a6:3:e1::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1240.13; Fri, 14 Jul 2017 15:38:32 +0000 From: Pavel Butsykin To: qemu-block@nongnu.org, qemu-devel@nongnu.org Date: Fri, 14 Jul 2017 18:37:49 +0300 Message-Id: <20170714153749.25132-5-pbutsykin@virtuozzo.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170714153749.25132-1-pbutsykin@virtuozzo.com> References: <20170714153749.25132-1-pbutsykin@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: DB6PR1001CA0027.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:4:55::13) To HE1PR0802MB2556.eurprd08.prod.outlook.com (2603:10a6:3:e1::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0979edbb-912d-4880-12c2-08d4cace62e4 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:HE1PR0802MB2556; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0802MB2556; 3:Yw/tr/+puL+P+32e2pOYAEXEqwF7qXL58iZrDTE4dRAHpcPfuP5Ec2Qos0EpIJoGEMl5GU4IEuwHeW59eGhLsJqN0V3yEP1UQ+KiPAU6oKppLVxjBACcrOoxSz03f/pDf4MvHs297EY8SEzWHZOfG0jDPNnv/87BRv9/21o9gGrL8JYTXJaqVUJ2YweEEsRdzGaUz1ScxNXSYy0K5eJU9e9k2JJzICZ+vYiGIvPmSK7KEmz3c3SIOVb9otcG5XbbMR1SfIOFPDwX43VNfOS5QsCROjBnTBe9FqOYJl1wpUeDc99s7slKKeXALXOq0MDUo8Cpp6lcOsleuwJTD+Wi5gytqhddOJSg6wnw3qDLKftgmv1cZEMEeYQtKQaK+jvT6MOptkK62kceimKXiqimR19bjrqm7aIY6JZO534RMZRNVTW1b251FmLUhRvCgZMmoCUPcNZ8ozgZUaehJ6KYmHVruKiV6FNP89QHQVyM4+vLUldOsQKfgTNgpMt9Z8rEe65IdRmrcZa7OQmVQk2tYZAjovTUmZGAQQ6TSwzULasT4FK/KFMOfFLupplIBscEJ6Si91ILdAuVA2Fe4Q053ql8AReby3i49IrV7OhrHO/ogtZ/yaIvLEN6bjaK8XssMWP+qZXzNXJJlrnWH7bw2qDwEqKqn3WuTEFcuwMG0G++hWh1T8tH6hNE13YTNuhL6SoSdxWBZU5I1HM/eGkY2imYY56dVVgXiUSOA7RS3gQ= X-MS-TrafficTypeDiagnostic: HE1PR0802MB2556: X-Microso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kQTO7CX1zOppWikwqZu90zSM= X-Exchange-Antispam-Report-Test: UriScan:(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)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123562025)(20161123560025)(20161123555025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:HE1PR0802MB2556; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:HE1PR0802MB2556; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0802MB2556; 4:HAy7weye8/mxZsBWFU+nnJVXOaUgc1Jemlnl3QHO?= =?us-ascii?Q?5UjtB5I9WKUywSGqNlxWFWQ8G84pDi3YzY2atNS06ZO3sA7g4/oWkIihgILI?= =?us-ascii?Q?FwJuegEBvMhN/ys5PXzGWAUZ5GIrLvcHn1Wuc3s/Ch3ivMJXQmHWoGsg8hqm?= =?us-ascii?Q?zt0hoT9KIjiy5Efsu2/hrjxFrc0bdTA3Is14vNA5VPluV2Vn/ObihRMu5K7c?= =?us-ascii?Q?1kiWdhKuyqFyfTusc2KrkVhp88CaucoDgVcHWIrcdDfblF7BzodBhoECcqGf?= =?us-ascii?Q?IN+Q7J6YqmpdGdAS94iNvuDd4EBkt6HCINtqMuNMnXMFstGFPK6Jn15POCzs?= =?us-ascii?Q?5hhms9e+2bEJPy4B5TxJvwbMmRklS+rNBJ78IRuEMgu/e3UEnpZUoe/rlE3u?= =?us-ascii?Q?W7siZEw8n03igBoK6zjbce8eM6u1AVocYSYnkkNXQV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B5chCw9B6rZ9vHG+yoDlF+dL4+7hfkxJsFnCoHbjm+FDA?= =?us-ascii?Q?PHl/cyRoX27yAF0JEAgve41eZ0ikVPnZoGlp2Z13tWaKbevE?= X-Forefront-PRVS: 0368E78B5B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(7370300001)(4630300001)(6009001)(39400400002)(39410400002)(39840400002)(39450400003)(6666003)(478600001)(6486002)(5003940100001)(3846002)(38730400002)(50466002)(6506006)(110136004)(53416004)(6116002)(107886003)(33646002)(48376002)(2950100002)(6512007)(4326008)(53936002)(6306002)(7350300001)(189998001)(8676002)(47776003)(66066001)(5660300001)(1076002)(50986999)(76176999)(305945005)(42186005)(7736002)(81166006)(86362001)(25786009)(50226002)(2906002)(36756003); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR0802MB2556; H:pavelb-Z68P-DS3.sw.ru; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0802MB2556; 23:+KH/PyAqq4t4OtjfzQQGbkgo6hZizTvSYL4NEH3?= =?us-ascii?Q?OHi+vYBmowrkwszb4owkuM0o+WwOs3TgM2G40xMrzOoDwaGBl0EKy0icoIq4?= =?us-ascii?Q?MQG2kIUmXCY0ufEaOAQNusV6HlUimaKMtMSyGdG9g9gxddyzAE9vDinWdZbb?= =?us-ascii?Q?5jaHEoHofdl0pFQbVhG4AMNClBHteVa4/Danae+0eJcoZgAcZmCBjXakK4s0?= =?us-ascii?Q?w175qb7D8SK+lvEAKKOSRb9ZoXGVE82i7v9CtDXyxbzRsrP4EFAmtYb3rcGF?= =?us-ascii?Q?zfO69MpWD8ZhNm9Ns1SMUAeCW+15VACC10LxPOeHzhkGmCRJl6Nk/e1kWtSP?= =?us-ascii?Q?pWHcPBX3BBiDPaZ3cNRTat/JTWa1jIGn2x4wk4pKthoB0FHiYnrNMwe2epMj?= =?us-ascii?Q?ykCMuzS/yk9Domp30IqYta1WVhMC3Z0Bsd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-Microsoft-Exchange-Diagnostics: 1; HE1PR0802MB2556; 5:FO/fa5qBDDTFcwTh4qSHucNiuhshSBTA49GkZhPMGsvHj+W96oUeuQFajHFXxfvx9PrYa0JpnP92TDZJCcVACnLpdtFqw2LntLT1ynGSRssWea0qYedAsJ+/mSgk14AZ1PFbonvctUXVh+hPRY/Uu0AvuTC3f2/lIOm/qsYKnHeQoGhayTlHv7VzPLGfd71CZboFuuVDS4d2izRrvmYcRAOfsLWCqvjOdx6jlKkCVNibT69hE9EtD8Us7oCLLnMfJOPCDSsDbxzsbXp6C7i7VfAzNWdDvh1idH7SGRX64B8rRrIUo3lO5/U2k0XXkudPLkqVgEBaTsZDW/6/kv4xikjwROg0Z5rkSoKkSc3JRKpbPfBFZNBXafaP2Fep81N+M6EZQdOx3MO7sTNaIjBoll2Izd1a1cr5aqLXG1mShawj7xcsDMoYYavqUBTx2L8URTB6/BLGQRtXAY7TW1S3MRfGxxEBstCVN/EGUjVf66jep6/FjDuVUOREU5GqnSO2; 24:Mwrlr+0NuPxF097R3JdqKxwOlJm0LYkuVd//BdVkHN3sjsJ17wD/C81upYqFniJpgz8HTfuJseqz02Ugv4X+MhFqZUiItzDYaXv9DqBae9E= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0802MB2556; 7:tMc+PI/IC4ieV7er6osA8nhlwMN+28ONMwTZ7OMJRGp4xZLSHu7fIC/x0LE7MwdOWzznQoBduZJerxFot4/mQsoiX40RrWPQ9VowvelbhuThpuNBMgSu+bxoeIDE1WT0/l0bRSONTCHmXK1J6kaOJtWMUeQ50sEuXIZoTsLxGq74hP0ozvsezAjqc+C9Sih6WwRJo5SWWMTjyC0FFAehNLLx3Orht/Nm8j2qW8WLsOoEUOD1ZIgJh0j33SNVdD++Z7hsrVsKGeqS9PngP6KZVRmi2SirOBuQELmFBkgV1sBGkHCgUU7dZc6AmWYN9nF2H6sT3ym9zeRuuS49MHMsPjpwFjk9j7nedEQWJpr+Fk1QhRNWu1Xka2GKP5vVNfpzOzjgFDCyePjeBAQq0F3PtCgZvm0nWqRTpa3vqAzMf3IKI+tKZLqCtHVHbBXWEhlUAuP7vVggrJEZ5Yo0oIcK9cvEGcOF5u6kC5PPM7uzBNWVXz00OQeOzDL3UAE77iPjq7O77quAJWWkmH/GHwvv23VOYiX3tYg49reUUgxmCo1GmzUZl7EsZ4MEic67oLrNE/S0wfHEAMNW35l3OlD8phEFKLVe6PAUfTu4jrgIYVChYxxWzP6fsC0qKvIunPTBObp7DV99uTnot6FCuHxK844nwKuHEyEl0f3WDSm0Y6qVsEAUGPFVEi1hB6qzYl7O/sVjGUlznDaJ9OsviP78f1FJsOD42kpp6KXkHLWyR7wCrtn5Kp8dJZah6avqHeG+Z+U5JeADigngk18yRjKA7JWThJa5wLkrFQmGtb+zSmI= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0802MB2556; 20:/StNMsKJlmpE2jvlSOwEERUBwYrIj7PJR0jZCAu4tWQ2YYT+ZzEK3TnpTNVuS0DdPoDThncoxG3BkdaXYalPHmS5m4YjvZYYyptdr/zECTpNd0LtM+rd+ZL/gmo+N0/oNNdrCRSgWTrupOZ5hTsgyJ3n3aDEakHetYnxX7vjVj0= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jul 2017 15:38:32.6051 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0802MB2556 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.2.101 Subject: [Qemu-devel] [PATCH v6 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