From patchwork Thu Dec 23 16:01:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Sementsov-Ogievskiy X-Patchwork-Id: 12698484 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 314A5C433F5 for ; Thu, 23 Dec 2021 16:18:57 +0000 (UTC) Received: from localhost ([::1]:56528 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n0Qnw-00088H-5h for qemu-devel@archiver.kernel.org; Thu, 23 Dec 2021 11:18:56 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43372) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n0QXx-0005pZ-5a; Thu, 23 Dec 2021 11:02:25 -0500 Received: from mail-eopbgr70094.outbound.protection.outlook.com ([40.107.7.94]:61158 helo=EUR04-HE1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n0QXu-0005KZ-Li; Thu, 23 Dec 2021 11:02:24 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=R94AMfT8QMdn1QN0W2MKJq3AEeQRvUARoKHcdeburAPVzVOzYIhnie5c7TbIp7meQoWbk30kpT+quBvcC+IkAG8fr/2oEQP5byPsesKEbVZlj4TDcKNaN1MG1K7QFzLQL89nmRoCZT2UA0vcOXBjx9N3NSR7z4PZcfhTClw1mg3XUkVJ8OykdG4DgyZDCkZesRIgndKDrxDBiCBLr/Gpyg0GddRIWh1nioRAAelXp+Bv319UeT1j+Jdi8b3B0CjyhiTytKuQe6rbM8AqFlC5MZ2454D3Hd1UgAoxGwFIcsegT4DI4OZx7UXFxDL2XH19BLJI4YL6rA4bnGbzRu8J7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yX/y5RRgTxN3+SaetWQ1fM1b+d8og1FNDEBJvtslr14=; b=eh0QUkWkck7YUprNnwJwFj6OnQ0z+IinBMMIpHvUoo9lXPY/M2CcwrSnc7XTMhRDNM4O4AgcwLJL+nG1cwGjoFgLOjYBcovnmFPHAQUix6/3hRxljZd4FGLBKRuA0YC/7aCUzLQK68HDwpAtkJ2PizTA5t2mZvdtoylng9nRtMFtB4I/zgmBd2Wf7lWuvBdPYgYGlUeH9cehFRJU1Gh1/4vCERnvP7YbAj0A1OCdeyg9TWLD5NdXvOW4wn+9ZE8fs3bjmTNEJjkMXpynjFDZPPUeNU4xktZcYrWskBJf+Hp4enxSIgdsfCBJErwVr2viWTsNkPvJXuhqf3W7lYSIFA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=virtuozzo.com; dmarc=pass action=none header.from=virtuozzo.com; dkim=pass header.d=virtuozzo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yX/y5RRgTxN3+SaetWQ1fM1b+d8og1FNDEBJvtslr14=; b=ujMDBEANmLZQtTVGm3QZiMh9P6YxV9IRXvnNJ0vd5/Wdm8EiQnc5faujq1QSi71z2H8RifQmCeirKjC1V6q2Eq3aRvSWx/n7NxGlESJRmq8YWiyZ/1W0org7PUShoUbPGAdQuumdBgJEk5UkwF8q3GbgzyfqLrUq4xd5WMmteCY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=virtuozzo.com; Received: from AM9PR08MB6737.eurprd08.prod.outlook.com (2603:10a6:20b:304::18) by AM9PR08MB6148.eurprd08.prod.outlook.com (2603:10a6:20b:284::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4823.18; Thu, 23 Dec 2021 16:01:59 +0000 Received: from AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::b118:483a:d003:3112]) by AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::b118:483a:d003:3112%5]) with mapi id 15.20.4823.019; Thu, 23 Dec 2021 16:01:59 +0000 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, kwolf@redhat.com, hreitz@redhat.com, vsementsov@virtuozzo.com, jsnow@redhat.com, Max Reitz Subject: [PATCH v5 13/19] iotests/common.rc: introduce _qcow2_dump_header helper Date: Thu, 23 Dec 2021 17:01:38 +0100 Message-Id: <20211223160144.1097696-14-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211223160144.1097696-1-vsementsov@virtuozzo.com> References: <20211223160144.1097696-1-vsementsov@virtuozzo.com> X-ClientProxiedBy: AS9PR0301CA0001.eurprd03.prod.outlook.com (2603:10a6:20b:468::8) To AM9PR08MB6737.eurprd08.prod.outlook.com (2603:10a6:20b:304::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b43de1d0-573e-4632-98a0-08d9c62d8d46 X-MS-TrafficTypeDiagnostic: AM9PR08MB6148:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3513; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: W30Je/VI0Btxmcfm3Mwf+OaTlNqLHJUiMluM31D2fn9QVH2AP8wYk3QfY8DuVw4rzuTmuMV0uREdzozrrGVTfyClxwZF0wjAYCJkvRjUHYuLOdfRn4QvLgpm3aEUXAx2Wfywj5MGFwlAIF3rXXfI4WfRgygVdkVkObiQFYUe1rzD9WnttQXLHE12gjU0t0Cvy9Kq+ocdc7EtXOenqumXYC/WGhMjHbWCFmydctAzBVeFumCbiKOZVFFNHJ3+a17AQuOiFFxzQ1kwQULQdFBeMTcwVYkPZL0HSo7nVpNvB80YmfKeKserHoY0KFJmF1ViF42NblqTay3W0+ldELYlRZn0GuNxnGs8qHHCmZ9OaunHZP7dsC9UjBEh2koI8BVTgC2bay6Kgt6L0yG9SwRPU9vmADxnt1KgcClipgRy/fnnB9KzvoLQSTskjQ1a2cK/vabhu7eEHGD5Cj5PR6ilnBVc/RLnIf5TRq4EvrME8KTYB7k1cBvw/eXHMUslxKmrXbNHpjlfEYbahE8P/lybAjCul96UJz0NSm+E3i5vE43SggtF9eXbgMLKEMk7MtviA71NH6DZI7AhA1akAmpktOB/UG1QnZhMYAyxpIGUQYMoIcxgGqFM162NUCjZEVeVZCcitP4O/ho27aBGYuHzo4fSzd08fng+ihX8rNy0GF3ctkdxAojilZkbDPhutgxG1pxZQVtuRfI1+4Hw2eyOFw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM9PR08MB6737.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(36756003)(5660300002)(8936002)(508600001)(38100700002)(66946007)(316002)(38350700002)(66476007)(66556008)(1076003)(2906002)(4326008)(6666004)(6506007)(2616005)(6916009)(26005)(4744005)(6486002)(6512007)(86362001)(8676002)(52116002)(186003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: yNBkTW4biUqSX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rtjA9fNrCHf54iTH68GzUqwWNVwzdJqJXBenjnE1HTFABK+59Xl5n8AaWdG4Mt6K86cWnv2bWYMFGy1aQ6qF1fcEdZRdgQUp0dUh0QRxg8CdVPe+Zvw4wwTP2+qxIP+25EwDMpMNVroebV9Ez6in3QkEz5Q5QWaCNlh+3XoXX5wfYo4JaIOVp5Ii0SlpmcuLvSX0K7LUPnrHV3YJ/pFnlcO9iIxF6R/9xR5/onCAtMr171rblmw3j0PQvA1rn76KOgPrabi3cTaJ/D9t9PAgBMdJO9+N6OCie1RIjGirNILV872cFDCOaxpbCXzeFGoKVou9YZP7KQK433QS5Kp5cYIwMC4IkvMTpoe4+rx2mTSfHAkuU3wX181MxNo2nG/Zsl/u5okkqPWfJJ7ZjsWle0EnfouWu4NJe4hf9zHLifJrq04YH4brbimFkxBqj3tEYiO66f74z2UKwtZ4zFazJOn/drnH62blQEY67sfGn4l5bYqy4SJC/pvK9Xuj5otqN9+esNHsQuzwiuOyb1Hg9ioSJBpwe29kmTbmjiwQJh6MJ7pi0R7Mib0BKzO80v36psG5JX5YpLtC0+JZgu2DReGsJyUhSofEHpPVo= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b43de1d0-573e-4632-98a0-08d9c62d8d46 X-MS-Exchange-CrossTenant-AuthSource: AM9PR08MB6737.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Dec 2021 16:01:59.6458 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: xVmqfGZ9dccg0gZKcGC0xSedS2tfV9F9g6aqLRI+3IIs+rU+NY+aG7g05QEzR6f8i1u05EDjhgVMXXPk5AzexKUI3XtvIla0XW0EwQNszY0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB6148 Received-SPF: pass client-ip=40.107.7.94; envelope-from=vsementsov@virtuozzo.com; helo=EUR04-HE1-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" We'll use it in tests instead of explicit qcow2.py. Then we are going to add some filtering in _qcow2_dump_header. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/common.rc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc index d8582454de..5dea310ea0 100644 --- a/tests/qemu-iotests/common.rc +++ b/tests/qemu-iotests/common.rc @@ -996,5 +996,15 @@ _require_one_device_of() _notrun "$* not available" } +_qcow2_dump_header() +{ + img="$1" + if [ -z "$img" ]; then + img="$TEST_IMG" + fi + + $PYTHON qcow2.py "$img" dump-header +} + # make sure this script returns success true