From patchwork Fri Dec 3 13:07:19 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: 12655235 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 4D452C433EF for ; Fri, 3 Dec 2021 13:36:50 +0000 (UTC) Received: from localhost ([::1]:58740 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mt8k5-0000Sf-2T for qemu-devel@archiver.kernel.org; Fri, 03 Dec 2021 08:36:49 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33180) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mt8Xm-0004Zj-3T; Fri, 03 Dec 2021 08:24:06 -0500 Received: from mail-vi1eur05on2095.outbound.protection.outlook.com ([40.107.21.95]:4097 helo=EUR05-VI1-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 1mt8Xi-00089d-TA; Fri, 03 Dec 2021 08:24:05 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jX+32NppHnSo5hLIldDNxsv/jrJ8+OGMT4YCr9xLcMN1ALoSj2IL+cxMIOYxVXkLIO7IXsZXzeFHZ1V1whGYw8gevPjq1wEgYT/bcgrISJhfZVXitjMe2F6RAgX4VhRZFOpYbYMMptsjQ7lstQVYyoDdm9zzS+eUxlH2ZPTflTqctmAal+p3ENPwThbluSjRAJReInayAUdqtLcTmuHyUOz/wutxBJ5Czv76Mp0pCZ7JclCUYc3zkarHniYRkt18uxf/987+isDlcJrqTWTWRBxp8JO5No7lltJuDcGnNqt0TdOuJbYbeMBTSLWpLkiTl1ikKp65Uzt0tWy8+TqqsQ== 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=04/nOXA0pTZ9jUmwK4jLfeALXKT0Ap5/s2cSQZArKkE=; b=PrLLmYsVjmq/JMJQCFxfeUjITVjLfPaGQaTMp0qY8ELwRRdLQuEuszucEZkrmFwRv2rjpl2GEzobvKdu71AOy7QFwhiQ2xnTJZ3ZzztmcJzURDiLrmW2/Voql9YOgXWBU9Pq3yOZK4aa3/pxKtQ7Uu3qdKEbPhwolzGmlUyOsU2yYhQRsKwJfjnvSKO9LRqYxRZiQpNvQGsRJF3BX3aK/AeKnwg00xoEfO7jP8Qd1oRzalvMdhtAFKFtDPOvvGAhQXCYdQzYjxx5KhzJ8RgYJr5vCtekJjSfEwFFAzuhdWqsxGqMrItQasbUJE/bSSHYrjav4808IBxhm/qz5Ux2qg== 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=04/nOXA0pTZ9jUmwK4jLfeALXKT0Ap5/s2cSQZArKkE=; b=qLWvLqTwIrtRjUaE6SS6djDYcE6uQBOOjQVFtzzutJRbP9SF6WLSfcqqSWOZrBBxI+EB1+um7EP9BPpDBgwoVBVkhUOnSFdt8lCDfWV67HJ0wL36FQ0/NgGbJ/3CzqiuojPnXD3wAsXFcKGReWOorPQFS/TT20iUiw37zs78uw8= 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 AM4PR0802MB2177.eurprd08.prod.outlook.com (2603:10a6:200:5d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Fri, 3 Dec 2021 13:08:05 +0000 Received: from AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a]) by AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a%7]) with mapi id 15.20.4669.024; Fri, 3 Dec 2021 13:08:04 +0000 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, hreitz@redhat.com, kwolf@redhat.com, vsementsov@virtuozzo.com, jsnow@redhat.com, Max Reitz Subject: [PATCH v4 01/19] iotests.py: img_info_log(): rename imgopts argument Date: Fri, 3 Dec 2021 14:07:19 +0100 Message-Id: <20211203130737.2924594-2-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211203130737.2924594-1-vsementsov@virtuozzo.com> References: <20211203130737.2924594-1-vsementsov@virtuozzo.com> X-ClientProxiedBy: AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) To AM9PR08MB6737.eurprd08.prod.outlook.com (2603:10a6:20b:304::18) MIME-Version: 1.0 Received: from kvm.ch-qa.sw.ru (130.117.225.5) by AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16 via Frontend Transport; Fri, 3 Dec 2021 13:08:03 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8ff5be16-3bed-400a-42f6-08d9b65df0f4 X-MS-TrafficTypeDiagnostic: AM4PR0802MB2177: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:400; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yP4VLFBWZF7ATTFaHJLIEn5aTd69wwXNL7BrXYufSfbEkQuqlAH7FhTwdm+W2LzwuGcR7LsFxoIISiGUhAH0NvcEWohT7hniN6IrAzwbTqARcqpbEBHWjRpSYQRTnCREUZto3WsyV8BYZWXLbyba/NYhV6s1a0diDjzwrHf3KkbUsobiPgw/xYzVEyuB44l/Z8DgRzDIZrf8jyatsbCdE+xuQBXLTNDaldZ5LQQyG3Apc3kokSiWPmOXH2E+rLV7VcmAIDn7xO4L0SJzgKGMqdoeIquwB87JLTKmrVaSpdV5+djBJnLgjOr00rDjIyg6c71OsojrJmBcAy+OjXHDJv8kmjdlNfb3dFzs1P6LbRZDAyZMVZ6L2WcbmIh4EHnbgNTLB78FlXXwCeXbsaPFdx3GU0qL1XyDx4UpXcjQnf8R2S6252fyrl34kD+uNfCrTCBHQb4XM0tBYNttVvk+gbbZaEWoYsz1R2PkDcCs5DCx8seczuEAoZzGafKhwgRpLNDvlwu/+fqtVooGlGgfbe6jJ/bHAc1ROXZovuQDz5dCcffuZCfw82cQGGOZ82NByvXkoX/RcVfGvymHB8AaYCAGiy2/1i6h+iia/XyFwJJqJBfX7JS3zyq4M9GTazI/hc7CHtx/n5SlKQin4rBqcyWQe3Wsi6mYjJltX+3SV4IbkbtTAdUp5PrW/LRZ5Whw8MerD94K08N4y1SR94K41Q== 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)(316002)(83380400001)(26005)(66946007)(4326008)(186003)(66476007)(38350700002)(38100700002)(1076003)(66556008)(6916009)(956004)(6512007)(6666004)(6506007)(8936002)(86362001)(6486002)(52116002)(2906002)(36756003)(8676002)(508600001)(5660300002)(2616005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: T3U520LxGceRt9OiykPn3oXjuXNFZ0HuIXDaZMdMGBjIYXecfyjG2rUuySecShXyvxooWgiy46SFaCncUmMSyR5KPkuHELKmMO7gAg10uhvvBTE9rP/4NvpPwvg78iDu66AcmrQ71DspJSBZb8v3Lua9Dpq/dB5iUBcAIrqivRY0T+JX+Reb9Vw9f1vXqRjHLCOW/CItPxqAcrmfUbY2cARoayRs3DPBgXwp6wKuIxjWWVu7aP3ikrjDU9GxJ8Z/kLdORdqbr/VHgXxOzwn5VUptVv6N/I6ykSMKfGTB29U6nbec17Y0hNQGavjeF968otc+p2j9lpe6kDvCETnREquv5ZObJKGtSGywEDIA8Aty/xz+lx+h4Zk6FQz5dh94recgClNYv1opd/LvxE/2jiPORhSIFl1Tr1PcUpis8vItyYZB00shVuFdqEFCUFFYk04oDt8HPW/Po5ZAw1ymvuywFgVhnWeaX8cWXJDAEJUGjwNKKrtv9PuRDIhu4S8li0AJHr2nmDGEP4PPqACi4jN2hIVCm6+y1ysM7r5WF+7DTI/fgTTfYaaZSq65oSKtplgra1nq0YlK0yg5kgnnTr7s5mJv030ICfd1bME2Ty1VTy5KNTjw8I77sS9XSJDbS5VCy/96c9Rp8gUpXvyOKZXDZOV3iaq0m5U53IKUzLlcGwbRfkPzcITnGkRWAlQ5XrkImTBEqRKYNlKvkoQnurGWDRvc7bcxKNK9rpS8nkxUFoV9/l+HRpSkGltfmc66nbbiHX3TP9Gl4iqQ6572+6zoJ/oX4/bHnf7WLpUAn5RJjXoPQtcQAOL4fpJK65QwOrrCLv2ZKZvGqDDWiuqzCXZb+b9ANB199zVpTpuoxN159+OZXaAqQuNsaVVooBjIGXMrFXNNGCfQcrIH9QzwQnMFh3bVTc8mAcAgdNUyckKAENB4hgkYdSDA0ocHKq3U7ovFoRYvrVNjePs1EgdhdNi5DbzSBjBGxmX6m8FJ4B+BGA+7Ypo0y+YpW3wk7o++IHUj9sukXmlYHCNNSOntb+mCLO1+s8RTK3T7asXJyPNOW5eQzmHw8LL5pxy7RF3bcFWZdcVwG9xZ8vbtXr/N2n49r6OCrsp0kyrfZUjXD52FG9TsV0uzf1L47+gN+YOtPkycQZ/swsAOwsmvfPSIRlO8GOmoNaNN4jMTxD2CZY8L7827z8p0KIED6nFVuyy4u1Sao8F5RF8fC84ZK+s3mLLdonCxmMRzq7iaXJqLrjgpPtb8TcCi1w+JhHiC9cD+hXy99gqDLK9ctr46cLQIQ7NKpprHYZvCdpVO6c+K8kCsgxwC5QNFmCSSB9BScTyOyQJ5ly6bIG2KRKXi/NN2pHz+P9ztZ55UtlXGqAloucC2OO9zZDtb2qg9t/8VZvn4Nd5ExoZw1lHNwiijGWvzJfvp3ZapGzE7re+3qC9YY3oA91ubb/inBhom0NdBmN6fdKhYaTt321opjSyM6WUjjMybkUa2HDWGN1cI/wZhoAk3B/Cu+LM31X+0KiOfwglandDjw+WX0c1t8Oo5sRC95gaKdmUzy7C/NGswCFU7dRikLmBqwMQUsYmUItIrGMTfMt0l2DPvROA0PBNW+jiQYkvHoHqq8XtcIMZ1JUXBx0DuTVhCfgBfWsdescAd5s+ZfuP0F9LUf5nLwNQXXGF9hw== X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8ff5be16-3bed-400a-42f6-08d9b65df0f4 X-MS-Exchange-CrossTenant-AuthSource: AM9PR08MB6737.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2021 13:08:04.7647 (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: YfDGdhdvo8Ip8BRkfqHreQGN6zdkEGtHJM1VMh8CJt6TOGAbxMeixGGQ/d8zDbuPy1wKWXOhFRXS10S/JwV5+lpAzTlUpUPv/nD7UIKvu5Y= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR0802MB2177 Received-SPF: pass client-ip=40.107.21.95; envelope-from=vsementsov@virtuozzo.com; helo=EUR05-VI1-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, MSGID_FROM_MTA_HEADER=0.001, 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 are going to support IMGOPTS environment variable like in bash tests. Corresponding global variable in iotests.py should be called imgopts. So to not interfere with function argument, rename it in advance. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/210 | 8 ++++---- tests/qemu-iotests/iotests.py | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/qemu-iotests/210 b/tests/qemu-iotests/210 index a4dcc5fe59..10b0a0b87c 100755 --- a/tests/qemu-iotests/210 +++ b/tests/qemu-iotests/210 @@ -62,7 +62,7 @@ with iotests.FilePath('t.luks') as disk_path, \ 'driver=luks,file.driver=file,file.filename=%s,key-secret=keysec0' % (disk_path), filter_path=disk_path, extra_args=['--object', 'secret,id=keysec0,data=foo'], - imgopts=True) + use_image_opts=True) # # Successful image creation (with non-default options) @@ -96,7 +96,7 @@ with iotests.FilePath('t.luks') as disk_path, \ 'driver=luks,file.driver=file,file.filename=%s,key-secret=keysec0' % (disk_path), filter_path=disk_path, extra_args=['--object', 'secret,id=keysec0,data=foo'], - imgopts=True) + use_image_opts=True) # # Invalid BlockdevRef @@ -132,7 +132,7 @@ with iotests.FilePath('t.luks') as disk_path, \ 'driver=luks,file.driver=file,file.filename=%s,key-secret=keysec0' % (disk_path), filter_path=disk_path, extra_args=['--object', 'secret,id=keysec0,data=foo'], - imgopts=True) + use_image_opts=True) # # Invalid sizes @@ -176,4 +176,4 @@ with iotests.FilePath('t.luks') as disk_path, \ 'driver=luks,file.driver=file,file.filename=%s,key-secret=keysec0' % (disk_path), filter_path=disk_path, extra_args=['--object', 'secret,id=keysec0,data=foo'], - imgopts=True) + use_image_opts=True) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 83bfedb902..9b374dad3d 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -219,9 +219,10 @@ def qemu_img_log(*args): log(result, filters=[filter_testfiles]) return result -def img_info_log(filename, filter_path=None, imgopts=False, extra_args=()): +def img_info_log(filename, filter_path=None, use_image_opts=False, + extra_args=()): args = ['info'] - if imgopts: + if use_image_opts: args.append('--image-opts') else: args += ['-f', imgfmt] From patchwork Fri Dec 3 13:07:20 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: 12655117 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 09C9DC433FE for ; Fri, 3 Dec 2021 13:11:31 +0000 (UTC) Received: from localhost ([::1]:45962 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mt8La-0004XU-Sg for qemu-devel@archiver.kernel.org; Fri, 03 Dec 2021 08:11:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57666) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mt8IO-0001cL-M6; Fri, 03 Dec 2021 08:08:13 -0500 Received: from mail-eopbgr80099.outbound.protection.outlook.com ([40.107.8.99]:31910 helo=EUR04-VI1-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 1mt8IM-000700-Fx; Fri, 03 Dec 2021 08:08:12 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XF9UzAhaopVNjRUsQ8jGcGT1qKTfLg2Nzsm4MmmDZbIDc2bK7S8nFGX1mkd3iBTYwJ9/oMpTzXKzVax6geHGTJ0PkZ7l1za9SbKhgizwp28IZCqPli2zr3Kn3OdBo2apyNV99LDB6ulfJnxhR5WEmEtJxEhgvDa+J0Do5PsLBJG9rWurLBbJAE5r6ATEiY11qWExY1Bk4JDI326i83MBbNQ6kb5Xqo95Yb7JXV5qqHrLyXsM5pFEMAeJbMjHu2JMQrikkGKmcuC12fnUBMV9iP1E6iPHQhIuzuXHPzOBF7hkPYq8rfuCm9VDlT8LSBtCIAbKLi4tLol9A21gD2MpAQ== 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=l7jb+Hnr7c7FY98JcEnssW8iqYViDxTBPiIOgje+bxE=; b=QxUH3/QkjX2Jv+U4fx3Jqdbjlnr4IepWUFOB5k4tfDqH7/BykjOERW0ya98nxbWEjGrKvvIOgP6ZKkfVIk7IGfXbO33ZoPR/qqLNYuNVhJm3KE80VpSDetXNS7gOjvSb7CmOfVpC4UbPTGqRcPOYPs8lkuEZMXC0OIXVi9+t6OBTGSPBkGGDd94npNq9MDgMsY+ilmYwSfqRPjzpJxJQNlfO951kw2e6SdR1D4C9Y7TPoeF0P35tcT3zJEePAHe/Ys1xjANaE545jHXeaXU5OGgvsa/pF3UA8FJIOD0i+1WMdsdv1qhuPyI+2Z3AsywbjQpdDfNASGus53ekjZQhWw== 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=l7jb+Hnr7c7FY98JcEnssW8iqYViDxTBPiIOgje+bxE=; b=DLxZdeiA8efEyxRmy311agtjf1ZNgFuLsikqe/aAcVtKEt3x2BUR4kLRpdVUsy96FoPj49OsTLYf9G/K6B6Vauz1h3ByDbzrMC5G0pSTxrplWWoPQNIKMG+wUuOC2KcrtF5zuvEbkNyx69gGu/yAEx2+oMCoI+iTlbS4CWNNRJw= 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 AM0PR08MB4515.eurprd08.prod.outlook.com (2603:10a6:208:148::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Fri, 3 Dec 2021 13:08:03 +0000 Received: from AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a]) by AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a%7]) with mapi id 15.20.4669.024; Fri, 3 Dec 2021 13:08:06 +0000 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, hreitz@redhat.com, kwolf@redhat.com, vsementsov@virtuozzo.com, jsnow@redhat.com Subject: [PATCH v4 02/19] iotests.py: qemu_img*("create"): support IMGOPTS='compression_type=zstd' Date: Fri, 3 Dec 2021 14:07:20 +0100 Message-Id: <20211203130737.2924594-3-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211203130737.2924594-1-vsementsov@virtuozzo.com> References: <20211203130737.2924594-1-vsementsov@virtuozzo.com> X-ClientProxiedBy: AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) To AM9PR08MB6737.eurprd08.prod.outlook.com (2603:10a6:20b:304::18) MIME-Version: 1.0 Received: from kvm.ch-qa.sw.ru (130.117.225.5) by AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16 via Frontend Transport; Fri, 3 Dec 2021 13:08:05 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ebd36399-660c-437a-f8f7-08d9b65df1ae X-MS-TrafficTypeDiagnostic: AM0PR08MB4515: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zcyWXcZIbYeNtIgUAp7w/WB84WbhJRNPgqHxq2zvh1XfnNKYnyQKLTWDWnmUIXhIbVbSDxD9uR+mMq2E3kQWMe7Bxmqldc1DvWcOoWwZeAdzW7I9zarnfaIb5jwl48+0F0TQDjOS1DE6yHnyS6Ne/cg+wkyLv36oIrxBr6OYDlirwYtu7XIcVzp2md6uLO7Cqh3k9kPVtgop/AZ3lsQk4sGtTccGcvf4j2+sKvubBoLc/D63fv8sOpmxRXxjhRK6VAdFOuWH/QbfGQuVkEh6Ux0ZOnDHYAgG8wKDhdnvcW2HpUCZjVYcImVQ/cePKO7N2cctNdNcXL5LE0v2stKRj9sFOmso4BnALLEvoa8gGcueHL1QmM5WjlRZ1xOU9OpJu7gd7vspXAXnocyFnWkme/wzs3BaMYiTeTw5E20RlOrGDDHIAmCiYS8wpWDEjUN10vTE8ekEDWfOj+569DDDLhL02FHJ4RUrDmC/AQVTXBllHyVtu8XESeM2zKwzZGsWQSev/1oC+0AdXiIQpus8Qt+JowVy+3o39iALt8AtajpC86ZG/vBeBDOJaCfqnR6teKHTAwnNwzV5uFJgUl5UFmgnj0jvhvDzmgt/SPZjYvLMasoANSN0aM0HTR5reF5PvSuLtOvW54ez6biVMwbBXQPHBHSohktij/14jOUEQ2EnoSmiEShFYt2YCZ6pd7HRdTO2BXcuA9SFqu+Zg2BHrKlNW8PxQunwHDqRs+SQ61MDlQK8iy+vh0wZnNWWOhTAASItrECDRG1KKH4SlSxjigyjj+LOXzGKhtgOgDeREUA= 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)(2906002)(4326008)(186003)(6512007)(52116002)(6506007)(1076003)(5660300002)(36756003)(86362001)(38100700002)(26005)(956004)(508600001)(2616005)(8676002)(316002)(6486002)(66476007)(8936002)(66946007)(66556008)(6666004)(83380400001)(38350700002)(6916009); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ZM/CRrT1Q+BCoVyHUUIApaHRlqz4Yey5c48NaF1n+cipzvqqozbcE8rUUG2FSQEBuOS8ZwIeJ7yTB1fug9uoJgxi1nU1p0SUHXl5txw/yWaQ83HmRLUgVcgQITg8C/XvzFewjE4jEOJbvSkafJguehTIX2tI/LmYCurCHDOZb9UJ1BpBBU+E4OfWGG3ZL8LxLHyuaCGmaO0KRTVu8lNvZfmOYhm8hP7SqlwJ9ncuP7j70GXlHKF+rT8niMC4taXGmsRUfESOQ1QfLwUNQ8we8Kqn2yJnZkAJh0eunFYTmtzC3KDbkXyMjQ+AeSG/fbjatldF+4HsLfVO9amf4BIVX1v7WZ+4Qhe+tCF+i+3hsjDLLr927p85kkybrALECvmmZlmVUdyamLl8q9AICZ8/9thFDQ8S882+U4KT3oCRu0/vsQa54/4d5yXf4kybng3SqGt1D1kgKYLhBW7j8ZlJjMAf1KJAw1RbctnYZIrKpMxKk4JWlkkljM4+CglST+CcqbaNv/DY/8V126j79pxZbIMQLkjhAD+4H62oNXOXI8H6Q/o5cxCFXv+BnTG1FvR81VSyneh4iY+60ghYD1+xGLTOs4vMHFuTh/nMM4gijdv6HYSp4q+C1rL3tTlMDengscdOy9e1Xj9Mrp/jC7tVmnTvM7ZVgfYWoFXkxAZ+s40jwbuHgZYZOI+KWVldxHy2XQwfz97QcvdPhv8s5mcQyM+EhYOM5Y0DbjAEDZ1NxOyGo1ep+a6q6qXZfA+42/aiFjuWkslZpZvd/MszsRrFOV+8a+s0XCQqnHqEhIpEzfn9snbLCFmvY/i9bVFvpxbPKvA7OlVSSxzbFY1zc2I4p3M6R1aJYg2qXYX8wfhj0sVTWovODYdT7zWZIFEQQU7mPaQghV/92lK3gbSokgHvLZbEMGxaHt8DD/SuuEASNn1uMBpEWDRkUEc1WlU52Tv9k4e2rwxHapkqLnEPbDePSDiN+4STuIUsyTar4VuW1ftT+LeCpQLdY8ml/vFDK10ja33XTOjfQExJqXeOn5u38b3dKJKM1Puxl+z33uvE0wxPvhh8cHe9E9HPgYRvfdFayJfv/lmiHnnmek3TqT7JY8sPPoFGCBPIWDWHCsVnDPoFRV0NXaz25uJLsF5nX24y4Q3rRES3VpeiyZ4rqyRb+QYI8OeWvyiEm83R1wZ1tZCzdHdQLpOOrLjtmueBibNfmrHliRupP3mtfP6XKkP85VpTADc8BRR6CSWa5z8kQB3Kt7lG2uVKFUb087wfmN3jBerQsKUSc58q/UicUqNgE0vH//G8rghz7a5QmPmsLsQ5RS3Oiw6taWd25utM2FC0HhDXXfhL/3i/JzBs7cSDKZMcaWkCXPLBALJCCLHIIuwMCIrtEAcrnSdrT/7vlY8Bw3II9970nvBFobevc4NoAGr8lo19DtmZzdNGxaBiqFITHxViDVm2DuxB4506/RlcnhdWsq7vOloPww5N4lXN/l2ZXVkTBXdSNUoz1lt+3Fe5ibxCNpWHTMY46o63n09kwjCYbV1mGf/Ny/u16rsN83j9Y+p8G1Y/dG2pzcqTyuNVQ9CT/00octFg8t67oc+0zv7KHqjduJ4+fo7geBpxSXU5HlVt4F0qgvheUPoAhSg/+phpBWvOrTtM6jam7nqPNCJckDiu9TLgEPhSG8pu7g== X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ebd36399-660c-437a-f8f7-08d9b65df1ae X-MS-Exchange-CrossTenant-AuthSource: AM9PR08MB6737.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2021 13:08:06.0849 (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: QB8Lr/TkOOAiwDaYV+SFjc6CxRzfZewd0+qUVzKnVIsZYN3CWU9vgmwkovYJtXTLq6Vz/SvW/6HeSo0WfNEyNLzMnZs/FN8OgqR8eA2+tyU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4515 Received-SPF: pass client-ip=40.107.8.99; envelope-from=vsementsov@virtuozzo.com; helo=EUR04-VI1-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, MSGID_FROM_MTA_HEADER=0.001, 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" Adding support of IMGOPTS (like in bash tests) allows user to pass a lot of different options. Still, some may require additional logic. Now we want compression_type option, so add some smart logic around it: ignore compression_type=zstd in IMGOPTS, if test want qcow2 in compatibility mode. As well, ignore compression_type for non-qcow2 formats. Note that we may instead add support only to qemu_img_create(), but that works bad: 1. We'll have to update a lot of tests to use qemu_img_create instead of qemu_img('create'). (still, we may want do it anyway, but no reason to create a dependancy between task of supporting IMGOPTS and updating a lot of tests) 2. Some tests use qemu_img_pipe('create', ..) - even more work on updating 3. Even if we update all tests to go through qemu_img_create, we'll need a way to avoid creating new tests using qemu_img*('create') - add assertions.. That doesn't seem good. So, let's add support of IMGOPTS to most generic qemu_img_pipe_and_status(). Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz --- tests/qemu-iotests/iotests.py | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 9b374dad3d..a7a257ee2f 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -16,6 +16,7 @@ # along with this program. If not, see . # +import argparse import atexit import bz2 from collections import OrderedDict @@ -153,11 +154,35 @@ def qemu_tool_pipe_and_status(tool: str, args: Sequence[str], {-subp.returncode}: {cmd}\n') return (output, subp.returncode) +def qemu_img_create_prepare_args(args: List[str]) -> List[str]: + if not args or args[0] != 'create': + return list(args) + args = args[1:] + + p = argparse.ArgumentParser(allow_abbrev=False) + p.add_argument('-f') + parsed, remaining = p.parse_known_args(args) + + result = ['create'] + if parsed.f is not None: + result += ['-f', parsed.f] + + # IMGOPTS most probably contain options specific for the selected format, + # like extended_l2 or compression_type for qcow2. Test may want to create + # additional images in other formats that doesn't support these options. + # So, use IMGOPTS only for images created in imgfmt format. + if parsed.f == imgfmt and 'IMGOPTS' in os.environ: + result += ['-o', os.environ['IMGOPTS']] + + result += remaining + + return result + def qemu_img_pipe_and_status(*args: str) -> Tuple[str, int]: """ Run qemu-img and return both its output and its exit code """ - full_args = qemu_img_args + list(args) + full_args = qemu_img_args + qemu_img_create_prepare_args(list(args)) return qemu_tool_pipe_and_status('qemu-img', full_args) def qemu_img(*args: str) -> int: From patchwork Fri Dec 3 13:07:21 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: 12655125 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 4DB11C433EF for ; Fri, 3 Dec 2021 13:16:14 +0000 (UTC) Received: from localhost ([::1]:55108 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mt8Q8-0002Kz-Tf for qemu-devel@archiver.kernel.org; Fri, 03 Dec 2021 08:16:12 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57680) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mt8IR-0001go-Vb; Fri, 03 Dec 2021 08:08:15 -0500 Received: from mail-eopbgr80099.outbound.protection.outlook.com ([40.107.8.99]:31910 helo=EUR04-VI1-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 1mt8IP-000700-V0; Fri, 03 Dec 2021 08:08:15 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WN0ufH0QoeMXRIR6Y68EoJEgNiyrRQiz7fsmY7UYwZ4V695wA6PLpV1wnfjqwXPwYT3yWVzybWA+XVLY/dCcn+pooGijasapfUA6q+AVI5I7dX5ak8f/JJz/FZYqZMEcqkKMa36UJSDuOzoxV/EokFeT8DkmClU/Amb+MR6UUG4Fuu8r8lPgQFQ9EEEz8vFLp0I2ZhRVKnIxc6r7WF1mJC4PSqkjW4QYHK3G3Ai1c/7oil8/0CpHmluUMrr6w/574YXFYxeieWzkZkJjKxqO0UXNkvMHTFeV5UuAlNz6OvLof0rCvSFkTkdl8n0zEVJ8mrjdSjK0rnJySUAwGqNqrA== 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=dfAH1f1AldwRbRN6ZAAEYbgfqdYt4mT3p1VmNPnl7ic=; b=F0AupatCCgXeU63KDqiaguSnIGZ/CxV1A6+mDIPYGZxd4FR9jTFzUiveT+4Hbc00PCzEEc0KgPXB4JKIxRKCxfJk/VBISXL1tRPonaX9WE9wewTfzZ1n4w/k+QZQ6WXa6PbmM5W/665ZJThnWkCMUxDc9B+w2nYYooqxZe1h9EhPUXTP/AwNfl1ONam9f6QZ8oGBX+2wRLeYrA1ttZHKOMhr4PrcvFALKN4QX7rukKd0Zf1XfTxyMSXYEKD9gUCVSSnQCK9tZJoBJtEmrrEErgCSuwkipCYKGAiPh7+C+1zGyZ8VJhRIpBy2Ch9ZIXO8R7AOInFrQYtrYswadUT5XQ== 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=dfAH1f1AldwRbRN6ZAAEYbgfqdYt4mT3p1VmNPnl7ic=; b=WwZ1Crymt2QUeUGORtbDIl9DT7dxUET6wsS2fWR+tOaQHgLLyQ72n9Rz5VoPkC9JCAQsoWlF5upyWYPOvYnB6VwGymOhU13OAXsnVGSiP2WMPdG/wfwTU79t8Y1xib7JVCPNgL+50kSyLyCVNJlVn9YqkBVJ2KrnULa5JYtuf84= 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 AM0PR08MB4515.eurprd08.prod.outlook.com (2603:10a6:208:148::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Fri, 3 Dec 2021 13:08:04 +0000 Received: from AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a]) by AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a%7]) with mapi id 15.20.4669.024; Fri, 3 Dec 2021 13:08:06 +0000 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, hreitz@redhat.com, kwolf@redhat.com, vsementsov@virtuozzo.com, jsnow@redhat.com Subject: [PATCH v4 03/19] iotests: drop qemu_img_verbose() helper Date: Fri, 3 Dec 2021 14:07:21 +0100 Message-Id: <20211203130737.2924594-4-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211203130737.2924594-1-vsementsov@virtuozzo.com> References: <20211203130737.2924594-1-vsementsov@virtuozzo.com> X-ClientProxiedBy: AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) To AM9PR08MB6737.eurprd08.prod.outlook.com (2603:10a6:20b:304::18) MIME-Version: 1.0 Received: from kvm.ch-qa.sw.ru (130.117.225.5) by AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16 via Frontend Transport; Fri, 3 Dec 2021 13:08:06 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ddfd6fc4-c50b-49bc-1ccf-08d9b65df260 X-MS-TrafficTypeDiagnostic: AM0PR08MB4515: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1923; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: L0TZPSlO12oTkl5CrG6Uc/pRggCxF/gxGQ1inVioPM6EiM14Dfa/FafgSFmo21xtA2tP3HlzYRdCO/zf80VeUsQO2JE/49PJZB9XOEtvQbw2OW15++RRB5T5BML4OPXV569LbE/tN8wZBB5lOjrFcAL/TDEJRIiC0Mo2BPMFvWtVcC/o2utF1Yhpe71AHS6Rh55RICP+BsVwbUDHt5SlpINrHcG03VLLWsdLaXrt6hnG3rec+9l7517XM28lk+dfkqhCkDISqMsCxQcKwhUAlargjEUa4DTw9FmoLRDX4lTL6SDRw6EfDUpR9+vcmp90pIhVBVT2iW7BTl0oTcR0S1GidzlAHJ+OPZ3p9kb6IlEKpUmm0p64/Wr2jb0x1aqFfuLG0KrOPwF8uW2K1dTmX3UPM8Y0Sll/bJ/JXVsu6BR4EJmupqhmMgtV0gh8cqw+/SCxE8ERzheYZ2bRpLDB7OJSb5X/qyCVX5WSd5vF0/nbnsvZnHd6iYfHY9IXo3xtWNbN9QDnov0aIo4Em6xdgGT2dRoNCzG6Rm5eNCEJOZ7mH+0gfXK29VZm/g6zH+vYEWnw8LBJzbOTapTVmU6YBZZnzjc/jUTGx+GitQMAfojwH1VtWU1k1f6++9QXM1FYZUZpZTW6lyQpDrl9lqJUfIyftFbLs2iciUoCpKgy6CtjkTfeD5UlFB3z+NEkjXA1EgpunjVikF1is/BV2eHQaA== 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)(2906002)(4326008)(186003)(6512007)(52116002)(6506007)(1076003)(5660300002)(36756003)(86362001)(38100700002)(26005)(956004)(508600001)(2616005)(8676002)(316002)(6486002)(66476007)(8936002)(66946007)(66556008)(6666004)(83380400001)(38350700002)(6916009); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: pigawQ6PVRoy8IlaaXxG75GJjauNqFvuL3ECnuTRmXmLP2DET4T5cuotkxRphhCbyeHOrJW3gUvvwErfIx/rRNVGhbTyNMXrT/Ozyfm7qwElNolB1m4IW//oEMrKT95n9cYrLw+b+m7oW7b6RhpHkO5mio/NSl0Oy9Fo8qNLTvZSKLRCsQibDs6Ngo6FuoXEzg25RrtWBG6n4IsqX9i6izsxPtHnz4qUQLpJuQGjA645OpWNh7gylPqTrkd54LzqA+Pi+HCK039SO515zsHs7y/uBmxsxAVExQE0g6jkpi6DQdxSTsva4Pa1VS5c/zJ6plbaYsfr/j7qfZ/uSjSN4I6JA3jYOmKGjGhrNK2ha9j+HW06BU0KocP4y56mMue+cUVp7n9OBZnUl0oKqPk1seQF4Np6Mk3ztUFSRkuWndzKlONZrjeRetBL/HkxB978TXsXzisZRdnHF36ttvr/FEzscG37UJCTrqDuPNyZdRZwHBcYmhv5/RtDHeqztgniyybzK4+f+SGCTMbEYI8/Hf9keyeCs9H79gEtlxxxm7lGp5rdgkU94TOxtm2Fo0D0IUPAGWlGOpby5Nu5Bgrc87DWzZmt4zmWOvs4ymKLNCO75NcuRdb8ybyTgTi9pMBDSNhDLj5nWNMsqThgJOvAK9vYlZumqyfU2DHUrfs21RDkEwxyxdoBYnZ3sdW9jcPT89x+BDMzFndzTI3g0hm9XrdOFckb13OuqXBrXKxVAQg6ZHIgKmgey9pg5UVhwsu/zVzggXF+Hk5HwLXzo0q1vJzjxs1ZSCveg60tGe0n7m3UR7NLWeeAp7RINRPCJ+N/ZsmnMhQmYMVFUALXjk6NDt7EeQDlFjZcHoSs9lF1S4Okm3GpwaMe7QfAGmuRFH6GkLoGV0l6w6hEAiBczz0isKH4vQbD52HGVGwLSoxqGB1pjIofDMr5B0lBwWvYmtacqLt0k6ItP84UxJWw4WeBmsF6unDts6SUclrWiY3J3/8W3uWAKvhcVk6ty9XPZLc50TrbaUlabvMhvaWA+tplNLNF5yd3nHPVvKBTP4unVfAXjJxi2WYSbCODRJdG5OCXiKJo09dtHxDFfg6Yrd0cs0t3UX8JjpOvwCfh/Psjl2hsd26HNINdh3I68FqQYXH5HacscywxUopOQg1cSgYcL94r6WWmlt9nQDdYEES4qkGIqF4ljBHGWx84oM4bb3rLuwv/SF96gNiGfP6sug43vb9SG+IX9f5GgxRYRnKCfaTkDYVe1YKOjekvmCETAMsHvLOQ7/OeoDBgLB8gZnIBQP6q6W2C6PiivLG/zNz1TZIqVwU3Ockn3FdahAH05S3Je8cXVyn7tb5Fr9RbnyNNzMBJ5cK/QnB/ki0dvl4weRB0Ro59mtrrflhk2Z5AMfRXXtPUh8iQY+kxDJc96jAmGfnpT9aEbgTVnzDw2bthQwDdbU0RT2y16gP4CuAoYQUP/KnrDvuGiXgyCuN9xMF0WVncp0FzsxSrwJznE5BSwmQDaEmBkUEpSxOv+LGSiVKJvMQisf2CUD55yMfSMFwSezLY3G0Ru/xIEJdrruq1XWtn5O4gXekIeWewEe8iOKWM4ASGi8dgPquHjO5236l+3XRTAroEgLrd8K/TBjx/YpOxhoqqD4/0YfEEkOppOWt4IlIkrllE217kI8ZgakKPDQ== X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ddfd6fc4-c50b-49bc-1ccf-08d9b65df260 X-MS-Exchange-CrossTenant-AuthSource: AM9PR08MB6737.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2021 13:08:06.7490 (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: tvTAE7kUrFNsglgviBHdHw3FuFsFtgY/ZDD8N30BnTebA/h7fHcKAgsw2gaLfdE29RFnkznlyGVCOh/pWTqOrVocuIMqLOL4kEpGh8hxqZA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4515 Received-SPF: pass client-ip=40.107.8.99; envelope-from=vsementsov@virtuozzo.com; helo=EUR04-VI1-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, MSGID_FROM_MTA_HEADER=0.001, 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" qemu_img_verbose() has a drawback of not going through generic qemu_img_pipe_and_status(). qemu_img_verbose() is not very popular, so update the only two users to qemu_img_log() and drop qemu_img_verbose() at all. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz --- tests/qemu-iotests/044 | 5 +++-- tests/qemu-iotests/044.out | 1 + tests/qemu-iotests/209 | 7 ++++--- tests/qemu-iotests/209.out | 2 ++ tests/qemu-iotests/iotests.py | 8 -------- 5 files changed, 10 insertions(+), 13 deletions(-) diff --git a/tests/qemu-iotests/044 b/tests/qemu-iotests/044 index 64b18eb7c8..714329eb16 100755 --- a/tests/qemu-iotests/044 +++ b/tests/qemu-iotests/044 @@ -24,7 +24,7 @@ import os import qcow2 from qcow2 import QcowHeader import iotests -from iotests import qemu_img, qemu_img_verbose, qemu_io +from iotests import qemu_img, qemu_img_log, qemu_io import struct import subprocess import sys @@ -112,9 +112,10 @@ class TestRefcountTableGrowth(iotests.QMPTestCase): def test_grow_refcount_table(self): qemu_io('-c', 'write 3800M 1M', test_img) - qemu_img_verbose('check' , test_img) + qemu_img_log('check' , test_img) pass if __name__ == '__main__': + iotests.activate_logging() iotests.main(supported_fmts=['qcow2'], supported_protocols=['file']) diff --git a/tests/qemu-iotests/044.out b/tests/qemu-iotests/044.out index 703cf3dee1..ff663b17d7 100644 --- a/tests/qemu-iotests/044.out +++ b/tests/qemu-iotests/044.out @@ -1,6 +1,7 @@ No errors were found on the image. 7292415/33554432 = 21.73% allocated, 0.00% fragmented, 0.00% compressed clusters Image end offset: 4296217088 + . ---------------------------------------------------------------------- Ran 1 tests diff --git a/tests/qemu-iotests/209 b/tests/qemu-iotests/209 index ff7efea11b..f6ad08ec42 100755 --- a/tests/qemu-iotests/209 +++ b/tests/qemu-iotests/209 @@ -20,8 +20,8 @@ # import iotests -from iotests import qemu_img_create, qemu_io, qemu_img_verbose, qemu_nbd, \ - file_path +from iotests import qemu_img_create, qemu_io, qemu_img_log, qemu_nbd, \ + file_path, log iotests.script_initialize(supported_fmts=['qcow2']) @@ -33,4 +33,5 @@ qemu_img_create('-f', iotests.imgfmt, disk, '1M') qemu_io('-f', iotests.imgfmt, '-c', 'write 0 512K', disk) qemu_nbd('-k', nbd_sock, '-x', 'exp', '-f', iotests.imgfmt, disk) -qemu_img_verbose('map', '-f', 'raw', '--output=json', nbd_uri) +qemu_img_log('map', '-f', 'raw', '--output=json', nbd_uri) +log('done.') # avoid new line at the end of output file diff --git a/tests/qemu-iotests/209.out b/tests/qemu-iotests/209.out index f27be3fa7b..515906ac7a 100644 --- a/tests/qemu-iotests/209.out +++ b/tests/qemu-iotests/209.out @@ -1,2 +1,4 @@ [{ "start": 0, "length": 524288, "depth": 0, "present": true, "zero": false, "data": true, "offset": 0}, { "start": 524288, "length": 524288, "depth": 0, "present": true, "zero": true, "data": false, "offset": 524288}] + +done. diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index a7a257ee2f..4846ba7c60 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -227,14 +227,6 @@ def qemu_img_measure(*args): def qemu_img_check(*args): return json.loads(qemu_img_pipe("check", "--output", "json", *args)) -def qemu_img_verbose(*args): - '''Run qemu-img without suppressing its output and return the exit code''' - exitcode = subprocess.call(qemu_img_args + list(args)) - if exitcode < 0: - sys.stderr.write('qemu-img received signal %i: %s\n' - % (-exitcode, ' '.join(qemu_img_args + list(args)))) - return exitcode - def qemu_img_pipe(*args: str) -> str: '''Run qemu-img and return its output''' return qemu_img_pipe_and_status(*args)[0] From patchwork Fri Dec 3 13:07:22 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: 12655165 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 797E4C433F5 for ; Fri, 3 Dec 2021 13:22:58 +0000 (UTC) Received: from localhost ([::1]:37238 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mt8We-0001S8-Ah for qemu-devel@archiver.kernel.org; Fri, 03 Dec 2021 08:22:56 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57858) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mt8Ij-0002A7-H9; Fri, 03 Dec 2021 08:08:34 -0500 Received: from mail-eopbgr40107.outbound.protection.outlook.com ([40.107.4.107]:61828 helo=EUR03-DB5-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 1mt8If-00071J-OA; Fri, 03 Dec 2021 08:08:32 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A0jqynyEeWGi1DV1ZyXljRkFg/BYFXagr5fr4eQ/sEBLMVBnVk1pU/GYYc7x4cuGH4sPwOuVP8vxMkH/oq4UIjQeO714CdruFinKCHRRW2Z0tUGIxzJRFTik/UPrNftgcrw2Op4UPPtwTWkODoQ83TkHP00uIuqP4OO8126N5/VehsndNbedStv2JnxcPvkb8NMArcpqtjsCl9wOUtOT1z2HbmQNH6sifNCTtiI8kBrVKgxPwY3I87FUzKBFKHBR+5qT19DezPgPbUt1dv4v2IlfyMeM+ypftifWDoc7yxtrJFoqtiXOHeZZevSpe03ZtuFP0iCA9DCB4whysaSfTQ== 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=qRgWlaPlXz07pjacdZ8Q6G9t2x49Jbk6j/j+XkcksbI=; b=P413oYOmkjCtospLICG07FaR/IgJDO3YpnNECJT4zNbf7yGYDMXruEkGcIiT3Ef3LaUt4xQSv2Ocl08ZpI5TZ1V/AtPUkmK6uDgp8MwBCxNm3nKPryWkRALl4ibB5gMV2IBhuNpZcBXP9kctztJHwdUeMJWXXsWkFKVubZPUmpeeAtbZwa2X1YnT1/J34xoErKSNwkZcj/m5HzbyiYgGk1NxG95/nkQpQauD+X7AFxG/3/mXWFqpgIOF08h/m784JXS7s6fVradrF1X8flEI9BNznMXZs7QVVTZ7gE4ZoByH8VYnT+MwLjBJu8cAJQvp6uVbCstU8Gs0Ct7jHrtGuA== 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=qRgWlaPlXz07pjacdZ8Q6G9t2x49Jbk6j/j+XkcksbI=; b=DFMy8MMbzc8vyZDwckelxWSDYZw3BPScm3uCnMvR2SoyJMDYHqwYFsN26JD6Kgea/0rygj2DVRmmLn9TXQUbVQMy62t5L3NJL8aYu4iOdSGiaaSXIG0ahc7VtrdZCSjDGo44LtnmY2mxTH6nCd4P3KwTvKusKx0EAsNXSg6qy2I= 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 AM0PR08MB4515.eurprd08.prod.outlook.com (2603:10a6:208:148::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Fri, 3 Dec 2021 13:08:05 +0000 Received: from AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a]) by AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a%7]) with mapi id 15.20.4669.024; Fri, 3 Dec 2021 13:08:08 +0000 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, hreitz@redhat.com, kwolf@redhat.com, vsementsov@virtuozzo.com, jsnow@redhat.com Subject: [PATCH v4 04/19] iotests.py: rewrite default luks support in qemu_img Date: Fri, 3 Dec 2021 14:07:22 +0100 Message-Id: <20211203130737.2924594-5-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211203130737.2924594-1-vsementsov@virtuozzo.com> References: <20211203130737.2924594-1-vsementsov@virtuozzo.com> X-ClientProxiedBy: AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) To AM9PR08MB6737.eurprd08.prod.outlook.com (2603:10a6:20b:304::18) MIME-Version: 1.0 Received: from kvm.ch-qa.sw.ru (130.117.225.5) by AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16 via Frontend Transport; Fri, 3 Dec 2021 13:08:07 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f25ac73b-021e-45e2-d4ea-08d9b65df2fb X-MS-TrafficTypeDiagnostic: AM0PR08MB4515: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5797; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4sKrQL+5AeEdudimNBCsD4oJRAScwAT8QPXU7/PPOepkQVxz9u2l2YKGrc2ioIbMoUN/aCUxXfWHxYEyYtGxJjKoLk4hn7YQsJZaPVhvj1sH30sglWgOE8Ilzs2wN9qXdwR/CPgXwlXbs/NHw8KXGwq/TgjcTMC18MDAdwMcgQ0V+1xRYiD58/X3dFcgpfqiJIDN4aESWqk0j0DMhTLN9P1xtDF3wZtX+XF3/wm/ZEKSgLP5a6/zagr5PCIfHB224Jdqi5A2UkBKTeFl2FXxEHnzoaOSNJtXCLLO0YViFVT2IvyVpj9wT10kO4Sr1ROPtycoo9TSA7YCN69GAj86IEYDGMWsPn859ByjI0Lwu46eEXvj3CmJlWizG/X/fTP0oo27eHRcvLIKki7RL4UeukQOQQBgw3p4QNMaD0X9owo/h3w/Oynh7QKrT0NL0NibktRVHGEtAXW4AtIN56im/AjMO7nkD5vFm/4Ws80f8TMQmjP/xvkIXR7aPooFWqqIdScXLkw0PW8BWLmAQkD0Eu38CO0ZHoJe12KxCgGfKJDAeSDfBR7KQbwPK4vjlGKGlzxmqEY3iFA74U0MZjIScRMQKOixkwwwoiC9efHNTlhkn3C5RruOHfuRBscKwXaKasLH1hwbImQaG90c40tbuDWc2X8xOUV4m4lzN3vLwQkEcrOxxlEomn5HCWV/EyNinhZzfRCOqz52A6pdb10fzg== 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)(2906002)(4326008)(186003)(6512007)(52116002)(6506007)(1076003)(5660300002)(36756003)(86362001)(38100700002)(26005)(956004)(508600001)(2616005)(8676002)(316002)(6486002)(66476007)(8936002)(66946007)(66556008)(6666004)(83380400001)(38350700002)(6916009); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Srl9ayqZSZyEkWzHipFHwdjPMCgFEfg8OSC0LiYa25UcZWSk5L3o73OPrCSp550LeUlp+kZGM3IUEUB4EDXG64ky8yCSN0uO1m4QxbzCRhfsaumhJywgBhVDwe5lYqfgsPYj/OV/HkKIUku6Qb/1Y7B97ZGRxHUlln2U1u0kNfT1A7pkvQtGF+kRreODjAD/SJnvMU7wdTTFKw9j0pLJGbDdE0nBl/2bsOF0IAu/WpSfBI2aU+QCsH8bPz2uS+c8CCYOqCJJyEbCbdVylVdbMRinNiZfonez4e+LxPZfXqTHYg3nU+Zi5sPrWxt/cvZweKoNLWJtzfUcvM291JgkKGOMx+vMZF4TJAJvQbH4mzVYaeEgFr6RKX4xcp6u911MJO5moECj62kaFMmoJCIDUn17lVjbRS/t3XXEBbGxblPjG0/z4b1R7zcJawD89NMDaz02uVscrTEAiRRViehZWLbZtAz9xfYWmAzpiRw1BjEbxU0gFvz6F1ZaG8T51b/lxjliTFnB3K4Ixc2VrA6PzBtrAdzsN8NmEkbos8UsvSGHEeJP4rV2Oc1NuvV3R8JacjlQSouVdiiuLMCW7/Rlu0rtNMj6T1qxWvApFiE/BeWkrMBQzPI/5XPMnWpjx+onUSRn9+PqfNXjFcmYIHzNF69hopSLzi1/EU269O/rmIZqImdJHv6dkDV1BH3ydZTb5bstiLCDE8k4VNMVLEpP7XOEyZIfPvDz4JRcIVAfo0vumtxnJqDglFATICU/4pFqWZx7Qg89c79/7l6xvjiEqpHs1ng8IzG7BRRnEPPUvGSg8kMhu5ZblhNkmKvW65GNwY4rD0YCTODUKcaKnJMMC8y3Owy/eszVCDV/DF7WHPYUGsmWMgUtghbhZEPm8zwoxdVKaJ+I6bq2nZCZVlMRAnADvCY6bLUJvEbfeR2YPni7+Yd9yj1PSHvQTYa/UoXJW0akodiD+lnt0cdymo0sBEZ31OCyQJZxrNNPsr7XrQYiikkydy/VAEkEuGEkdnKt4jS55d0T3pImgUeQHOoyAfD4JUDLatGISM2PzZYqQzaANSwvEM5jDG5G7Jr0Sz1S9bBU+j7p0VEKqeJsOHvI9TQFiE2tx0DrTFcycp7dwYIh6gpYv1EldZeI0yCyw7L5KVGvnQIxQ/Yo5TZzInVeMbv/kV2b7ZOPp1m5hqLo4DheAH/Prtecc1Ia4MZ4UFPu5Vbr00eEFFSAUKaOv6Mpqbs5o2igUqKrpsejyMJR6R19yEpuNDopF0oJajKxrSmvRgli444Mup+AjOakzhyPcsqU9BcFvKTPbeBw/PegaYvFNwAdjzoiJv46EqtcwvdX7cIRS/PHzIZ02Hil3lvyMPb4WA/j1rGqF3AvqgmPabIRAXqTjeJZoMd7zcOXTU4Tnqr/ZFz+URkpWXxKsLCZ1JJ0xCzgPhLu23EaonjY3PyrzCOmQjRgxb7o5hw3vZcS+mDdGkgSCOdBIyhFIbHyV5+Oq7MZ/oW8tH9hSeqo/P9qNk8kfC0FmABiAdM4wzsFAkG3TFuNyN9YzCJtQcOA6pC8IYJFxNd/tw4lvpWb3VK9x3BC94n0VAbD08c7/plYt1doXf+NsbSaD5GU7o2dHLCZKKihHj/oDjmTsk/A8h0p3WE4ZYx1W/iEGszCLHzTuEnBEGSdSmJuwe25I4N8EQ== X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f25ac73b-021e-45e2-d4ea-08d9b65df2fb X-MS-Exchange-CrossTenant-AuthSource: AM9PR08MB6737.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2021 13:08:08.2833 (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: r2yRl6gWL3KgGev1g+GnqBi8Rdk51XxAp/1G0yFzl5lr0OFto+X3TkhX+i5x5r3xmZs3PyGssSTJ5YeQcAu6+5WL+x3e3AI5NY5XS35kS7c= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4515 Received-SPF: pass client-ip=40.107.4.107; envelope-from=vsementsov@virtuozzo.com; helo=EUR03-DB5-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, MSGID_FROM_MTA_HEADER=0.001, 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" Move the logic to more generic qemu_img_pipe_and_status(). Also behave better when we have several -o options. And reuse argument parser of course. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz --- tests/qemu-iotests/iotests.py | 36 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 4846ba7c60..055b162531 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -160,9 +160,13 @@ def qemu_img_create_prepare_args(args: List[str]) -> List[str]: args = args[1:] p = argparse.ArgumentParser(allow_abbrev=False) + # -o option may be specified several times + p.add_argument('-o', action='append', default=[]) p.add_argument('-f') parsed, remaining = p.parse_known_args(args) + opts_list = parsed.o + result = ['create'] if parsed.f is not None: result += ['-f', parsed.f] @@ -171,8 +175,18 @@ def qemu_img_create_prepare_args(args: List[str]) -> List[str]: # like extended_l2 or compression_type for qcow2. Test may want to create # additional images in other formats that doesn't support these options. # So, use IMGOPTS only for images created in imgfmt format. - if parsed.f == imgfmt and 'IMGOPTS' in os.environ: - result += ['-o', os.environ['IMGOPTS']] + imgopts = os.environ.get('IMGOPTS') + if imgopts and parsed.f == imgfmt: + opts_list.insert(0, imgopts) + + # default luks support + if parsed.f == 'luks' and \ + all('key-secret' not in opts for opts in opts_list): + result += ['--object', luks_default_secret_object] + opts_list.append(luks_default_key_secret_opt) + + for opts in opts_list: + result += ['-o', opts] result += remaining @@ -203,23 +217,7 @@ def ordered_qmp(qmsg, conv_keys=True): return qmsg def qemu_img_create(*args): - args = list(args) - - # default luks support - if '-f' in args and args[args.index('-f') + 1] == 'luks': - if '-o' in args: - i = args.index('-o') - if 'key-secret' not in args[i + 1]: - args[i + 1].append(luks_default_key_secret_opt) - args.insert(i + 2, '--object') - args.insert(i + 3, luks_default_secret_object) - else: - args = ['-o', luks_default_key_secret_opt, - '--object', luks_default_secret_object] + args - - args.insert(0, 'create') - - return qemu_img(*args) + return qemu_img('create', *args) def qemu_img_measure(*args): return json.loads(qemu_img_pipe("measure", "--output", "json", *args)) From patchwork Fri Dec 3 13:07:23 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: 12655161 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 71E10C433EF for ; Fri, 3 Dec 2021 13:22:39 +0000 (UTC) Received: from localhost ([::1]:35380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mt8WM-0008PG-Br for qemu-devel@archiver.kernel.org; Fri, 03 Dec 2021 08:22:38 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57704) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mt8IV-0001sb-MP; Fri, 03 Dec 2021 08:08:19 -0500 Received: from mail-eopbgr40107.outbound.protection.outlook.com ([40.107.4.107]:61828 helo=EUR03-DB5-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 1mt8IT-00071J-B0; Fri, 03 Dec 2021 08:08:19 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ocAUYJ8KvBtxI0k9XiUVh4Sl7UcklrUVRROxwceGsqfLHsPljDA43EphMvYN9k6WAbnNb7MYimZ3Yn0Ej7kiRhW3B38W4z6fPyb1HIMo2ZHukfh/k3KHI7b7nj+4e0S68Rpu000tHk2vaoqH/rax81MKBDYmnUbbDLYfpiJHnPVR3MSyQbbiBJ2xcOXPPGmDiKImjL3KRMK/20dh5Deop8Cz5nScNtV/O2b7psuu2KAIwgUZxbLeTVEox4K8CZh2wusYBft1DXH5SpYBiEYro3Oo1p36yul75nWh+YAJ/IfHSTpfGu+J3pjrU7fcUswkUISSMP8gCUiq/PqeY+jBig== 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=bMMaY+uBj34V+ZOKyD8G44E8xsq2GC3/gsYcDTSOu/I=; b=fhzqPy3haKZHYneYkkQxiu6v/cNxVYeNeeFNzkJ0OJYUxuWfGwJWad4oLe+9Fl3oHr2T0HMkm/gb55EqlqBiqnJ3KjdrBbeqnzKbgqLgQrZ4XgtUD44A70cPjQK+vI9Rl7A7/6kSQIxAsFDHvslkwNkuAPRdjQq3qpjoooR+ZT5AiTCdvgEvN17HRAf/2KmPjAz7vfBYFp6EUtNMPUCvo2t3dfcq7fO6ZuVzhOrR2tpTutYpPdXqQHObnzPLEgReLkh/V2HNkglnJr2V5aLYhxCfnhJPmMRgGBKbh8X1JEonfXlYttVSqrWZeRCRuwYelrr/q1LCqatIJzjgentKdw== 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=bMMaY+uBj34V+ZOKyD8G44E8xsq2GC3/gsYcDTSOu/I=; b=YScVdf2sbywFglMaKV4InPC274mEkhbpoDdOJ9q1fzUiihRJ2BnZQNBvU78eT8agK43Cz+0QluciKYdxZ8dcA6YHo+IBUHjXGZXYySRFQNbMhh4MFROXFjYPTtT2Dvh5ADErGZZfMgmEyPMVJWddnwRZWpcELqU/r3PNHJfaR9U= 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 AM0PR08MB4515.eurprd08.prod.outlook.com (2603:10a6:208:148::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Fri, 3 Dec 2021 13:08:07 +0000 Received: from AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a]) by AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a%7]) with mapi id 15.20.4669.024; Fri, 3 Dec 2021 13:08:09 +0000 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, hreitz@redhat.com, kwolf@redhat.com, vsementsov@virtuozzo.com, jsnow@redhat.com, Max Reitz Subject: [PATCH v4 05/19] iotest 303: explicit compression type Date: Fri, 3 Dec 2021 14:07:23 +0100 Message-Id: <20211203130737.2924594-6-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211203130737.2924594-1-vsementsov@virtuozzo.com> References: <20211203130737.2924594-1-vsementsov@virtuozzo.com> X-ClientProxiedBy: AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) To AM9PR08MB6737.eurprd08.prod.outlook.com (2603:10a6:20b:304::18) MIME-Version: 1.0 Received: from kvm.ch-qa.sw.ru (130.117.225.5) by AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16 via Frontend Transport; Fri, 3 Dec 2021 13:08:08 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d2eb3425-267d-4866-aed6-08d9b65df3bd X-MS-TrafficTypeDiagnostic: AM0PR08MB4515: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: P5BgIQoWlwxBIU6+y7cpjtBNoGl2diOeAOmrMMVkpldyKpag8EIFlsskMjhEFxdR5OTUzyF0DjkhKhScgbCwNMjMWilNLwKBW2xgKK+q6H2AHcI2u0fFPSnDH54uI2tKCAqclEt/CQYSw0zcthwPhYBm4j8/uI1qjmytjsUkH+MaKLuR+3MAszRjYu8E09v0VW9QehIfBc0cDaGcil6J24tGn8yPl9gy+8eCv67p/T1C0Wy6P/nNQ1tONHmv14IlFFGBElCVnV5fM3eAuPGfFol1enILCTmtTBjLEh/Kx6mUPjhkYHE3C8MwExa6LkXxQuu+tEeLUUCBjPB9xECEeoE0554K5sjr9KDryoNtth9RIqSArM5WVjKl5V0YDdvDOb/st0ZlMkWAQjG6n9OKP1qotjovFEnmFGYexpLZpGmUUdtG5StGRcDS5L+qpY+m6v9X6Z8MiwTt/pblx+q3q4Tb/gtyOw38Q7QhqydxMTpT8l5/rj9oBw2hJn+lqFM3OyNPjHj8hQMwJSOsXlpiwwhZ/sqKk1U/V6AXT4Q8c5A/EhhcOF+VHXol+q0c3osGO/bJSlzXSTXzTYiHnI6T/6zjPb9k0emL8ScXoGFOddh4EwwG88euqP1JyUFaveQEP4grLz29LXIEoRtNJGKjPJU203jUG4nY83vHyHsk0xJAH/bi+ZygZnX57EjNoF6yGdcOPL+pP8xjkdaAWbNnbSsUQ4btZKh12LDN3OYN92U= 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)(2906002)(4326008)(186003)(6512007)(52116002)(6506007)(1076003)(5660300002)(36756003)(86362001)(38100700002)(26005)(956004)(508600001)(2616005)(8676002)(316002)(6486002)(66476007)(8936002)(66946007)(66556008)(6666004)(83380400001)(38350700002)(6916009)(21314003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: otAd1t3Dm7Ly34lnuPKIFiVFKEBLB66V/QZKcDtm3kDdN43Lx4N4l0zc/I4pOMW4jtPM7p5te6pAn8BKatWmFwH/T7wBvKaa35ALl3wxvcZ00nilA0I5qyKY9hfn6KQmOOX89zsKg6h6LvO4KyQ2uDkM7wlMqgkS0ioNmkrvz2Jihe2EJusKkqL96N1j9h+GdYzeRVgU2HQx2I9bew/3+S2xRsKTKh7t5J7c4XV3hUT5MJ6EHygkjZvdmgwB/TeonyxaM1GDXFveGwwpJR+H/A83gJRnJZPEgDI/DEtc0O6ho9/4cC3/2zYmKKegogQG81tuAwp0qAuFnPQ4s75QmpFyRK5s/Ti49W+xSqTodS1rF0Eu5Km6mKyBAxeh2GRkb4tSkomGjOM0/fr2V8RVHRwvPSF9z22Pq5lgQywmU2kqafIlOimHjPX00UiB1nZEUQKqCkxZsShRdOgav2s9Zh/44gQ5whxqqhfAcVxpgXo7Nn93MCWCUTwgceNi/y7+oh+/tbSX04T5FqfOL9xUSlp4xsaFnz2IQKJiXTCyczX0UXSWAjrDtR5ag3l4cObqDoNEXvl9MUK1JFqUuKD/lPA7RLBEisC2gU7T8fW8JRt9M8mxsF6mcMnTKq1nZR6ZGp6hQNPDfXeU3FXbxrPiipf2OnHmsX+yrsUP0+2zxDHE5LSFqGx8XbkG0+ZenDRSLUbefaeRi0PLJOmA64lqzCH1Jh3H/5afDI/FAzmfCIwb6O2CXf0yEb2bLDkirmbju8T4NufE9iVjVM6YamKAFaX0LfmSfwf4jG+Zo33SJejwmzZLn7JoroDKlR0IwxUqor4zUEhMpm1Wn6DH6IWEeh8c5YuDTnOzPYt3KbfNT0ny6afWJcLLZ8AIKx46A6Gha+sdtXEFQd93cofvY7AsUodyDUho3k3sd33bO1GXn77VWVooObkh+CzVlA7gHC+2QI8Sd1TYjbduHwyJKX8Q1KiLR5fxRp9IOjSpGTbBfodoCkFLGydJxaQsy0XDrcQjag5s/nP+K51ufX+QnYI7n3SEfolhbVEEMzqC2TJ+4qQ1MbRV8+VFiRxPmeSnkZfXXlLzuLH+IEU233zbDzEFCbWdFXKoAEEI/szg8nfPoSrQmbdB5Jw2fDpsSKTG/sTyfF2jviBnHAAxE+BZcYTwRWUzPhqmxsIVQ/aBFnWOgFTXlR78IzTZznyMSAQrL0IV26yZlRhH6a63JC3IrQsUAfgteXX48OcNEoHrTINTw5PbNgs7K/Nnexxqmg0QFkEbjy/qnWSkKVbnLd7vqYhAb/4g6YwZN8ESxPRadSPg0C4HAEHT5zDdovlIaOTqg4+sQ52q7DznQ1y3PQuKG8vtiVTfbiG3O3pI7tL7+aS1SeYqZnnq+qipJt0iTHPVH157vSU4qe9uWJYYMXy3+ijMXSXi/5WDGVVqVkoVmLgXWmcINcVb5IrhKrubPJ0ARdOOGIACR9yQFVUDXBUBXqCHG60ENJ9o77LPIS2B5o6WvvNHr7mxq4z8DnKY4sCpqUFSskp3eUDMX5FNOQdSGVUlTuDBJEvYCXkyt32mUQ1bzFJN/3WG/JHt7/YgcsqBwTewUxK4M4MIr83i7rEbAlCeTtHVM50wHpAK2LPWsd0ryGnrZd0kfOBcasSCsGNhaEsT9IO/Nw0skdx9QkWqD5yWGw== X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: d2eb3425-267d-4866-aed6-08d9b65df3bd X-MS-Exchange-CrossTenant-AuthSource: AM9PR08MB6737.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2021 13:08:09.0370 (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: a13xJUnR9ZNrV67b8UGs62QvOrpbrjA/LSSjRuo4S4+XHMds1ZMc69nbuuZReCe4n2LW0GM61ISxLOqVe+hmi5KEtPchvz0otH3E8jvyu/0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4515 Received-SPF: pass client-ip=40.107.4.107; envelope-from=vsementsov@virtuozzo.com; helo=EUR03-DB5-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, MSGID_FROM_MTA_HEADER=0.001, 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" The test prints qcow2 header fields which depends on chosen compression type. So, let's be explicit in what compression type we want and independent of IMGOPTS. Test both existing compression types. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/303 | 23 +++++++++++++++-------- tests/qemu-iotests/303.out | 30 +++++++++++++++++++++++++++++- 2 files changed, 44 insertions(+), 9 deletions(-) diff --git a/tests/qemu-iotests/303 b/tests/qemu-iotests/303 index 425544c064..9dee2bdfb8 100755 --- a/tests/qemu-iotests/303 +++ b/tests/qemu-iotests/303 @@ -53,12 +53,19 @@ def add_bitmap(num, begin, end, disabled): log('') -qemu_img_create('-f', iotests.imgfmt, disk, '10M') +def test(compression_type: str, json_output: bool) -> None: + qemu_img_create('-f', iotests.imgfmt, + '-o', f'compression_type={compression_type}', + disk, '10M') + add_bitmap(1, 0, 6, False) + add_bitmap(2, 6, 8, True) -add_bitmap(1, 0, 6, False) -add_bitmap(2, 6, 8, True) -dump = ['./qcow2.py', disk, 'dump-header'] -subprocess.run(dump) -# Dump the metadata in JSON format -dump.append('-j') -subprocess.run(dump) + cmd = ['./qcow2.py', disk, 'dump-header'] + if json_output: + cmd.append('-j') + + subprocess.run(cmd) + + +test('zlib', False) +test('zstd', True) diff --git a/tests/qemu-iotests/303.out b/tests/qemu-iotests/303.out index 7c16998587..b3c70827b7 100644 --- a/tests/qemu-iotests/303.out +++ b/tests/qemu-iotests/303.out @@ -80,6 +80,34 @@ extra_data_size 0 Bitmap table type size offset 0 all-zeroes 0 0 +Add bitmap 1 +wrote 1048576/1048576 bytes at offset 0 +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) + +wrote 1048576/1048576 bytes at offset 1048576 +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) + +wrote 1048576/1048576 bytes at offset 2097152 +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) + +wrote 1048576/1048576 bytes at offset 3145728 +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) + +wrote 1048576/1048576 bytes at offset 4194304 +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) + +wrote 1048576/1048576 bytes at offset 5242880 +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) + + +Add bitmap 2 +wrote 1048576/1048576 bytes at offset 6291456 +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) + +wrote 1048576/1048576 bytes at offset 7340032 +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) + + { "magic": 1363560955, "version": 3, @@ -94,7 +122,7 @@ Bitmap table type size offset "refcount_table_clusters": 1, "nb_snapshots": 0, "snapshot_offset": 0, - "incompatible_features": 0, + "incompatible_features": 8, "compatible_features": 0, "autoclear_features": 1, "refcount_order": 4, From patchwork Fri Dec 3 13:07:24 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: 12655237 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 900DDC433F5 for ; Fri, 3 Dec 2021 13:37:31 +0000 (UTC) Received: from localhost ([::1]:60910 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mt8kk-0001tg-Fe for qemu-devel@archiver.kernel.org; Fri, 03 Dec 2021 08:37:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33210) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mt8Xo-0004aS-BE; Fri, 03 Dec 2021 08:24:08 -0500 Received: from mail-vi1eur05on2095.outbound.protection.outlook.com ([40.107.21.95]:4097 helo=EUR05-VI1-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 1mt8Xm-00089d-Hd; Fri, 03 Dec 2021 08:24:08 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Sda63Da9btJB3iH6jXqw/s+RiewBd5CzpgQlzLVcE1exX0IdFd21dCcaOA/X7NXwoKB9miW+8z8SrBNDb25Qm8uEz/UIyxJKvoDqBBfeUbz8ZugQtC6iIo8jDXKypN0X/b/t1/2/nObJaC51TFtx3bgeNCmNzLP493U912FpN0EG6SOpqKz/xlbjNYx7F+T1lg5xUr5xKcC1aYsdt2YdBt9cCunw47Apk6j/Xv9hz76UYd/eukNpf5ATXDp8kHChmPTGO0oJcMaCk805CEFrEYJzYcvZW2zBd52XAL8FhvKwD/wiBtDLlwWU8lVZlseK5SpUT0glH890eM/V0/GwJA== 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=vjzRFhzRuTOHXPxEtuEYrd8abo5SP9xxpsdojVLcSnY=; b=M7GcVlLlgc0awxpsLX3fFWGreHnxcAO0V6lA9X+5HfcBe/80nmKPG9P56SDgA/gH6fiWfH0xWPc0aQBT8ylidNWEnkBpb9aWqtL8ItAScOu6R+SC54bUY5Q1uRSc2qb9HGhYt5KlCYZMD3QC3wZeYUHG8kUVeXgprdTk8RK0EbjFkgocQF/CKuEUYgEmwrxO1sZixs0yFayF+sCTQKdbcjOls/4H59Ocy5doZTo1Smi36EJrbfaT6VMuZPHLvMJcAZPOs2qtyzi7UjP7b+3ypVdhNNkZIbMjsS/AfMpwtFOLLredX9YbLRqvn+5gTS6tbAwTlLg+I2H6zyEw3UrZqA== 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=vjzRFhzRuTOHXPxEtuEYrd8abo5SP9xxpsdojVLcSnY=; b=c1eAOrWvJ1T43+jTJ0V/psrdx2sx8oN4pMMybMTm57/j4SxPHHNOU1wdAzPOIWefD9NxX5dyXGWET5g59RpHw2XCV1i2xgP1wkwBVoksiRosUJjjFeuU1e7ANCb7ZUZWknL6MM8W62kFAfoH81l/Z809FsYZpnPIVQnu9cZNxU0= 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 AM4PR0802MB2177.eurprd08.prod.outlook.com (2603:10a6:200:5d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Fri, 3 Dec 2021 13:08:10 +0000 Received: from AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a]) by AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a%7]) with mapi id 15.20.4669.024; Fri, 3 Dec 2021 13:08:10 +0000 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, hreitz@redhat.com, kwolf@redhat.com, vsementsov@virtuozzo.com, jsnow@redhat.com Subject: [PATCH v4 06/19] iotest 065: explicit compression type Date: Fri, 3 Dec 2021 14:07:24 +0100 Message-Id: <20211203130737.2924594-7-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211203130737.2924594-1-vsementsov@virtuozzo.com> References: <20211203130737.2924594-1-vsementsov@virtuozzo.com> X-ClientProxiedBy: AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) To AM9PR08MB6737.eurprd08.prod.outlook.com (2603:10a6:20b:304::18) MIME-Version: 1.0 Received: from kvm.ch-qa.sw.ru (130.117.225.5) by AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16 via Frontend Transport; Fri, 3 Dec 2021 13:08:09 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 83e05be9-1854-4a3e-7183-08d9b65df419 X-MS-TrafficTypeDiagnostic: AM4PR0802MB2177: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2887; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3HkXa1JpZlHNLB0JRrIHRLs9gI12REKGxjQ3BgLQB/XqCZuqDT0ogrhGnQDVbQEsJL9LkQqz+whCTHNRnd2CKVVuqTSLw0k/dpPMBfJi91cnyg+EwqjuAF3U+SToAhNLEcVQs6tTaP+DaErWReG0nGoBsaQjCWTsS7lyhyL+F6diZ8ODgxok5ixO6+ilErPffU/dS+GFTpgEHJQdnARs4cGbt5dPQKTkz/Lql1+Y9KaACrA4ZwxDzCBPMpg2Z/JBWQvr6lrjkRIc+Zv9X7HtgRXxHmngDClBP1QS6JK8I4tdTdZYo5m28AYwWGkFjWX33JAAp/F+/Xjp9v1eGaksZ8J2IhD8KRcdvfUJ5lw7AfXtcY8RXIHrMpt8N/vQbz4k5H9hBFOxtjS46F2CSRIaDVcV3CACtzLKjeFWZJ3Fxa3l9+dOA+3isvl1T0VbkgEvHNscztgFgo9jgwJhryBvpbfkqRwMNXO38TvDTDXL3bQ5nnU9rLRC8Y71evWDR8P5idPewRBTSHvtlpDt+ufDvhsF1DSLIKdqIXhe2dugwd06S+QQmIwsEBijtxvoTyvnJMZvjFlhi1KCrKw4pDMEnicNxX3Jka3xQZIwez4SduChDQhSXwJM9jvzFuEkjVHZmVAZDFc7pHkTkFuvu9mvlMnQulzsM/gal8t/GTFL+Bj6bxKSIQVpXTBY5JYOPOPN44yS/Z2BPmXReD8JMlkiag== 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)(316002)(83380400001)(26005)(66946007)(4326008)(186003)(66476007)(38350700002)(38100700002)(1076003)(66556008)(6916009)(956004)(6512007)(6666004)(6506007)(8936002)(86362001)(6486002)(52116002)(2906002)(36756003)(8676002)(508600001)(5660300002)(2616005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 2phXDDeea+L/aY5ittWIQ+2ccNOue+zjYQe3tTjl9+yKAtwjJ3mDOiWR7wSNStzkuCGFsWSGxgaf1Zx3lA7U6VsdSHeOT1M0VxWiAzQzQwN+onjo6FccS7wknaD92ymZn4bGa0iGIw/ot5Nv/KbsbxHGZ1a3R7plL9aRPpVacCQVdRWiIzhQ7feFU64Dd8t4FNTX8Gl9gDEr8UY4qoB/pdNl1asDM7ptxDGDegt7KSfBE4UWw5RttXKhXlmpl8lVO0i0UBxu2Ig7Au9ygVgdzdGr9inyQlPmJeIyecAkAMnQFd8kZEfMgufx9jANDJZ3D7Nr+ONz/UYRPJyoV11D/h96s5JP/pyWfYsFl8XpKJ9dme3mZw4qEr279DGQIcyHzkDBZ8jP5+A8MSVxW6r6IrGCWhgjCcq6OvgwtKq1xNzgHffegvyQMHCQTNc08DkXM3o8VniFZZKi+19eW0wVpysxWaksOjs9xzHE/4rlPem2GQ0oMXUMZdrRzHcMYEhtWhltiNOQ1kPkKCZNNqJtXtDwl1TsHu5iAtoKMDV/qnkkQFgpXmoJFw/oQ8znkaSo/sxg9sJujxmdRGCybwrq/hnCovElqcI5YPJrmCt8f/kduCfjchiEPmtIBpR8rlm9moKQ5d8VClWm9sAHVYYMw6qJuHEgsA0rElMgLpreN4+bQMtBtp+y5D2Au2jQLzKguRfZLd8kgdVIa48d1NxQyqLHTTuHTNTEjczmck+3x3qA8Zo483o7JXhb44VQK3w3FhqHOrjzRCjvk+MqLj867StFML0GFVn8RsPeJHAE6e4uMvq87VnmfBPrZrURYR1HlCLEcWw1RGLN5lmWqhoo3ZwtD0Wwrtt/Akl1ACrHrvNFlec4p2BMYqt2/Obv0zFDT3ccD7L5JZ8oBvxbe3RJ814ddrbEfXVdMULgcqP+sT6bbvloABFTu3OfH8i9UDg05iE0C8/n1w/w3IGPq4xsumdtSsPSjb3i32oDu2G1QV5n5DXHtqwj5MKQ2rQ0Lf8JrPLSc60JMlhJJeDz/aW8JS3ji7VrxHumPnBJ+UG5UG0QQsV3zKL97S/DY8qYRWfHQbMOB/8Hs9UYldTl64UCHL6lh7odSKWeeLxo/6oY/EidpK0D0MQ2WCzSNgS+R88r1hB0qZx/9sZLGrc4QldYVx2+x413AK3IXhNZSH9z4nXwNKaMp3n5piZZh0qfHIxEGihCi7OQDcHuayCGpK5xG/Ny0wbgrrOJgDwG7OQU4cXCPGfFTMDNbHLzETLNnhC2GSFTPQSry5WI6A9dANDENxODV3/9FrZcFaVOZE2TuBKIo0X5qP+BWqvryQE7pTEe+4tNmZZTBpN7zZQd6VWuVO5WjMaDcWVyGGx3e5i1L5R1uxT2mtl8FPllhc9W6PpgicRO7XjEUUf4rX5wJNccmY0BcqtQXRaC4yh1u2y73H9UyzDNOhEkNcrAKHzU0FhYUYK4deO+npomSXO9vXNmzCAQJN1HxCxRZbR9Qym4DAS2WXKnyrLAdQTjOXIDBOcVbt9Fwbwr8MjJvW6WHToJMM5Y5R/MmpHzf5wX0k5UrV+HSPnSokbuvMC7eubjgnUcBu6JdaVhgLqQqhk7wMaUR88bEX/vXDNqCzHKa/Qp2ldZ/Gabf2y0GsGUSx7kf0WyOsI8S9fpy7wi9mgpEoVOOg== X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 83e05be9-1854-4a3e-7183-08d9b65df419 X-MS-Exchange-CrossTenant-AuthSource: AM9PR08MB6737.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2021 13:08:09.7638 (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: sLV5MvSNhr0OwbN+92oruVd3RyGm8LyETfPxTRKhjyZG6Zr7fkwuipHj/E6ScILjVs5xVPaaviCQalP/ZgHtEvZwFEPbMHxvUnvfiEnuynY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR0802MB2177 Received-SPF: pass client-ip=40.107.21.95; envelope-from=vsementsov@virtuozzo.com; helo=EUR05-VI1-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, MSGID_FROM_MTA_HEADER=0.001, 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" The test checks different options. It of course fails if set IMGOPTS='compression_type=zstd'. So, let's be explicit in what compression type we want and independent of IMGOPTS. Test both existing compression types. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz --- tests/qemu-iotests/065 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/qemu-iotests/065 b/tests/qemu-iotests/065 index 3c2ca27627..4b3c5c6c8c 100755 --- a/tests/qemu-iotests/065 +++ b/tests/qemu-iotests/065 @@ -88,7 +88,7 @@ class TestQMP(TestImageInfoSpecific): class TestQCow2(TestQemuImgInfo): '''Testing a qcow2 version 2 image''' - img_options = 'compat=0.10' + img_options = 'compat=0.10,compression_type=zlib' json_compare = { 'compat': '0.10', 'refcount-bits': 16, 'compression-type': 'zlib' } human_compare = [ 'compat: 0.10', 'compression type: zlib', @@ -96,17 +96,17 @@ class TestQCow2(TestQemuImgInfo): class TestQCow3NotLazy(TestQemuImgInfo): '''Testing a qcow2 version 3 image with lazy refcounts disabled''' - img_options = 'compat=1.1,lazy_refcounts=off' + img_options = 'compat=1.1,lazy_refcounts=off,compression_type=zstd' json_compare = { 'compat': '1.1', 'lazy-refcounts': False, 'refcount-bits': 16, 'corrupt': False, - 'compression-type': 'zlib', 'extended-l2': False } - human_compare = [ 'compat: 1.1', 'compression type: zlib', + 'compression-type': 'zstd', 'extended-l2': False } + human_compare = [ 'compat: 1.1', 'compression type: zstd', 'lazy refcounts: false', 'refcount bits: 16', 'corrupt: false', 'extended l2: false' ] class TestQCow3Lazy(TestQemuImgInfo): '''Testing a qcow2 version 3 image with lazy refcounts enabled''' - img_options = 'compat=1.1,lazy_refcounts=on' + img_options = 'compat=1.1,lazy_refcounts=on,compression_type=zlib' json_compare = { 'compat': '1.1', 'lazy-refcounts': True, 'refcount-bits': 16, 'corrupt': False, 'compression-type': 'zlib', 'extended-l2': False } @@ -117,7 +117,7 @@ class TestQCow3Lazy(TestQemuImgInfo): class TestQCow3NotLazyQMP(TestQMP): '''Testing a qcow2 version 3 image with lazy refcounts disabled, opening with lazy refcounts enabled''' - img_options = 'compat=1.1,lazy_refcounts=off' + img_options = 'compat=1.1,lazy_refcounts=off,compression_type=zlib' qemu_options = 'lazy-refcounts=on' compare = { 'compat': '1.1', 'lazy-refcounts': False, 'refcount-bits': 16, 'corrupt': False, @@ -127,11 +127,11 @@ class TestQCow3NotLazyQMP(TestQMP): class TestQCow3LazyQMP(TestQMP): '''Testing a qcow2 version 3 image with lazy refcounts enabled, opening with lazy refcounts disabled''' - img_options = 'compat=1.1,lazy_refcounts=on' + img_options = 'compat=1.1,lazy_refcounts=on,compression_type=zstd' qemu_options = 'lazy-refcounts=off' compare = { 'compat': '1.1', 'lazy-refcounts': True, 'refcount-bits': 16, 'corrupt': False, - 'compression-type': 'zlib', 'extended-l2': False } + 'compression-type': 'zstd', 'extended-l2': False } TestImageInfoSpecific = None TestQemuImgInfo = None From patchwork Fri Dec 3 13:07:25 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: 12655187 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 91A2CC433F5 for ; Fri, 3 Dec 2021 13:28:35 +0000 (UTC) Received: from localhost ([::1]:44898 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mt8c6-0006yD-3O for qemu-devel@archiver.kernel.org; Fri, 03 Dec 2021 08:28:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mt8Ic-00024i-L7; Fri, 03 Dec 2021 08:08:27 -0500 Received: from mail-eopbgr40107.outbound.protection.outlook.com ([40.107.4.107]:61828 helo=EUR03-DB5-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 1mt8IY-00071J-Nw; Fri, 03 Dec 2021 08:08:25 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AjHR+vrOlSz6ItjSZroNuJGiW1lDs++atZZ9NyMYrOPig06yBOv0Ji7zIMC0hi/SLMYNQf0GdMRgczwA9XPTOjTWRg8IBgdNVgSizAoFbjyd1h8yu1z+Tg9Vzt0ISahQNLiN93bOachC25TUS98lPd3f3C269HEQk411ogLPeNRkk+gaUvjKn3YOX2TkpBpq552YGsMH8Ht/TOd0IUlgN2kT4N9L2xrufz8XJNvbd1MOdGoHkgv1ywlC804LKmzeUzKaRSIQUc1HVezXEwuJCkgoDaqdP17z7kntj5p4BoCj2GuI3wYYvint8I21RnLMsLh0QXiI3tZCnRXrkWp30Q== 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=Q+zsyEkm9TTfSkavt7bZMWBtcSrBK5Vuea26sBVgX08=; b=CrcKUUDHwPAn/MKudo/34OrmKY+GrXnklC/FFBmQZ/uCqYkPPFoKwVqxEegswzAl5So6ZaLkIvZePDwPVX5PieGOl0vRKlHuyKdhG+hfMRVqEPvPnFRoDs1hUsSS1j3A2SXFzo3gml8kYk1yosQSKLvBxBor8PGHDOjqGEjCArasmmft5gDKoNqUwaJ1tx6K6PWmRJb/CoPlfUWz+0ao98pAF1lELonKaxjfr60HnbO94GUHz74slj//cKht+eFvsA9h+XVF6BXpVOrwzwObixi0FgVlk+a4J/PhPlhe32efJYBaEY8WY1rMBouv6EiIF3vPGX+1bYzvGbXN5g85cg== 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=Q+zsyEkm9TTfSkavt7bZMWBtcSrBK5Vuea26sBVgX08=; b=cDQZN8FnuYh2INjx5pHqNytfj7WAYCAqIL4yk3ofH6vgVwlVjhfRE8JdgdGm/cUQfzPkXQD0sBtPcLMGo3MV7h35+I/kuaduTZDSB7lr2rXeTEPLAXMccz+n4g9uSHjnicwYWnWhyOc9TfL0Y5yr/t6QXawE5qntDmhIwpwKKz0= 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 AM0PR08MB4515.eurprd08.prod.outlook.com (2603:10a6:208:148::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Fri, 3 Dec 2021 13:08:08 +0000 Received: from AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a]) by AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a%7]) with mapi id 15.20.4669.024; Fri, 3 Dec 2021 13:08:11 +0000 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, hreitz@redhat.com, kwolf@redhat.com, vsementsov@virtuozzo.com, jsnow@redhat.com Subject: [PATCH v4 07/19] iotests.py: filter out successful output of qemu-img create Date: Fri, 3 Dec 2021 14:07:25 +0100 Message-Id: <20211203130737.2924594-8-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211203130737.2924594-1-vsementsov@virtuozzo.com> References: <20211203130737.2924594-1-vsementsov@virtuozzo.com> X-ClientProxiedBy: AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) To AM9PR08MB6737.eurprd08.prod.outlook.com (2603:10a6:20b:304::18) MIME-Version: 1.0 Received: from kvm.ch-qa.sw.ru (130.117.225.5) by AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16 via Frontend Transport; Fri, 3 Dec 2021 13:08:10 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ca210a34-c7c2-4d5e-002b-08d9b65df4c8 X-MS-TrafficTypeDiagnostic: AM0PR08MB4515: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:42; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0vPaq44z6I9UF1O8U1lgG+G/xt15bDKE1+xBdbN/PFzd7LzGGKu4nLLfyUiKAH54BTRMyMZpJwFgBSUePN8wm8I+AuWjlIeA7/flUd0imvHUCnFzmKB0ywfyMUFD8Y2sgFNRN6XS1e1WP60oA4XycejGHnPeIdQEm7RLibc8/U19Z855Uowv9aDwvfh44KrMd4FJxCb2OmpUZ1wYRRjCx6l2frHm+s8KjD6abBx0T4/2I3ocV1AbuirWjT06U0ZjIgLtkhRjr3kQjNekOmiG0JyrnGLQs2xoWyvjVWNUbBDpnM6hLLk/ZUTSgxR+7jnMz+DORq6pIQxGi5otb8KrRrBD8xlCr2auj2ooh6b14LH4aROLnkOs8fhfE1vGL7Nv+jZE+faepLG7XAXlpNhAVEyoGpYyL7Lr6gX2UWzgGS1zAddphQtEF/okkSyWXbKTmTXjSl0Hks6y29WS21yg0DuEOyiLmmqKFOJ1BIRKfkDCQqC8C7eEnqoMxzfGyNTKknE1w0/xwyxPN7RrrVv7W5TCZeZYKsacZeXg0bZdyNA04io88f5e4BEEaxKR8QyJ6yqAvFqRfTfsf2XpNz2NpCiLg/TV/7tQV4sNOQyXUp3FjWQvlrgoDokbfI0VlM7jT0zh5amuJCjZbyiMINpRGf9/HarDM8boU/JsztEk5oPrIwmAFBRGv6whWIzHwGZN900fJjGCSSl+QyGGdYd29oms6Cd2xG8Q1RU6lRi3OP4= 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)(2906002)(4326008)(186003)(30864003)(6512007)(52116002)(6506007)(1076003)(5660300002)(36756003)(86362001)(38100700002)(26005)(956004)(508600001)(2616005)(8676002)(316002)(6486002)(66476007)(8936002)(66946007)(66556008)(6666004)(83380400001)(38350700002)(6916009)(21314003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: M20PeYnUVcICKrcIdK1t4WDnB5zwJICTCWppeXtVOEwSZLxGdI8zUGDRStL49377HRlw8uX+NzEzlD3SnEPrmvOG1DXJWzTjRR4iagTntfsim9QfeZuQ3czAutmm6sfEXhdalTyBsfd+Vz/+mySQh6GiHPtFkYgHs3ru9pQNsyqxCsaDv6TJMuwe7zwoxh3nyv7TOammW/Lr53SJG4WMtmKz4206ht7Lrhc1cuFIXkEE1nv+KZksWF4JyLI+p4L/bLvvyQaFF1o1+LZmwSOfbrBRHEWVxU9SfDGHmFvk69iRGu/jld0ZGC4+1nV71g1vXTrrILgwmnnmiBW9VwYiMcVQWr9zf5nWqV27b5amiFqbo3wK+XiRmMwLO1IoHNMhUnItLcvDhmyrfUsEwAWlrLrZ8qOkmyRK9JKkcCKeCas/wIKiaa7CJwRLnVaOhyiEdfL+KUdOiFuR7l5/FHRQw1cMy1uBDN4ifOTpDHdJa8/lsUJer9ysXnQmo5w22Zpy5S5R/M7Ibez5nWKu2pMsFuykxLBwR1dbZ1VLTbmrozQqtaMzneUtvFYLvVhLXdyQ4KI5L4qrNjWf1t6SON4QkeBAK0zLaUxGvDd2A9vkgwcENrMr+I7q/mZlnkVNB9auijC/PYXocl5RQWVsVQmHDSObvPh/9vbfT3eY1IlMrmcIJeZqtuTYV0NZJ1eEX0DhtBpfxAd1v4qs/vUjkkG6YY3ApHg9FpA1spsrtGGHQXTSNT9esl+1R9+/iNMv49YfV7FaWjcrZN1RUUCrVqt4A7YRV1HQwjCuil3VVyotv97FWhstDGq2frJPxlL5QnqrJsKC5SQlpoazNioTYyTphbwvGV0qFLQxbnHuO03akwh76qqYdjjrjy5ESnSqbcYcnW1hhhZcUgbXOrzszLKF7qUNkKYiDjlZL1YmszEcTBTaPP6yCHGMDEkE+BsoVYTk51DuU/nC3uznCgmIZ62phVGWeDCK5OPD5K02dmqs45YolWtRpocGY0k1z+ASirQi+wQlNAI2J4qCTRT9zWKF9Q6xKS7srMV+6FRmB0vaCCYGTK7x7ggpwRiuddgtx4htGVWAkPX0Ro9trCmXp2aDC3HDAc7hb7mptvF5F2sFOeYQHhJ7zspVodefEV7/42L3ysQ7BAknMJNFxgi/U0qEgDFpsSYWznOIXE9l66obotXmcYF7ReIFaIXkqtN1IkqIDnSzSFzT+bKHqy/Xsg/LLS9nRPs2PJjnHcdiDOsxeLbXeN+1Og5sDBMedFKIUACrVdVroPwy5Q3uKOHNz+a1vBO9tS4kyzOENqLeQLiP2LQk1cGUoaGkQaRaDOFPiyWVqJPeNPcKEKVWQ3GsdCEcWDKegqjIYAx6zBslLquePkIRbCLEwv7GsOX2jGuhdS8kwq7PyU9RiFEwhCf2kudZ4w4I9y3kK4SRzDBR/i84xWYS55Y2yOsP+qXFeprLkpqvI/GjAj0QsyQ2MiXql4pqLdW6/CqvyfrR9h+6jE08xzissZ/rx/mxbjIsO+SV4UGDbhbkZSUxXDQmfzJrEtiCLzPlgC0/3XkY3i43m9RYIdhoti7yp7r/aDWi399tY9lJWv+UNe0BTcAnb9eWihYvgjcX9h/Uy23t2LSUzKRSWEwYCHwA9MY8EHRZfBYMbkFy0DXLEAqwSRTsJk6aO0lFQQ== X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ca210a34-c7c2-4d5e-002b-08d9b65df4c8 X-MS-Exchange-CrossTenant-AuthSource: AM9PR08MB6737.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2021 13:08:11.0302 (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: fKGXxG12Dz0e/k3hzKVov/j8u3CpsS89WBHOI8F5SXYRbMYLMLS//5pacfXV1HS2wnGyi+cQMtywE/ZcnX0CfmAoTP+0zFFHFH9JAyGKuhU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4515 Received-SPF: pass client-ip=40.107.4.107; envelope-from=vsementsov@virtuozzo.com; helo=EUR03-DB5-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, MSGID_FROM_MTA_HEADER=0.001, 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" The only "feature" of this "Formatting ..." line is that we have to update it every time we add new option. Let's drop it. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz --- tests/qemu-iotests/149.out | 21 --------------------- tests/qemu-iotests/237.out | 3 --- tests/qemu-iotests/255.out | 4 ---- tests/qemu-iotests/274.out | 29 ----------------------------- tests/qemu-iotests/280.out | 1 - tests/qemu-iotests/296.out | 10 +++------- tests/qemu-iotests/iotests.py | 10 ++++++++-- 7 files changed, 11 insertions(+), 67 deletions(-) diff --git a/tests/qemu-iotests/149.out b/tests/qemu-iotests/149.out index 6877ab6c4a..ab879596ce 100644 --- a/tests/qemu-iotests/149.out +++ b/tests/qemu-iotests/149.out @@ -61,7 +61,6 @@ unlink TEST_DIR/luks-aes-256-xts-plain64-sha1.img # ================= qemu-img aes-256-xts-plain64-sha1 ================= # Create image qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-256,cipher-mode=xts,ivgen-alg=plain64,hash-alg=sha1 TEST_DIR/luks-aes-256-xts-plain64-sha1.img 4194304M -Formatting 'TEST_DIR/luks-aes-256-xts-plain64-sha1.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=aes-256 cipher-mode=xts ivgen-alg=plain64 hash-alg=sha1 iter-time=10 # Open dev sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-sha1.img qiotest-145-aes-256-xts-plain64-sha1 @@ -181,7 +180,6 @@ unlink TEST_DIR/luks-twofish-256-xts-plain64-sha1.img # ================= qemu-img twofish-256-xts-plain64-sha1 ================= # Create image qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=twofish-256,cipher-mode=xts,ivgen-alg=plain64,hash-alg=sha1 TEST_DIR/luks-twofish-256-xts-plain64-sha1.img 4194304M -Formatting 'TEST_DIR/luks-twofish-256-xts-plain64-sha1.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=twofish-256 cipher-mode=xts ivgen-alg=plain64 hash-alg=sha1 iter-time=10 # Open dev sudo cryptsetup -q -v luksOpen TEST_DIR/luks-twofish-256-xts-plain64-sha1.img qiotest-145-twofish-256-xts-plain64-sha1 @@ -301,7 +299,6 @@ unlink TEST_DIR/luks-serpent-256-xts-plain64-sha1.img # ================= qemu-img serpent-256-xts-plain64-sha1 ================= # Create image qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=serpent-256,cipher-mode=xts,ivgen-alg=plain64,hash-alg=sha1 TEST_DIR/luks-serpent-256-xts-plain64-sha1.img 4194304M -Formatting 'TEST_DIR/luks-serpent-256-xts-plain64-sha1.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=serpent-256 cipher-mode=xts ivgen-alg=plain64 hash-alg=sha1 iter-time=10 # Open dev sudo cryptsetup -q -v luksOpen TEST_DIR/luks-serpent-256-xts-plain64-sha1.img qiotest-145-serpent-256-xts-plain64-sha1 @@ -421,7 +418,6 @@ unlink TEST_DIR/luks-cast5-128-cbc-plain64-sha1.img # ================= qemu-img cast5-128-cbc-plain64-sha1 ================= # Create image qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=cast5-128,cipher-mode=cbc,ivgen-alg=plain64,hash-alg=sha1 TEST_DIR/luks-cast5-128-cbc-plain64-sha1.img 4194304M -Formatting 'TEST_DIR/luks-cast5-128-cbc-plain64-sha1.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=cast5-128 cipher-mode=cbc ivgen-alg=plain64 hash-alg=sha1 iter-time=10 # Open dev sudo cryptsetup -q -v luksOpen TEST_DIR/luks-cast5-128-cbc-plain64-sha1.img qiotest-145-cast5-128-cbc-plain64-sha1 @@ -542,7 +538,6 @@ unlink TEST_DIR/luks-aes-256-cbc-plain-sha1.img # ================= qemu-img aes-256-cbc-plain-sha1 ================= # Create image qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-256,cipher-mode=cbc,ivgen-alg=plain,hash-alg=sha1 TEST_DIR/luks-aes-256-cbc-plain-sha1.img 4194304M -Formatting 'TEST_DIR/luks-aes-256-cbc-plain-sha1.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=aes-256 cipher-mode=cbc ivgen-alg=plain hash-alg=sha1 iter-time=10 # Open dev sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-cbc-plain-sha1.img qiotest-145-aes-256-cbc-plain-sha1 @@ -662,7 +657,6 @@ unlink TEST_DIR/luks-aes-256-cbc-plain64-sha1.img # ================= qemu-img aes-256-cbc-plain64-sha1 ================= # Create image qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-256,cipher-mode=cbc,ivgen-alg=plain64,hash-alg=sha1 TEST_DIR/luks-aes-256-cbc-plain64-sha1.img 4194304M -Formatting 'TEST_DIR/luks-aes-256-cbc-plain64-sha1.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=aes-256 cipher-mode=cbc ivgen-alg=plain64 hash-alg=sha1 iter-time=10 # Open dev sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-cbc-plain64-sha1.img qiotest-145-aes-256-cbc-plain64-sha1 @@ -782,7 +776,6 @@ unlink TEST_DIR/luks-aes-256-cbc-essiv-sha256-sha1.img # ================= qemu-img aes-256-cbc-essiv-sha256-sha1 ================= # Create image qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-256,cipher-mode=cbc,ivgen-alg=essiv,hash-alg=sha1,ivgen-hash-alg=sha256 TEST_DIR/luks-aes-256-cbc-essiv-sha256-sha1.img 4194304M -Formatting 'TEST_DIR/luks-aes-256-cbc-essiv-sha256-sha1.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=aes-256 cipher-mode=cbc ivgen-alg=essiv ivgen-hash-alg=sha256 hash-alg=sha1 iter-time=10 # Open dev sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-cbc-essiv-sha256-sha1.img qiotest-145-aes-256-cbc-essiv-sha256-sha1 @@ -902,7 +895,6 @@ unlink TEST_DIR/luks-aes-256-xts-essiv-sha256-sha1.img # ================= qemu-img aes-256-xts-essiv-sha256-sha1 ================= # Create image qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-256,cipher-mode=xts,ivgen-alg=essiv,hash-alg=sha1,ivgen-hash-alg=sha256 TEST_DIR/luks-aes-256-xts-essiv-sha256-sha1.img 4194304M -Formatting 'TEST_DIR/luks-aes-256-xts-essiv-sha256-sha1.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=aes-256 cipher-mode=xts ivgen-alg=essiv ivgen-hash-alg=sha256 hash-alg=sha1 iter-time=10 # Open dev sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-essiv-sha256-sha1.img qiotest-145-aes-256-xts-essiv-sha256-sha1 @@ -1022,7 +1014,6 @@ unlink TEST_DIR/luks-aes-128-xts-plain64-sha256-sha1.img # ================= qemu-img aes-128-xts-plain64-sha256-sha1 ================= # Create image qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-128,cipher-mode=xts,ivgen-alg=plain64,hash-alg=sha1 TEST_DIR/luks-aes-128-xts-plain64-sha256-sha1.img 4194304M -Formatting 'TEST_DIR/luks-aes-128-xts-plain64-sha256-sha1.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=aes-128 cipher-mode=xts ivgen-alg=plain64 hash-alg=sha1 iter-time=10 # Open dev sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-128-xts-plain64-sha256-sha1.img qiotest-145-aes-128-xts-plain64-sha256-sha1 @@ -1142,7 +1133,6 @@ unlink TEST_DIR/luks-aes-192-xts-plain64-sha256-sha1.img # ================= qemu-img aes-192-xts-plain64-sha256-sha1 ================= # Create image qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-192,cipher-mode=xts,ivgen-alg=plain64,hash-alg=sha1 TEST_DIR/luks-aes-192-xts-plain64-sha256-sha1.img 4194304M -Formatting 'TEST_DIR/luks-aes-192-xts-plain64-sha256-sha1.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=aes-192 cipher-mode=xts ivgen-alg=plain64 hash-alg=sha1 iter-time=10 # Open dev sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-192-xts-plain64-sha256-sha1.img qiotest-145-aes-192-xts-plain64-sha256-sha1 @@ -1262,7 +1252,6 @@ unlink TEST_DIR/luks-twofish-128-xts-plain64-sha1.img # ================= qemu-img twofish-128-xts-plain64-sha1 ================= # Create image qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=twofish-128,cipher-mode=xts,ivgen-alg=plain64,hash-alg=sha1 TEST_DIR/luks-twofish-128-xts-plain64-sha1.img 4194304M -Formatting 'TEST_DIR/luks-twofish-128-xts-plain64-sha1.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=twofish-128 cipher-mode=xts ivgen-alg=plain64 hash-alg=sha1 iter-time=10 # Open dev sudo cryptsetup -q -v luksOpen TEST_DIR/luks-twofish-128-xts-plain64-sha1.img qiotest-145-twofish-128-xts-plain64-sha1 @@ -1383,7 +1372,6 @@ unlink TEST_DIR/luks-serpent-128-xts-plain64-sha1.img # ================= qemu-img serpent-128-xts-plain64-sha1 ================= # Create image qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=serpent-128,cipher-mode=xts,ivgen-alg=plain64,hash-alg=sha1 TEST_DIR/luks-serpent-128-xts-plain64-sha1.img 4194304M -Formatting 'TEST_DIR/luks-serpent-128-xts-plain64-sha1.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=serpent-128 cipher-mode=xts ivgen-alg=plain64 hash-alg=sha1 iter-time=10 # Open dev sudo cryptsetup -q -v luksOpen TEST_DIR/luks-serpent-128-xts-plain64-sha1.img qiotest-145-serpent-128-xts-plain64-sha1 @@ -1503,7 +1491,6 @@ unlink TEST_DIR/luks-serpent-192-xts-plain64-sha1.img # ================= qemu-img serpent-192-xts-plain64-sha1 ================= # Create image qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=serpent-192,cipher-mode=xts,ivgen-alg=plain64,hash-alg=sha1 TEST_DIR/luks-serpent-192-xts-plain64-sha1.img 4194304M -Formatting 'TEST_DIR/luks-serpent-192-xts-plain64-sha1.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=serpent-192 cipher-mode=xts ivgen-alg=plain64 hash-alg=sha1 iter-time=10 # Open dev sudo cryptsetup -q -v luksOpen TEST_DIR/luks-serpent-192-xts-plain64-sha1.img qiotest-145-serpent-192-xts-plain64-sha1 @@ -1625,7 +1612,6 @@ unlink TEST_DIR/luks-aes-256-xts-plain64-sha224.img # ================= qemu-img aes-256-xts-plain64-sha224 ================= # Create image qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-256,cipher-mode=xts,ivgen-alg=plain64,hash-alg=sha224 TEST_DIR/luks-aes-256-xts-plain64-sha224.img 4194304M -Formatting 'TEST_DIR/luks-aes-256-xts-plain64-sha224.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=aes-256 cipher-mode=xts ivgen-alg=plain64 hash-alg=sha224 iter-time=10 # Open dev sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-sha224.img qiotest-145-aes-256-xts-plain64-sha224 @@ -1745,7 +1731,6 @@ unlink TEST_DIR/luks-aes-256-xts-plain64-sha256.img # ================= qemu-img aes-256-xts-plain64-sha256 ================= # Create image qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-256,cipher-mode=xts,ivgen-alg=plain64,hash-alg=sha256 TEST_DIR/luks-aes-256-xts-plain64-sha256.img 4194304M -Formatting 'TEST_DIR/luks-aes-256-xts-plain64-sha256.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=aes-256 cipher-mode=xts ivgen-alg=plain64 hash-alg=sha256 iter-time=10 # Open dev sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-sha256.img qiotest-145-aes-256-xts-plain64-sha256 @@ -1865,7 +1850,6 @@ unlink TEST_DIR/luks-aes-256-xts-plain64-sha384.img # ================= qemu-img aes-256-xts-plain64-sha384 ================= # Create image qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-256,cipher-mode=xts,ivgen-alg=plain64,hash-alg=sha384 TEST_DIR/luks-aes-256-xts-plain64-sha384.img 4194304M -Formatting 'TEST_DIR/luks-aes-256-xts-plain64-sha384.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=aes-256 cipher-mode=xts ivgen-alg=plain64 hash-alg=sha384 iter-time=10 # Open dev sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-sha384.img qiotest-145-aes-256-xts-plain64-sha384 @@ -1985,7 +1969,6 @@ unlink TEST_DIR/luks-aes-256-xts-plain64-sha512.img # ================= qemu-img aes-256-xts-plain64-sha512 ================= # Create image qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-256,cipher-mode=xts,ivgen-alg=plain64,hash-alg=sha512 TEST_DIR/luks-aes-256-xts-plain64-sha512.img 4194304M -Formatting 'TEST_DIR/luks-aes-256-xts-plain64-sha512.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=aes-256 cipher-mode=xts ivgen-alg=plain64 hash-alg=sha512 iter-time=10 # Open dev sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-sha512.img qiotest-145-aes-256-xts-plain64-sha512 @@ -2105,7 +2088,6 @@ unlink TEST_DIR/luks-aes-256-xts-plain64-ripemd160.img # ================= qemu-img aes-256-xts-plain64-ripemd160 ================= # Create image qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-256,cipher-mode=xts,ivgen-alg=plain64,hash-alg=ripemd160 TEST_DIR/luks-aes-256-xts-plain64-ripemd160.img 4194304M -Formatting 'TEST_DIR/luks-aes-256-xts-plain64-ripemd160.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=aes-256 cipher-mode=xts ivgen-alg=plain64 hash-alg=ripemd160 iter-time=10 # Open dev sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-ripemd160.img qiotest-145-aes-256-xts-plain64-ripemd160 @@ -2299,7 +2281,6 @@ unlink TEST_DIR/luks-aes-256-xts-plain-sha1-pwallslots.img # ================= qemu-img aes-256-xts-plain-sha1-pwallslots ================= # Create image qemu-img create -f luks --object secret,id=sec0,data=c2xvdDE=,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-256,cipher-mode=xts,ivgen-alg=plain,hash-alg=sha1 TEST_DIR/luks-aes-256-xts-plain-sha1-pwallslots.img 4194304M -Formatting 'TEST_DIR/luks-aes-256-xts-plain-sha1-pwallslots.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=aes-256 cipher-mode=xts ivgen-alg=plain hash-alg=sha1 iter-time=10 # Open dev sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain-sha1-pwallslots.img qiotest-145-aes-256-xts-plain-sha1-pwallslots @@ -2419,7 +2400,6 @@ unlink TEST_DIR/luks-aes-256-cbc-essiv-auto-sha1.img # ================= qemu-img aes-256-cbc-essiv-auto-sha1 ================= # Create image qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-256,cipher-mode=cbc,ivgen-alg=essiv,hash-alg=sha1 TEST_DIR/luks-aes-256-cbc-essiv-auto-sha1.img 4194304M -Formatting 'TEST_DIR/luks-aes-256-cbc-essiv-auto-sha1.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=aes-256 cipher-mode=cbc ivgen-alg=essiv hash-alg=sha1 iter-time=10 # Open dev sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-cbc-essiv-auto-sha1.img qiotest-145-aes-256-cbc-essiv-auto-sha1 @@ -2539,7 +2519,6 @@ unlink TEST_DIR/luks-aes-256-cbc-plain64-sha256-sha1.img # ================= qemu-img aes-256-cbc-plain64-sha256-sha1 ================= # Create image qemu-img create -f luks --object secret,id=sec0,data=MTIzNDU2,format=base64 -o key-secret=sec0,iter-time=10,cipher-alg=aes-256,cipher-mode=cbc,ivgen-alg=plain64,hash-alg=sha1,ivgen-hash-alg=sha256 TEST_DIR/luks-aes-256-cbc-plain64-sha256-sha1.img 4194304M -Formatting 'TEST_DIR/luks-aes-256-cbc-plain64-sha256-sha1.img', fmt=luks size=4398046511104 key-secret=sec0 cipher-alg=aes-256 cipher-mode=cbc ivgen-alg=plain64 ivgen-hash-alg=sha256 hash-alg=sha1 iter-time=10 # Open dev sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-cbc-plain64-sha256-sha1.img qiotest-145-aes-256-cbc-plain64-sha256-sha1 diff --git a/tests/qemu-iotests/237.out b/tests/qemu-iotests/237.out index 2f09ff5512..aeb9724492 100644 --- a/tests/qemu-iotests/237.out +++ b/tests/qemu-iotests/237.out @@ -129,11 +129,8 @@ Job failed: Cannot find device='this doesn't exist' nor node-name='this doesn't === Other subformats === -Formatting 'TEST_DIR/PID-t.vmdk.1', fmt=vmdk size=0 compat6=off hwversion=undefined -Formatting 'TEST_DIR/PID-t.vmdk.2', fmt=vmdk size=0 compat6=off hwversion=undefined -Formatting 'TEST_DIR/PID-t.vmdk.3', fmt=vmdk size=0 compat6=off hwversion=undefined == Missing extent == diff --git a/tests/qemu-iotests/255.out b/tests/qemu-iotests/255.out index 33b7f22de3..11a05a5213 100644 --- a/tests/qemu-iotests/255.out +++ b/tests/qemu-iotests/255.out @@ -3,9 +3,7 @@ Finishing a commit job with background reads === Create backing chain and start VM === -Formatting 'TEST_DIR/PID-t.qcow2.mid', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 lazy_refcounts=off refcount_bits=16 -Formatting 'TEST_DIR/PID-t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 lazy_refcounts=off refcount_bits=16 === Start background read requests === @@ -23,9 +21,7 @@ Closing the VM while a job is being cancelled === Create images and start VM === -Formatting 'TEST_DIR/PID-src.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 lazy_refcounts=off refcount_bits=16 -Formatting 'TEST_DIR/PID-dst.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 lazy_refcounts=off refcount_bits=16 wrote 1048576/1048576 bytes at offset 0 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) diff --git a/tests/qemu-iotests/274.out b/tests/qemu-iotests/274.out index 16a95a4850..1d2928e14d 100644 --- a/tests/qemu-iotests/274.out +++ b/tests/qemu-iotests/274.out @@ -1,9 +1,6 @@ == Commit tests == -Formatting 'TEST_DIR/PID-base', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=2097152 lazy_refcounts=off refcount_bits=16 -Formatting 'TEST_DIR/PID-mid', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1048576 backing_file=TEST_DIR/PID-base backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 -Formatting 'TEST_DIR/PID-top', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=2097152 backing_file=TEST_DIR/PID-mid backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 wrote 2097152/2097152 bytes at offset 0 2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) @@ -66,11 +63,8 @@ read 1048576/1048576 bytes at offset 1048576 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) === Testing HMP commit (top -> mid) === -Formatting 'TEST_DIR/PID-base', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=2097152 lazy_refcounts=off refcount_bits=16 -Formatting 'TEST_DIR/PID-mid', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1048576 backing_file=TEST_DIR/PID-base backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 -Formatting 'TEST_DIR/PID-top', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=2097152 backing_file=TEST_DIR/PID-mid backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 wrote 2097152/2097152 bytes at offset 0 2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) @@ -98,11 +92,8 @@ read 1048576/1048576 bytes at offset 1048576 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) === Testing QMP active commit (top -> mid) === -Formatting 'TEST_DIR/PID-base', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=2097152 lazy_refcounts=off refcount_bits=16 -Formatting 'TEST_DIR/PID-mid', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1048576 backing_file=TEST_DIR/PID-base backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 -Formatting 'TEST_DIR/PID-top', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=2097152 backing_file=TEST_DIR/PID-mid backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 wrote 2097152/2097152 bytes at offset 0 2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) @@ -136,11 +127,8 @@ read 1048576/1048576 bytes at offset 1048576 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) === Testing qemu-img commit (top -> base) === -Formatting 'TEST_DIR/PID-base', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=2097152 lazy_refcounts=off refcount_bits=16 -Formatting 'TEST_DIR/PID-mid', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1048576 backing_file=TEST_DIR/PID-base backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 -Formatting 'TEST_DIR/PID-top', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=2097152 backing_file=TEST_DIR/PID-mid backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 wrote 2097152/2097152 bytes at offset 0 2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) @@ -166,11 +154,8 @@ read 1048576/1048576 bytes at offset 1048576 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) === Testing QMP active commit (top -> base) === -Formatting 'TEST_DIR/PID-base', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=2097152 lazy_refcounts=off refcount_bits=16 -Formatting 'TEST_DIR/PID-mid', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1048576 backing_file=TEST_DIR/PID-base backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 -Formatting 'TEST_DIR/PID-top', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=2097152 backing_file=TEST_DIR/PID-mid backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 wrote 2097152/2097152 bytes at offset 0 2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) @@ -205,9 +190,7 @@ read 1048576/1048576 bytes at offset 1048576 == Resize tests == === preallocation=off === -Formatting 'TEST_DIR/PID-base', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=6442450944 lazy_refcounts=off refcount_bits=16 -Formatting 'TEST_DIR/PID-top', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1073741824 backing_file=TEST_DIR/PID-base backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 wrote 65536/65536 bytes at offset 5368709120 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) @@ -224,9 +207,7 @@ read 65536/65536 bytes at offset 5368709120 { "start": 1073741824, "length": 7516192768, "depth": 0, "present": true, "zero": true, "data": false}] === preallocation=metadata === -Formatting 'TEST_DIR/PID-base', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=34359738368 lazy_refcounts=off refcount_bits=16 -Formatting 'TEST_DIR/PID-top', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=32212254720 backing_file=TEST_DIR/PID-base backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 wrote 65536/65536 bytes at offset 33285996544 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) @@ -248,9 +229,7 @@ read 65536/65536 bytes at offset 33285996544 { "start": 34896609280, "length": 536870912, "depth": 0, "present": true, "zero": true, "data": false, "offset": 2685075456}] === preallocation=falloc === -Formatting 'TEST_DIR/PID-base', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=10485760 lazy_refcounts=off refcount_bits=16 -Formatting 'TEST_DIR/PID-top', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=5242880 backing_file=TEST_DIR/PID-base backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 wrote 65536/65536 bytes at offset 9437184 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) @@ -267,9 +246,7 @@ read 65536/65536 bytes at offset 9437184 { "start": 5242880, "length": 10485760, "depth": 0, "present": true, "zero": false, "data": true, "offset": 327680}] === preallocation=full === -Formatting 'TEST_DIR/PID-base', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=16777216 lazy_refcounts=off refcount_bits=16 -Formatting 'TEST_DIR/PID-top', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=8388608 backing_file=TEST_DIR/PID-base backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 wrote 65536/65536 bytes at offset 11534336 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) @@ -286,9 +263,7 @@ read 65536/65536 bytes at offset 11534336 { "start": 8388608, "length": 4194304, "depth": 0, "present": true, "zero": false, "data": true, "offset": 327680}] === preallocation=off === -Formatting 'TEST_DIR/PID-base', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=393216 lazy_refcounts=off refcount_bits=16 -Formatting 'TEST_DIR/PID-top', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=259072 backing_file=TEST_DIR/PID-base backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 wrote 65536/65536 bytes at offset 259072 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) @@ -306,9 +281,7 @@ read 65536/65536 bytes at offset 259072 { "start": 262144, "length": 262144, "depth": 0, "present": true, "zero": true, "data": false}] === preallocation=off === -Formatting 'TEST_DIR/PID-base', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=409600 lazy_refcounts=off refcount_bits=16 -Formatting 'TEST_DIR/PID-top', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=262144 backing_file=TEST_DIR/PID-base backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 wrote 65536/65536 bytes at offset 344064 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) @@ -325,9 +298,7 @@ read 65536/65536 bytes at offset 344064 { "start": 262144, "length": 262144, "depth": 0, "present": true, "zero": true, "data": false}] === preallocation=off === -Formatting 'TEST_DIR/PID-base', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=524288 lazy_refcounts=off refcount_bits=16 -Formatting 'TEST_DIR/PID-top', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=262144 backing_file=TEST_DIR/PID-base backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 wrote 65536/65536 bytes at offset 446464 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) diff --git a/tests/qemu-iotests/280.out b/tests/qemu-iotests/280.out index 09a0f1a7cb..e39164c579 100644 --- a/tests/qemu-iotests/280.out +++ b/tests/qemu-iotests/280.out @@ -1,4 +1,3 @@ -Formatting 'TEST_DIR/PID-base', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=67108864 lazy_refcounts=off refcount_bits=16 === Launch VM === Enabling migration QMP events on VM... diff --git a/tests/qemu-iotests/296.out b/tests/qemu-iotests/296.out index 6c69735604..42205cc981 100644 --- a/tests/qemu-iotests/296.out +++ b/tests/qemu-iotests/296.out @@ -1,4 +1,3 @@ -Formatting 'TEST_DIR/test.img', fmt=luks size=1048576 key-secret=keysec0 iter-time=10 {"execute": "job-dismiss", "arguments": {"id": "job0"}} {"return": {}} @@ -13,8 +12,7 @@ Job failed: Failed to get shared "consistent read" lock qemu-img: Failed to get shared "consistent read" lock Is another process using the image [TEST_DIR/test.img]? -.Formatting 'TEST_DIR/test.img', fmt=luks size=1048576 key-secret=keysec0 iter-time=10 - +. Job failed: Block node is read-only {"execute": "job-dismiss", "arguments": {"id": "job0"}} {"return": {}} @@ -26,12 +24,10 @@ Job failed: Failed to get shared "consistent read" lock {"return": {}} {"execute": "job-dismiss", "arguments": {"id": "job0"}} {"return": {}} -.Formatting 'TEST_DIR/test.img', fmt=luks size=1048576 key-secret=keysec0 iter-time=10 - +. {"return": {}} {"error": {"class": "GenericError", "desc": "Failed to get \"write\" lock"}} -.Formatting 'TEST_DIR/test.img', fmt=luks size=1048576 key-secret=keysec0 iter-time=10 - +. {"return": {}} {"return": {}} . diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 055b162531..f19f0590f5 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -140,7 +140,9 @@ def unarchive_sample_image(sample, fname): def qemu_tool_pipe_and_status(tool: str, args: Sequence[str], - connect_stderr: bool = True) -> Tuple[str, int]: + connect_stderr: bool = True, + drop_successful_output: bool = False) \ + -> Tuple[str, int]: """ Run a tool and return both its output and its exit code """ @@ -152,6 +154,8 @@ def qemu_tool_pipe_and_status(tool: str, args: Sequence[str], cmd = ' '.join(args) sys.stderr.write(f'{tool} received signal \ {-subp.returncode}: {cmd}\n') + if drop_successful_output and subp.returncode == 0: + output = '' return (output, subp.returncode) def qemu_img_create_prepare_args(args: List[str]) -> List[str]: @@ -196,8 +200,10 @@ def qemu_img_pipe_and_status(*args: str) -> Tuple[str, int]: """ Run qemu-img and return both its output and its exit code """ + is_create = bool(args and args[0] == 'create') full_args = qemu_img_args + qemu_img_create_prepare_args(list(args)) - return qemu_tool_pipe_and_status('qemu-img', full_args) + return qemu_tool_pipe_and_status('qemu-img', full_args, + drop_successful_output=is_create) def qemu_img(*args: str) -> int: '''Run qemu-img and return the exit code''' From patchwork Fri Dec 3 13:07:26 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: 12655127 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 5E789C433EF for ; Fri, 3 Dec 2021 13:16:18 +0000 (UTC) Received: from localhost ([::1]:55286 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mt8QD-0002RZ-7R for qemu-devel@archiver.kernel.org; Fri, 03 Dec 2021 08:16:17 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57724) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mt8IX-0001up-4B; Fri, 03 Dec 2021 08:08:21 -0500 Received: from mail-eopbgr40135.outbound.protection.outlook.com ([40.107.4.135]:40808 helo=EUR03-DB5-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 1mt8IV-00071Q-2R; Fri, 03 Dec 2021 08:08:20 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eKJxXAsulvEqfUEzkvrUJpta+BSsivI6dsi6ysqK8zHlS8mwNFDNV7/1HMnVHiIMhcpA0eWl2kQ9Wdf9OLdDP5k94QGFt3mt/Vf+ARU8KF7XZL3N2T5Rdr+izTaKEEdr22LdNhlZW/WPlTxS3yciBNSjzZnQPotJG6sLFt5QJzT3cDSAt9ACivUcW9Wcqv0Ah3twvwRCQ8VG6T5cMhn9ByNM5XF6nweygXwki/fjSQnC9aWM1T7MwTLY7Tsix3+tnxW7WmoSm+cPC9oQy0RwU1riOJqBX47iyEy93Rha7bmivoXQZzne315oqJBFgXv06N7P/YHFyy73/R9YoTrgpA== 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=OZkd26KhLQd1bfutxli+O+3gDTMF6MIWX5aBAH9rcLg=; b=LWGsx6HJ9LuwJCVfDhM78E6O3K+byLAdqAwKcI4X8SCVgXi+PO2XDkQME3FblI+OZa/D/eX9Bwp2aviZn+alrLGUumXtEVvfd1o8T0Q8HNxH4ZONqmc4wvdbp30HEK1XCHD2kPVpombOP4yyRzpYoNz5HPtuPkOon4gYx4oZjEOZXcmpi1SpNWm+RrhNwltq/2Vugl7lhlMvV9huRde+xB3kMwi7npmMUpk1XAIloWQalCp3z5U6RWDYoMR9sl1Sg9SRbHq39F9B6jGvzRYx6UXtbOvAUQ/IUzPWNIgoMEapktl9HhF9CZ2O3BeERsool7tpzIkV/8SW8zk2CxW80A== 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=OZkd26KhLQd1bfutxli+O+3gDTMF6MIWX5aBAH9rcLg=; b=rf9alGBwacN4/XHsmWQBityKkNqeZutVc+4RIhkXzcoCArpmRMHmspwVJ5k7qlLiqz/apAfXFXQXAqSsjCLtWGqtz1vyscR+ojN8+5MeuCxwCOuPVy9OhOsGEFKHMGN72cSG5Mv+EK3xUBtT5gQt53wUn20K8NqsAIJP5E9jT+o= 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 AM0PR08MB4515.eurprd08.prod.outlook.com (2603:10a6:208:148::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Fri, 3 Dec 2021 13:08:09 +0000 Received: from AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a]) by AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a%7]) with mapi id 15.20.4669.024; Fri, 3 Dec 2021 13:08:12 +0000 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, hreitz@redhat.com, kwolf@redhat.com, vsementsov@virtuozzo.com, jsnow@redhat.com Subject: [PATCH v4 08/19] iotests.py: filter compression type out Date: Fri, 3 Dec 2021 14:07:26 +0100 Message-Id: <20211203130737.2924594-9-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211203130737.2924594-1-vsementsov@virtuozzo.com> References: <20211203130737.2924594-1-vsementsov@virtuozzo.com> X-ClientProxiedBy: AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) To AM9PR08MB6737.eurprd08.prod.outlook.com (2603:10a6:20b:304::18) MIME-Version: 1.0 Received: from kvm.ch-qa.sw.ru (130.117.225.5) by AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16 via Frontend Transport; Fri, 3 Dec 2021 13:08:11 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 38338dc8-bdc0-47c2-4a76-08d9b65df56d X-MS-TrafficTypeDiagnostic: AM0PR08MB4515: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4941; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yZJU7z2q9nmE0a0tFqXz+pN29mtJYrK/ahxlWKVByI+K9qMBu5RC8s/dJeEu4E+qymQEMuiVBQ4/7wcaWtO9usgPor0g49O48AoJDX+IavjrEj/41ITWbzz/dhoI7Z13xb/Q6TWrrFUruj6ObEC8z6rC2G5FYyifv95cdeAv08pg6wngTCmFld27cnN/HdS0hCqurA5zElpGzbUoJGtsM6gBqHx9xb7RtKquLdJwSzoxWocexoI6g8wCb8mlYUeiqjna4kq2b5V8dIrjWkb9GJWZLT5gjwBRapUGDOVI8V06T4lIbD7VIgERymC7cDb1fGIYHodIAx0aiqaGcXrZr9a1v4UyTpGaxIQddaO0PFguVBDx8i755NB5bBXcdB+0yeimTr+gRNlDkpoMOyq2CoQh1+JLiedVIuMiDOZmD3rsb+fQqo4HZ9tnCFn3BjUWNoYsFbko1yabWYnyVRs/enZN+GQbAW3da5e8Vz9o81uErNvjnPHDblSVHKNUiGtYhJjwClaAN+Xwe2o/ba0GCJrNDRxMBeVwbNRL00t6pfy+4eyiTjj4VMM33VScgjHsmqg4wrhdp8yic27dSn873D/fhVncQEWtDr8Wx+AsKhfCK2z6j3HhQpYTOjuM9Csqp1quX0FEuOhLHEfeapSDpwZHKsNdjWburFycDDPrUZyq4ZUErzXHiyQ3e9R2nRINMlLgF4kCxuCQrOBVC0f7gg== 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)(2906002)(4326008)(186003)(6512007)(52116002)(6506007)(1076003)(5660300002)(36756003)(86362001)(38100700002)(26005)(956004)(508600001)(2616005)(8676002)(316002)(6486002)(66476007)(8936002)(66946007)(66556008)(6666004)(83380400001)(38350700002)(6916009); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uirZ1jYOZRj4IqGEWeya1krlXnW7erGjbxIHqiONhcBOSZNcXGU8emt6InLwI53JIU0Z10jgKdyyPScg5LohFxtQaYLjTqIwuKTXeNgX0S39sOAhGKuapbV92WqXgjWmc+5R7duWs/r4eRRI94djPrY5WGqAFpDWsTdZXyFe+IhrI0vxFcQK/IY5pLvYvFAkd3A/VyGqHQIXNNJgxGKVtktAv7I1DORX9m4kZX1RrCDi4j2zj3uqY/cOld4qbNa3xeLl0P6KVdCnblJagCiaAGu7a7v1bs6IocKSHEHUh7Itw8h973rdInDRl8COZZoIrZZG86npkJJksSk8Z+26pZJLl27BEoZ/T0/Z7wtEr3QmUts9kYYv+nQM1WZgs+FqVwQEoNAC3Om7n62KmnlxMMiz+DYxwOT55TzgyydeUeGXnmeplDoaXME4hr2niCh+c1OrzzGTwOvu8hz+Y5N2iX/UZR7YGlxeFoykHdXY2gGQCSS6lBQu5ArQrJqG3sM6yEnVtss2MT2XUIsuEq/2aKuXxlgoMV5glmrQhxSEEucbuWORKpIKP/LwOc1WZfHDfNvsHwN15HmT60B5ifbR4H3ogbVRpjBZIZZNHkPrynxScLRRK6f4Xh0ep8/wZ7rpY6Npeahu+KevQHifRMsE3/RYkurvkluXB6TMN9RIxvJyFuMV6dm/q7dMeNn+91sKiTK0xcya8quJEViQ2OXdABcqB7CGZ2j+EMMnHvsQPqu5Rn0NvahCJ7Rb9N2V8Evu7bN5kdpmXtEBYhCvm80lQqkKjCJ8CXzZdIgUyvReS2NpW/B6YUlNIHFqj7aC4N+REqrgBVqQhmn9O/lHT8nsQd+ZJEcwLXS28DGNCphX8WqCif84BQhVjrDmKr/AEqs9phgGKLnwbk0IrjJQPqZR/u/ITdQgUVjXOfwMoaeaJ89kzWTKXtYH3YuWLNtuRT24wr9GfNoXeCb46HPaEssG5KBjKRwDKtudgCC5dG9vGiZxEAM43hehzRZ9cR4QXoZNfJQu249egWFRy8m4DCMu0XfughGqOv4diSUfaj6DC/PDNGpYlgoJ/BWivXZeL+cGXxV83a3savCLUjkTHUXT4ARgM59+Bs6pxIn+SL5JGdrvA9fikOpL8dU1L05lGgl8TpR94UdnDozx5fHZp3pdQ0NhadwAeGLv4+IKsKUtmS5vLZirMC8C058ZZgDpQgG9XbiOpxc0D7G6T35sq9bJNnSAReLToSnqcwC7CDb+WCo9W9DapGpoN8pZqBIkKlhGMCkmKez3SUZp3dsqGSlAYWK4VwaxmzkuUewtl33DP8qUPqNfbUv2QEJUsIIVP1uWGwh0MG5ct2ED0WaJPbfqvaneC/3vpDbt5tW2I/CEQUhUVMAFfB7B9A3KTGBb0Brtk5cJu29CEYJJ7jMIEGUigRfYfONQayJlPQQlzITN+qWUpsm7FM55NZSrWfByDd9uZkUHCfO54qAAU9DgJZ4rA7z+11Cpu/CbbpGuTFhbcZ/QfFbJZ3jNsi2wQhdTq7UlYVkEd855TMmnqkmi0t0Z57za+Rl+rLar36yu59pnh7vl10RzFaqqdNocHoBbYURNxEfTnv/B9QBLeLEHWzXEkpMIC4omdKkE24nqrLzvSGN5iwrL1eHLyvRSE+dO5WkTZUWMYsMUvNbZJ29W+HTqrA== X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 38338dc8-bdc0-47c2-4a76-08d9b65df56d X-MS-Exchange-CrossTenant-AuthSource: AM9PR08MB6737.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2021 13:08:11.9223 (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: Fiu4mcL6zro37nMALYXMaKv5ndPbjCIMyM/gkMtP9b94IY3zYUNCx2EYpUhq5f0Pmd6g3Nct38YOkzofpXgYoHDCxL+OTp5KSUpzlT++7rc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4515 Received-SPF: pass client-ip=40.107.4.135; envelope-from=vsementsov@virtuozzo.com; helo=EUR03-DB5-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, MSGID_FROM_MTA_HEADER=0.001, 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 want iotests pass with both the default zlib compression and with IMGOPTS='compression_type=zstd'. Actually the only test that is interested in real compression type in test output is 287 (test for qcow2 compression type) and it's in bash. So for now we can safely filter out compression type in all qcow2 tests. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz --- tests/qemu-iotests/206.out | 10 +++++----- tests/qemu-iotests/242.out | 10 +++++----- tests/qemu-iotests/274.out | 10 +++++----- tests/qemu-iotests/iotests.py | 2 ++ 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/tests/qemu-iotests/206.out b/tests/qemu-iotests/206.out index 80cd274223..7e95694777 100644 --- a/tests/qemu-iotests/206.out +++ b/tests/qemu-iotests/206.out @@ -18,7 +18,7 @@ virtual size: 128 MiB (134217728 bytes) cluster_size: 65536 Format specific information: compat: 1.1 - compression type: zlib + compression type: COMPRESSION_TYPE lazy refcounts: false refcount bits: 16 corrupt: false @@ -42,7 +42,7 @@ virtual size: 64 MiB (67108864 bytes) cluster_size: 65536 Format specific information: compat: 1.1 - compression type: zlib + compression type: COMPRESSION_TYPE lazy refcounts: false refcount bits: 16 corrupt: false @@ -66,7 +66,7 @@ virtual size: 32 MiB (33554432 bytes) cluster_size: 2097152 Format specific information: compat: 1.1 - compression type: zlib + compression type: COMPRESSION_TYPE lazy refcounts: true refcount bits: 1 corrupt: false @@ -92,7 +92,7 @@ backing file: TEST_IMG.base backing file format: IMGFMT Format specific information: compat: 0.10 - compression type: zlib + compression type: COMPRESSION_TYPE refcount bits: 16 === Successful image creation (encrypted) === @@ -109,7 +109,7 @@ encrypted: yes cluster_size: 65536 Format specific information: compat: 1.1 - compression type: zlib + compression type: COMPRESSION_TYPE lazy refcounts: false refcount bits: 16 encrypt: diff --git a/tests/qemu-iotests/242.out b/tests/qemu-iotests/242.out index 3759c99284..ce231424a7 100644 --- a/tests/qemu-iotests/242.out +++ b/tests/qemu-iotests/242.out @@ -12,7 +12,7 @@ virtual size: 1 MiB (1048576 bytes) cluster_size: 65536 Format specific information: compat: 1.1 - compression type: zlib + compression type: COMPRESSION_TYPE lazy refcounts: false refcount bits: 16 corrupt: false @@ -34,7 +34,7 @@ virtual size: 1 MiB (1048576 bytes) cluster_size: 65536 Format specific information: compat: 1.1 - compression type: zlib + compression type: COMPRESSION_TYPE lazy refcounts: false bitmaps: [0]: @@ -68,7 +68,7 @@ virtual size: 1 MiB (1048576 bytes) cluster_size: 65536 Format specific information: compat: 1.1 - compression type: zlib + compression type: COMPRESSION_TYPE lazy refcounts: false bitmaps: [0]: @@ -110,7 +110,7 @@ virtual size: 1 MiB (1048576 bytes) cluster_size: 65536 Format specific information: compat: 1.1 - compression type: zlib + compression type: COMPRESSION_TYPE lazy refcounts: false bitmaps: [0]: @@ -161,7 +161,7 @@ virtual size: 1 MiB (1048576 bytes) cluster_size: 65536 Format specific information: compat: 1.1 - compression type: zlib + compression type: COMPRESSION_TYPE lazy refcounts: false bitmaps: [0]: diff --git a/tests/qemu-iotests/274.out b/tests/qemu-iotests/274.out index 1d2928e14d..1ce40d839a 100644 --- a/tests/qemu-iotests/274.out +++ b/tests/qemu-iotests/274.out @@ -50,7 +50,7 @@ backing file: TEST_DIR/PID-base backing file format: IMGFMT Format specific information: compat: 1.1 - compression type: zlib + compression type: COMPRESSION_TYPE lazy refcounts: false refcount bits: 16 corrupt: false @@ -79,7 +79,7 @@ backing file: TEST_DIR/PID-base backing file format: IMGFMT Format specific information: compat: 1.1 - compression type: zlib + compression type: COMPRESSION_TYPE lazy refcounts: false refcount bits: 16 corrupt: false @@ -114,7 +114,7 @@ backing file: TEST_DIR/PID-base backing file format: IMGFMT Format specific information: compat: 1.1 - compression type: zlib + compression type: COMPRESSION_TYPE lazy refcounts: false refcount bits: 16 corrupt: false @@ -141,7 +141,7 @@ virtual size: 2 MiB (2097152 bytes) cluster_size: 65536 Format specific information: compat: 1.1 - compression type: zlib + compression type: COMPRESSION_TYPE lazy refcounts: false refcount bits: 16 corrupt: false @@ -176,7 +176,7 @@ backing file: TEST_DIR/PID-base backing file format: IMGFMT Format specific information: compat: 1.1 - compression type: zlib + compression type: COMPRESSION_TYPE lazy refcounts: false refcount bits: 16 corrupt: false diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index f19f0590f5..903686b402 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -486,6 +486,8 @@ def filter_img_info(output, filename): 'uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX', line) line = re.sub('cid: [0-9]+', 'cid: XXXXXXXXXX', line) + line = re.sub('(compression type: )(zlib|zstd)', r'\1COMPRESSION_TYPE', + line) lines.append(line) return '\n'.join(lines) From patchwork Fri Dec 3 13:07:27 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: 12655159 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 B604BC433F5 for ; Fri, 3 Dec 2021 13:19:13 +0000 (UTC) Received: from localhost ([::1]:58940 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mt8T2-00055j-Q3 for qemu-devel@archiver.kernel.org; Fri, 03 Dec 2021 08:19:12 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57778) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mt8Ic-00024k-Nd; Fri, 03 Dec 2021 08:08:27 -0500 Received: from mail-eopbgr40135.outbound.protection.outlook.com ([40.107.4.135]:40808 helo=EUR03-DB5-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 1mt8IZ-00071Q-Ht; Fri, 03 Dec 2021 08:08:26 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Swwg35XuyJeoHEequGLp+Kykd/YTzTbPLCiIFmf4M9a2rp0dJgpQwdUAxKuZtErBwCnea8jESvA6vAnYrPfR4gVgIT7j+pmAY0BtLHLcOFNnbbE4h89/FYOrsF8avoQsOaypRI/T5Wl2wUcCFVDnVjSJhuarqNLDc8w1iLE9FMxAZeYM5CZ4DWVLBdBNicTSKQbTT9y1OJGGPRIRHlzvU6bju84T258/f/F2IwTaMIzNCvqRTXVcSpHmw/LsZBUB41prMJtKLQEj0zS6aSejfYrKIPg0BXc1eNe/oXMtwVD0Ur5/goY6wF0dExUWkX9EdwYPNeXHnoTShVNbyTEkIQ== 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=FhvaATUa4cNWT0H3PXZx+a7CCwtxj8QfOSkqKBncPnU=; b=dvq7Lc2ALwXmhX8u7pWxFMEEtvCiuUs0Di9lGFwJypH9jzzAKZwdfb9HekczmWLLPvMDyLNwkjUtwktVHDhXG0LaH4Bi3tA+NSI4l6rEN0HQmwMfZFGY1UEnWRmhCGFbak3bbjOrxp+VSRSKlRDWc2G4Qhlb+r2sLzm6pBoLDDVQ/c7L5nOaVhd7RQEMcLhsuptEjHQY5iP2mHBtQlL6cGIcazXqsUVI1tee4ffnR2WGOY/pai35yZNGU9g7nbmAd6ukUV3HdWHzBEYnUh+WvKGzEjUdARuPyizZfy7DeK7nd/aUy5fz7aoFaXvvJcWCXzd7uufJvjT7PM9DPaVaGw== 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=FhvaATUa4cNWT0H3PXZx+a7CCwtxj8QfOSkqKBncPnU=; b=OF4udqqVXKFJDZQRXEnYp/S/eyxv5i79mgXme0l4dX27A/6u8izXHIg13iSnFEMhEawmo29yduI63hm36oypAR4FYdjms2A/RfJW0euuKTpKtcj8k89ZwnIoTPjyWBSQnCVTL71R6lY1GGgB+6aklfvcjhCJcaJrkKbOyCMFQVA= 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 AM0PR08MB4515.eurprd08.prod.outlook.com (2603:10a6:208:148::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Fri, 3 Dec 2021 13:08:10 +0000 Received: from AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a]) by AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a%7]) with mapi id 15.20.4669.024; Fri, 3 Dec 2021 13:08:13 +0000 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, hreitz@redhat.com, kwolf@redhat.com, vsementsov@virtuozzo.com, jsnow@redhat.com, Max Reitz Subject: [PATCH v4 09/19] iotest 302: use img_info_log() helper Date: Fri, 3 Dec 2021 14:07:27 +0100 Message-Id: <20211203130737.2924594-10-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211203130737.2924594-1-vsementsov@virtuozzo.com> References: <20211203130737.2924594-1-vsementsov@virtuozzo.com> X-ClientProxiedBy: AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) To AM9PR08MB6737.eurprd08.prod.outlook.com (2603:10a6:20b:304::18) MIME-Version: 1.0 Received: from kvm.ch-qa.sw.ru (130.117.225.5) by AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16 via Frontend Transport; Fri, 3 Dec 2021 13:08:12 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e4cc7ce3-a13e-4c4f-2010-08d9b65df612 X-MS-TrafficTypeDiagnostic: AM0PR08MB4515: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5797; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fuQdrYWfv/z1XuVNBSQKICJDrvqYfgFdGhMiLOcsl5kwYkPDn6kfpQHnRMcD/vIzK0jz0Zgh7F3smtde+Ny432IWoyyJifmdwJmn/DOHQSncMlzzo3EKZ6sE7yqZsmyjlR7FBLtWdKlOGHvMfAxGm8YUVyJpcvd2PXIqW6yKBcWrMr+BmRUWarnVVJy7PdzNiD00UGKZ3AqPVJmNYIPlcQns+6V2eYu1istFxuZInS8700IRSeNlYJNwFyTuHe7cKgbRTXFyqXk/L4BTM+4ECKOd811vd7EMVH5UagdqMfRu/jmP+A4Fc+No/E09s4r3A68z/ePHxbKpr5+ZA8TvjXtgdYlHKmoqI7I8vsBYYE4uWT6RHgCqFIaBiLT++VByOYtjpxvffyvKJnhv8Q6SfclX2HCOVBt4Hk27R+0mY0zIyoLwe/Yx7fGaOdwZ9m2Ph7Sh0uMVoDvG9+GsFrI80M5wJYhgLrUx2sXyWethLp3wdDFkiQdITrimg1vOXYdL9r1znb3sJAv9RtOrgpOyv5pWcZY8qOUHngfKZFiOI4SRA8iWalgi0Nrw0eErhnhy1/BxAq0BA27GJN9F0zL2FFKXa16FBz6oKp4//J6ZWTAK3H1lhCIRiHt4DrOYOA3WTqqEZW8wHulpnXZBNPR0OX1ScYJWeNUBE1V3RJ+tGgCxiZcWVMC6ObchK/71KWCOMopZTWgp4eoIOWMpg0Xj5A== 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)(2906002)(4326008)(186003)(6512007)(52116002)(6506007)(1076003)(5660300002)(36756003)(86362001)(38100700002)(26005)(956004)(508600001)(2616005)(8676002)(316002)(6486002)(66476007)(8936002)(66946007)(66556008)(6666004)(83380400001)(38350700002)(6916009); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 4N+C18K0vVSqav9pW8ajo4j+Vrh/5FU0JWfPvuGas3Sf+Fh55uB29fc+TddoX8ZXDWECJezes3kEZgXiCezXz2WnheZTXEmJ77LxE6Q2EKNX3DhsZ3Udlx9v6oNfvuTzNnBBJo57uyvkoHHGk01gJ5h31+7DZewUKqY1JqfdeacZl5K2DVLNKQyp8Th+cSU3to9YsFhVSXBUlSqL0DTeYt/yOACKt9OljOnm73Avny1dPZmI8FqyUiyEI1XotAfTm3ViM4K5GpOFwZLr7SP5X4JvzP4lW+wgcJjhdXd2AS8pNC8IwNnYUN/nfjE/qaswW5vYKyetwOcz9NZKfMwYvxvFPf/g/FA1O0q+svPjgIzW/OQO/FBDIDCc7LsmDrFJb/4m07nGsSOBnsD8m4x4NHIXEaCpkY6+EGlUurI5mx1BHe5fPVoNP8fKX9EuGgjENHc9zQcpraaw7irKveFqlHJkOpLQlSXRUDXcFabVcjBhjCx3EXUy1B1rvfBJIhfhU1RtX2k7m7M9LEHiHoIgpQECxEpMosYKV1GC5diP4Gb4kD39ZrC01+DrFz+6YALkVt6o3mJ6SucAxTYUotV6vR9ge0O+Yq41RxrPsZsqY8v73t6KPoW403bs9DmYktKlywzI07oOq2O0dKv4b+5vcKE7znZSxj0YgpujMdA6EgBIuPXLqz18nEHiw2vuEAFhkGb9NnkJrycMQCUn6bWjAjo2xRpBnUWVShyaFRIH4Lbfg8Y80qtJFRGHIt2TuWbK2laB71+IPfxGVzRAx6HKzUP0gisXmTH+BA/0cusbO2I3wJX/ZprJko7r+Obf+Ew1d4/EN5nQcj50m/qkRjkFw4s5ydKf3VIEBf0KZJzSttSoOj/xEvAYdwcdgoMeh/NI+EOITMwRwhDOW6BkSXGvMBQqHCaDHEzsZNMXdRarlJrpU9ze/FyB6vobWiK4SwXOAzYpv2Qdl0J7+RLJHYHQk1SL6L43gHJCA0ZzLlADkrjEmavHwpT773somEOSjLnqKpDZq1MUVbVib9QS6xLOA32sGypoEdmXM+UlOCMmHi6MzFwGXSwyAN1+UJmdLeaBxlUm+HG3oAmlR18mdngjQf0UBoAGBfYNKLn2O8JdaAAjM63WYcmH5Ppm2WriT2P2MkT7cyGkDFPsnW8lfenCbwBs/0tP3KopbzNh3tWu8eGtu/D1IZVxBuLwUqojU6GAdnUiEevGpmbF5GRERLuEccTLZWHQNtbNcWtXvgUb7bWtMG2eFPBMoTWpKC/3SqIyTfH+McoF+sOKxjKZXDHaRNW+Dk6mm6z0Ju+EZJREAxpOra1YgJVYqnUHddilXWOtUaeaVmyqZh85lRYqQhAtxMC8q9/1A7T68EL/UJ6MP2JG1En7GLn36Z80e2ij+zodQdTjXI0eEljjFGxL9hFHXcWcDzEocXRW+Pbp4bvhjwxuwIlYS2PpSJuEKi/MGHnJu1aTXKx7f8MzWXHiqqjanN9WT8BddbbCy+q1h7TyQxQnqnuDEEpOdOM6U1JyI4JDeEnDBj8NFBQUy8PF3eqNbOG8+MXPOeLuRlI92NOKiNvoAAtjJrp0Jvd3wbTPsOkivUqXBg0ydUWwsNQ8UMGtXKPsAgtxWFXszagzMfj372sTBrIoQyESTO4C3CbSqV8upAXmbVm9yK9AEIB3Re+M+w== X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: e4cc7ce3-a13e-4c4f-2010-08d9b65df612 X-MS-Exchange-CrossTenant-AuthSource: AM9PR08MB6737.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2021 13:08:13.2534 (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: GhjIVBUzZturPVlhMGCtCjq6oFHDHIYb+yAiFZHTZ3EjgX6ak6vZqFZ45KY9TSOUwismQ9m7Ua2AX83aLbg28f6dvT7kb66PtW8WhPdU6ts= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4515 Received-SPF: pass client-ip=40.107.4.135; envelope-from=vsementsov@virtuozzo.com; helo=EUR03-DB5-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, MSGID_FROM_MTA_HEADER=0.001, 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" Instead of qemu_img_log("info", ..) use generic helper img_info_log(). img_info_log() has smarter logic. For example it use filter_img_info() to filter output, which in turns filter a compression type. So it will help us in future when we implement a possibility to use zstd compression by default (with help of some runtime config file or maybe build option). For now to test you should recompile qemu with a small addition into block/qcow2.c before "if (qcow2_opts->has_compression_type": if (!qcow2_opts->has_compression_type && version >= 3) { qcow2_opts->has_compression_type = true; qcow2_opts->compression_type = QCOW2_COMPRESSION_TYPE_ZSTD; } Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/302 | 4 +++- tests/qemu-iotests/302.out | 7 +++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/qemu-iotests/302 b/tests/qemu-iotests/302 index 5695af4914..a6d79e727b 100755 --- a/tests/qemu-iotests/302 +++ b/tests/qemu-iotests/302 @@ -34,6 +34,7 @@ from iotests import ( qemu_img_measure, qemu_io, qemu_nbd_popen, + img_info_log, ) iotests.script_initialize(supported_fmts=["qcow2"]) @@ -88,6 +89,7 @@ with tarfile.open(tar_file, "w") as tar: tar_file): iotests.log("=== Target image info ===") + # Not img_info_log as it enforces imgfmt, but now we print info on raw qemu_img_log("info", nbd_uri) qemu_img( @@ -99,7 +101,7 @@ with tarfile.open(tar_file, "w") as tar: nbd_uri) iotests.log("=== Converted image info ===") - qemu_img_log("info", nbd_uri) + img_info_log(nbd_uri) iotests.log("=== Converted image check ===") qemu_img_log("check", nbd_uri) diff --git a/tests/qemu-iotests/302.out b/tests/qemu-iotests/302.out index e2f6077e83..3e7c281b91 100644 --- a/tests/qemu-iotests/302.out +++ b/tests/qemu-iotests/302.out @@ -6,14 +6,13 @@ virtual size: 448 KiB (458752 bytes) disk size: unavailable === Converted image info === -image: nbd+unix:///exp?socket=SOCK_DIR/PID-nbd-sock -file format: qcow2 +image: TEST_IMG +file format: IMGFMT virtual size: 1 GiB (1073741824 bytes) -disk size: unavailable cluster_size: 65536 Format specific information: compat: 1.1 - compression type: zlib + compression type: COMPRESSION_TYPE lazy refcounts: false refcount bits: 16 corrupt: false From patchwork Fri Dec 3 13:07:28 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: 12655129 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 BFC4FC433FE for ; Fri, 3 Dec 2021 13:17:21 +0000 (UTC) Received: from localhost ([::1]:56610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mt8RD-0003T7-FL for qemu-devel@archiver.kernel.org; Fri, 03 Dec 2021 08:17:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57822) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mt8If-00027C-Jq; Fri, 03 Dec 2021 08:08:29 -0500 Received: from mail-eopbgr40135.outbound.protection.outlook.com ([40.107.4.135]:40808 helo=EUR03-DB5-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 1mt8Id-00071Q-Dl; Fri, 03 Dec 2021 08:08:29 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E+yJpJZeZuSC6dnbYC98n1dcObcGhUKpUBh1Tdj1bNDn1kwkBL81xGfU5FrwWypiiAnBl56Mx6harDwfi3VijTqgywBdddd2lDq0U1QI4fOtE+VyE1A3src1rWfDUwgFUjnkbH2gV3q4FFsEBR8e5YLh1NWBuRwspGoeiYqTffwUzY1edDbZrAmN/W2HAxfNq4tGiQBtnOjWfMXDTasbqjsNHJzMC/RkTJMHzBI4/KS/IHK+bXceCcajAaLXA9qSz/BzcoqF9Hj4lX8O1C6x5nKI6ppL89mtvyY6yvi0aWKpnY+Aoc4YpJlJ302mFXeM9akcYh/wuHRs3Ny9q8YhnA== 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=JZ9duRdLM1iFu9d6jG0ecjmGr53zpdW3ngUMGs3ybAI=; b=Z/6Y2kSojvKHLPfC3sLAW5XSY5hMy7+O/jzMKTdcxKZNxJaDl6UpQv8o0pnXxqLIcUiNMsEwpJVJPeB9a8PmdCSehIj/KqLkMb1zPyJtywt992GeCIP535bLBI04jBamXh1xNk0cWmaUvnTA7kkogMP3BRO1ed9qbjjyF3O9eMfHz0ZsWPc0jDCVmpZCAbfYw6ZxO1U6El4gmnEv9zXMRV10ZnOLmXaOgUNNDv+h0qI1ZvJd7AHt2droTGIRj5D0/snKu8wtfOQ+idFWZM5+WhLzv1ch/N8PJ3QWIX8zK0eQ13G6AV5Cw+CacJgCslC030E73RBg9dZcnJZKkpiqVA== 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=JZ9duRdLM1iFu9d6jG0ecjmGr53zpdW3ngUMGs3ybAI=; b=koOJ0CaB2MNhTmB2bR4KCuEX0rOBbAISKxJMmcJ2zOj78RgJz+JbuadQHqt2oUUKP4YWCZ4S8Yyq9l5cF4VVCfl88h/cy8J3TScn+X2htQ7N7JiEwUSNox8DnNR93g+in2ASzMd2WFycVM9xq0/Z4jwgH3uYh++1yUOxkzoj88o= 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 AM0PR08MB4515.eurprd08.prod.outlook.com (2603:10a6:208:148::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Fri, 3 Dec 2021 13:08:11 +0000 Received: from AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a]) by AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a%7]) with mapi id 15.20.4669.024; Fri, 3 Dec 2021 13:08:14 +0000 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, hreitz@redhat.com, kwolf@redhat.com, vsementsov@virtuozzo.com, jsnow@redhat.com, Max Reitz Subject: [PATCH v4 10/19] qcow2: simple case support for downgrading of qcow2 images with zstd Date: Fri, 3 Dec 2021 14:07:28 +0100 Message-Id: <20211203130737.2924594-11-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211203130737.2924594-1-vsementsov@virtuozzo.com> References: <20211203130737.2924594-1-vsementsov@virtuozzo.com> X-ClientProxiedBy: AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) To AM9PR08MB6737.eurprd08.prod.outlook.com (2603:10a6:20b:304::18) MIME-Version: 1.0 Received: from kvm.ch-qa.sw.ru (130.117.225.5) by AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16 via Frontend Transport; Fri, 3 Dec 2021 13:08:13 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a6191996-f52d-4f36-55f2-08d9b65df6f4 X-MS-TrafficTypeDiagnostic: AM0PR08MB4515: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1247; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nnq+6Yfc/fDdVIpnKJFGEKLKJkNi2ZnNtT+U2rpd6zh58dTSCAh5+txDsasbLpsGwqBS+7muZAt4/e/Q1zDTxg52RdQ5o2F03qJOOnpXBdZ60P29KZ8qewoT6u54/F8qLHRasG8lJO3y0NceurJzoHmyVRVXoFoxTWHHM316ndozkkEvE3CK2HenAiHK/N84autF+e2veo3a1uacfq9yFNZat+1l3Sbvl5ThZwapkSls0+RhV8w0QbZEgjKPJrIKFkNak2P/dbbcDrxFXsLW2TL0JQjKCPydxGMeX6HMuTDq4mYVR747eG+PRY+bHkT+UwVS496LBK7vOBRxBtmDHrpXaq8Isv0ZnFs4YsaYC1WXbzKYlZ0XDFvhe9qzxOep1uSry4IBeZiUC33fRvyX97d/mFCBwKUIP8o5gM5NR2bCfaRy59ExDEkEZviKcwCgCtLQ7KCqZ25cNinMnJW2TBXcs4CB1PCYLm4RKIXjX6hLk6DpZZ1zeVb1bQi65ZHIGS2TX3a9Yv0SMntWcCkuFwZiWQozW0N0wQkPJzYnwlvqUL2MyIY68fi7HLBjf3W5hXzycolM/BcVdrILVP30Or9SNZNDkqXBlB/7rFPzQzh+FcW99WzvSLDzk12oTeO6tmggFHJq0W4Szeg+DrZvPGeO2pS9L6XJs8ffKnaiPS1bWVLQ/NJbkA1dC09tMrQz5ZX5z1zT6pVUtaOqJ2AIFA== 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)(2906002)(4326008)(186003)(6512007)(52116002)(6506007)(1076003)(19627235002)(5660300002)(36756003)(86362001)(38100700002)(26005)(956004)(508600001)(2616005)(8676002)(316002)(6486002)(66476007)(8936002)(66946007)(66556008)(6666004)(83380400001)(38350700002)(6916009); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: FBvN7puNUcR0W3z9jMxv2WrxeqW6tm0dpKyCvQbjom1xIE6dQygwPaoeZYprbAe8kau5nx6vK47nBaGFGsRKrHDldRG51U9XwR7bM8jpjfAVEXgcncYRHLwITjST12i2vjGm1eElb93f78JlPJq1UhXQqs5vjj3tC38fyYDRMWDiEnWqHPR+0v7ctaGCbsYuSNkioDexyNmErGPspk0DsXaroBj71o/J6GFgcmaBQlrk0dnHA+7vMG9VhAXm0XgL2121Y/V6StJlCtQQ0C84sF/8G4aqzHm1beJfYB/buQ3x1nF8otmyQgGII/6ZkofuymJJf4CNSRa7SB1u+8UVp+yz3BoJ+SVPjbeDsG/tsFIBTnfv1bCNqoLGbI5FwvYraXtVetOsoywEm5AmiHIvRNvg9eZ+QpxH2KcknrXOcuzsQXFAvtrkpUhq6Wadpy4eM7sG9AtJHuDKb4OJI7G3P9iJy47ntcGeXEnAniMv1ethsnYY6q7gICVYpOC5K3BzzNnD1FF9dk/yeWsDBeyV0JPI82cX1ufPVkVmGbLPlZq9u/KsCTZfFjZ4KM5HjfOy3/ZJX1lbHSsKMDwOvu6uJLEOP032RhFgs/53zvNiZhOsRKbyQHPUCLjyWaKn6CRTLlBMOU8KKfNsXKDKERmXD/prcx/mx5tkaSt0Dje/Jj9VNyLaLxajRBo82IdUlPZx/uVNJu6MNzQLctH1KVOYM7ZRmECAhx/YOlF6Tpo51beDQgBmWVl4RQdAImUCFIGNgu95UXcg8A8LuuVAckhcyvKKXFEulewDm6lswbfx0ZNg/pyKTLhg4pvjUn0gKVVgUyPGaietvDNFPmuKnTqLO4Jqcjs0NYFBfgyRwdoqcDs2XoZYkZ65oZylxxj2en2ESrINvSa2m5s5+I94YwlbWMdKi7ktPFFSCulkO+gzpg9uhU5kTIo6lFMKILsFPBCypHtS7UWl3/A+oQYFQ1QClDXx9wYx/jjmRBqNnTVZLMASdGjrpglqNZDOXl6FzyquCT6mA0jt5p/i9TqsARDysthQUQ/Z9+g2PriD/GpVtA+nJjLm4Qfsl+CEjkHy2TZZUEqNBU5cNTAYglMZ4wPcTSHwMHkd8wR4jN26fZY9/dRSNC2JKHhdLhcFMPmC4ULLuQ7NtbFNXbkJvNjmsaZVHWoORuFxDxUixzXAyacwaRnCMT3EVO7sHHGDENyF5YMc7eyT0WGskBoVrLy6rFdKW14Xy8Qv66bQMNsoT/uE3obeSNbNnERiivLuBS2udJW6fPOE6TyUQGya1946KYSg9KQ94vhUXvyOZYq2Fv/K95vQL/spXIFlJt2Xsox56ZDdI1iF8vI7u8t5IWoE0bFqtws85kazV36Mt8IOj3oS1Y1MpsGJ/lCWITJY/z5sFKc+sAWPbJ84J61Mi/7wahj0ysI9oU7gyKQj1/sanpUXuFQKLpv28qrtExorvmlTZWSJFcoPu/Bvd1owX4FhuWDoljh3oJaa8y0keWpFXcLYJc70zXk6ucR2ApFvZeKkzRQvZXyEwBMizQ2ZmZUHW1GbPwM4jZHcXc8SFhPeGNygBLRWN4VWKwfA8vHShuUAgk1j0wpmWsyd4LktCoS0vjcw4EhYLjQ8g3dpJwiSXVItSbwhfcJee2BEUGr6oeWbXi5zDIuGAlHSe+iUzhiJMyyBBw== X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: a6191996-f52d-4f36-55f2-08d9b65df6f4 X-MS-Exchange-CrossTenant-AuthSource: AM9PR08MB6737.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2021 13:08:14.2312 (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: 8k4cz8hZcdS/Y0H4zrSYWlop25spstomW7oEWwYR0/VXO/UvXlODPvDqt69DyACJPaoYHl0waZZ8f2NhfmXuK3xpD/pn+NEpdBSbIYG39gw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4515 Received-SPF: pass client-ip=40.107.4.135; envelope-from=vsementsov@virtuozzo.com; helo=EUR03-DB5-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, MSGID_FROM_MTA_HEADER=0.001, 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" If image doesn't have any compressed cluster we can easily switch to zlib compression, which may allow to downgrade the image. That's mostly needed to support IMGOPTS='compression_type=zstd' in some iotests which do qcow2 downgrade. While being here also fix checkpatch complain against '#' in printf formatting. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/qcow2.c | 58 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 2 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index d509016756..c8115e1cba 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -5279,6 +5279,38 @@ static int qcow2_load_vmstate(BlockDriverState *bs, QEMUIOVector *qiov, return bs->drv->bdrv_co_preadv_part(bs, offset, qiov->size, qiov, 0, 0); } +static int qcow2_has_compressed_clusters(BlockDriverState *bs) +{ + int64_t offset = 0; + int64_t bytes = bdrv_getlength(bs); + + if (bytes < 0) { + return bytes; + } + + while (bytes != 0) { + int ret; + QCow2SubclusterType type; + unsigned int cur_bytes = MIN(INT_MAX, bytes); + uint64_t host_offset; + + ret = qcow2_get_host_offset(bs, offset, &cur_bytes, &host_offset, + &type); + if (ret < 0) { + return ret; + } + + if (type == QCOW2_SUBCLUSTER_COMPRESSED) { + return 1; + } + + offset += cur_bytes; + bytes -= cur_bytes; + } + + return 0; +} + /* * Downgrades an image's version. To achieve this, any incompatible features * have to be removed. @@ -5336,9 +5368,10 @@ static int qcow2_downgrade(BlockDriverState *bs, int target_version, * the first place; if that happens nonetheless, returning -ENOTSUP is the * best thing to do anyway */ - if (s->incompatible_features) { + if (s->incompatible_features & ~QCOW2_INCOMPAT_COMPRESSION) { error_setg(errp, "Cannot downgrade an image with incompatible features " - "%#" PRIx64 " set", s->incompatible_features); + "0x%" PRIx64 " set", + s->incompatible_features & ~QCOW2_INCOMPAT_COMPRESSION); return -ENOTSUP; } @@ -5356,6 +5389,27 @@ static int qcow2_downgrade(BlockDriverState *bs, int target_version, return ret; } + if (s->incompatible_features & QCOW2_INCOMPAT_COMPRESSION) { + ret = qcow2_has_compressed_clusters(bs); + if (ret < 0) { + error_setg(errp, "Failed to check block status"); + return -EINVAL; + } + if (ret) { + error_setg(errp, "Cannot downgrade an image with zstd compression " + "type and existing compressed clusters"); + return -ENOTSUP; + } + /* + * No compressed clusters for now, so just chose default zlib + * compression. + */ + s->incompatible_features &= ~QCOW2_INCOMPAT_COMPRESSION; + s->compression_type = QCOW2_COMPRESSION_TYPE_ZLIB; + } + + assert(s->incompatible_features == 0); + s->qcow_version = target_version; ret = qcow2_update_header(bs); if (ret < 0) { From patchwork Fri Dec 3 13:07:29 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: 12655167 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 6348FC433EF for ; Fri, 3 Dec 2021 13:23:22 +0000 (UTC) Received: from localhost ([::1]:39364 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mt8X3-0002sI-Gz for qemu-devel@archiver.kernel.org; Fri, 03 Dec 2021 08:23:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mt8If-00026U-3R; Fri, 03 Dec 2021 08:08:29 -0500 Received: from mail-eopbgr40107.outbound.protection.outlook.com ([40.107.4.107]:61828 helo=EUR03-DB5-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 1mt8Id-00071J-8d; Fri, 03 Dec 2021 08:08:28 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l2FVX9X9MnQsFSBGIfvROVJqxDTMrAsldX4L2pVi/Xz7s9lgecKUV8dTSfCE5fSfuDxwfPyX778Tmc5/cBZh6A8gM4Ij25CgufnxIos5y8RecNGFKGlmdxEHuqPWAAYPXoXeQHVbAikoP8KDhWSsEmwNhXhnX1wgNiLpngAzDSxeXB3BM7mMQ4JqcBm/OmqL0EaLwy/2sCO7sxsWc6/YFibLSS9RMX8hd7DYHxvfnC06GTuje8akoPFJYnbz9OoJbpxdPm2olcv1S6g4bsE6mlaGAzfhuxkXxg1zvcakT2hrdVfhswKULlaa483nP5AdrQX8YQ2w1BgcsGDjkMB58A== 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=axIIsOK6CKzatrFUmTi/xfJxnobytIY9qqWG5vKm8XcaLCrYH4bJEkWeK1Qn5osi/22H9QkM4FUrH8/pu1+krAm/phGp+oOxBCsk5iaPykSGqBYm784JnhxiSExTPDdswl4rCny0fXCyN4mMe188yE6d1ND7+zao4IgIGP04oteG+wuSbZ40TYNzbI9pCezNkYdJUhW+zRLPPFIiU62jvfhnq1gT3bwRBkOphrHjM8bUNVTIijQee0bTGotvQwDNkGyKwCOr77jbCXyMaU/zxk/FkZ52KBmSefd29d8djaQ+VLgp0dEslUAlDGfTOEOC4ziGrPIOrbf8sr+oTS7Gbw== 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=wsgEzkGaWJpxT02msb9IsUcvb2BokNuEP2+wa33wHUIc+GQ69oC7canfFL4FGTugfkYLFQ6n4AhJYTIG8HNzrbo0+dvUM5y+hHiRMJSI5Rmzs1KeGt75m5ddeJcytuJcC47TSj/e+B0rtRF1l2S/e/P6hbPWXl99c715TV7jp6E= 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 AM0PR08MB4515.eurprd08.prod.outlook.com (2603:10a6:208:148::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Fri, 3 Dec 2021 13:08:12 +0000 Received: from AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a]) by AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a%7]) with mapi id 15.20.4669.024; Fri, 3 Dec 2021 13:08:14 +0000 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, hreitz@redhat.com, kwolf@redhat.com, vsementsov@virtuozzo.com, jsnow@redhat.com, Max Reitz Subject: [PATCH v4 11/19] iotests/common.rc: introduce _qcow2_dump_header helper Date: Fri, 3 Dec 2021 14:07:29 +0100 Message-Id: <20211203130737.2924594-12-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211203130737.2924594-1-vsementsov@virtuozzo.com> References: <20211203130737.2924594-1-vsementsov@virtuozzo.com> X-ClientProxiedBy: AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) To AM9PR08MB6737.eurprd08.prod.outlook.com (2603:10a6:20b:304::18) MIME-Version: 1.0 Received: from kvm.ch-qa.sw.ru (130.117.225.5) by AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16 via Frontend Transport; Fri, 3 Dec 2021 13:08:14 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b2c4e6ee-a8f7-4c2e-d9bf-08d9b65df72c X-MS-TrafficTypeDiagnostic: AM0PR08MB4515: 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: 4XvP798RLipb+57h3oXF8QUzGOZ5JzSjPiyZLKuVIwhLXfUQYVeHwLwVtN8lyDCBJEuH4ZzwI+cGDvJj3nOv5oiZnqJFvcXl4OsVA6EZ6nsnus6M2Hy3uHF3+tGUwUVlLcuWE7FBcT3wIaab6OTsKd3ylb+OZ5ZVmIEIVHQre4WuG4xPnLT3Z+rq7R+FQ4RwKxWlelpfeXUO4c8R536CuDFwp3GGFs1hAEKfDLCSL3NXZqFf+JjCQbW8Y2HQUgIrlOBiFEvWIfoX37uORWBo9fXoUkkpWe/n4q9miM6lpLifi7gGfCpjOSFVsyJV2qoEQXVZrcJ1vjZLD+dhpMVDMFW7c3oqwDrNoFJ+2W/YdsffOqRFm1KkWWNja8w/iKWHbmiOL877ZpaAI2TQdcj1gdWOWJaMFEILL2dsqLHkZEJdKjN+E0lmxvG49MFWgMdRB1DHoiGKFTjYpdYU3T6VPe25JV2DcO6afKGpIJ6luR4K87K411D7jg3LdXG5PFwbhVjz171aibcdE4dE8jbExP15+PH+5FJhrbK4sCni3m/loTr+33FtB+dD5yCj73OjJocvhFxSuA+ckOueSqIbBZ4XCeEmmkc9PvlK1DHFYnkQEZYnrbRy4ki4ETvz4sWwOP4BIIZqj4eShgy+BIxTNtyhouWKTuxiGPbSKZg/gzfKBVTCaYCEQeFuVC4p3T/lFwLevO67BK7hq/DlfWcEsA== 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)(2906002)(4326008)(186003)(6512007)(52116002)(6506007)(1076003)(5660300002)(36756003)(86362001)(38100700002)(26005)(956004)(508600001)(2616005)(8676002)(316002)(6486002)(4744005)(66476007)(8936002)(66946007)(66556008)(6666004)(38350700002)(6916009); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: VI1mhVpxD/Sr3FEPaNSigk7I/FmSNRlhksyz/DZbHfP+GFGaQs67ULoLWTJ2Pmp4A7Fq0tRSgVYTPg6mrgak/Bg1u+H+5ZzT5orJVIItJia4KERUV7jvA9HuXIwZGlYgPBLCFH1HeKOR1WvRZrJR/44NL0XIA0zJWYCiqmUgHoYZ9MZuUUzclPwCETvNpeOveNB6FvRxg9Rcds06dNl75ra6MI79w8TQYsAi+CuQ7cMxRDYBOSA9SPafByhlAQuyoBlG7+m/QON3bzTxqGkhQqfZA5YzoGA8KZ4OXByZ/Qsllusq8gzKXCCQgC2rdZ2EEZyHwn8HcFnIbry/LHWC9r3e7PkKvKioj/g7wXiSIGzeBHRYDUbP+gg/LATbmJDOsgu7BfIAjsbeBma9zKM36F4fCggB7k3VnD4/F3jPHleHWAJK5cG7d/Lixp8VO68kdhIA3nzcYZ/n0kYleEyQyFB7etktC/k70IPiQNGtANH1YwNkOqNdhDeT09GugdzmMtFtKWnBZ4LzVx9icclmTzG6O2BstrfWF8y8vhjJ7M8z8xz9UkWHmS/rOmTnWeJ6kJ5VEBIF+l647bl/n1Tj8H+TLOXeCCFzI3xmJu7zEAbRrA1CKvktk2VDRdjCm88bmogCAmX5JDeYyMJ73odfdZ4H0hY62caCs8f+rO5AnNzB5L+B/84WaBNlIHaDHGzJ0Ag4y7kGQfn773BP0hgQr1UBuTv8fU/KWI3XIKcZjL1QCPQ3zdeVNQKxtZKG9yptNGcrpgc2Zgrbqth/tfyjLyWWS77RCVFUrceHEvXex6Kl/IIYRcKug4TVNp+ImO/NcXlOPvYZ2z42lMssLshhKzsSGO1YDa3/bIPZxhZb3KxvJ2yy3lC11m32xNtzAAf5aVC/kn9K8+04WLs9t07Dt0LglBqIujblSn2yhH7m9VQwu9dNqsaEA75X8Rur6zaiMc5NN85BetqwX44f348qG8Ppe2yIJ7FgA5qm8/iUpTRrLxsOXtGlmP+1HIbhPlQn4QdKGcU+so7cqSP7lI2rJy1RLc+fFlwo9ZKK7TTRQeYr4KxAxQauC31fi4gPryKFblfXu8FB2kEAvFs71E8idloHeb0PtH+lFbG5GaWoJ1c1O2nPF1lUvh5zEsHXpSwQrnzfzbAqh7S/5nJqZ4eL+hahiFRvGCXVeujNzbrZalUI5y6Vl3p52mufnaVmgEVz3s5GU5wBbOwwqZXjY57ZmPQLEtYwixOoHxCw0wH2ZVItrqx4AKmNG0EO1ijMSeLj5NMT/nabC6UQwIP14yf60YiTjXNn2yWzx5Ax3g/FDOvFVUPo+/+PnZjSmt8tU9RqvvJSqh3+OCl+HuHpEg5rzc6NKpF/pQD+zuWiznnIjFabw+dGkE+frChv1enZ3lhzC6xCjDNmGVHoHbvEnV6Pz/xKApdNQVE9+sMooxwMK/zkvz1qYLNZ5KF6LX4g+wDRscQgMd5ZfKAXMlHWg41IVNVeHO0fON8/FaSaK+yxquVPwJwvvTVkUfnLSubDq9rhJEaJQ7Rxixovm7en+Ezlg7Zx7BNJ7iq6XlEgpBe2zp+c10UnfITLPDmSlCqRwSaQbOBVtXrk0UQZbs/ecnCbeaV5LDDZ5fIBVcostwTDzrtM2wi6D94FSfyo6TYJEf8JDBTT5xwevVS8bis/Jq/nNQ== X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b2c4e6ee-a8f7-4c2e-d9bf-08d9b65df72c X-MS-Exchange-CrossTenant-AuthSource: AM9PR08MB6737.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2021 13:08:14.6523 (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: 8L1bViuCWR2vNV+6KwippdPq0CqS/WzIw1S8PfLYbde5K+og2IlpYdIXKmc5rsT0P8I/9+qosG7B3SNZBu4MJ7n2nwc5iyfzKa+QZnQUorI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4515 Received-SPF: pass client-ip=40.107.4.107; envelope-from=vsementsov@virtuozzo.com; helo=EUR03-DB5-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, MSGID_FROM_MTA_HEADER=0.001, 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 From patchwork Fri Dec 3 13:07:30 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: 12655189 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 0F51BC433FE for ; Fri, 3 Dec 2021 13:29:15 +0000 (UTC) Received: from localhost ([::1]:45708 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mt8ck-0007jQ-4T for qemu-devel@archiver.kernel.org; Fri, 03 Dec 2021 08:29:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57892) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mt8Im-0002H7-Fr; Fri, 03 Dec 2021 08:08:36 -0500 Received: from mail-eopbgr40107.outbound.protection.outlook.com ([40.107.4.107]:61828 helo=EUR03-DB5-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 1mt8Ik-00071J-4F; Fri, 03 Dec 2021 08:08:36 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i49oxVPmNWBra88r0Bf8CaVee6RsZEpPJGSA2vH08vJ4AA8bXR1e1C/dVOl0c9qbrd7RN2wz52XwthEcquvSChbm0+BFS4JCHxc8ZXSIUEN3SjxGka9hCxYOua/s6AzP4HYOTeS6AIbDHowAnAfvbVqkVuUdsJqF7nw+O84OkBByb3wXeYMibwGMhU2eIc3OuVAnuifboBry3cJCi3m6ZbEIDh7F6Hj7a3q6MV+bwNSF1BNOrCzLq2Ufoong8PYbTZEztzBQUj0gZFZO1VZa51xIUXSyKLAWCjfOk4Db9Oc4vWDig7e75gopHMt46/hV4cGQmb1SixYDu1clhOIJFQ== 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=wQ9oSHqLXKFNKhHgPqYkrc78zjIZx1hVU7ZozAuohNU=; b=mEql8v8NfmkrhgA3S6MRvqxsSojxlyeOvrYf6g1/k6XKP1wAKMBV48//5JcceLC7fphFd4UP0TkLKHrLVTV911pcK6p+ybEzbxzo9Bi6ZhmT4s/wUjd5vlqDRFDqIJlORscFIIHBbwn0nY4DBsXhb+2nZzZY2twFqPe0MOIFoTIPE71u+W5+gXHSMNhJKmjEb/LU2oqFw0tQGx5K7n9MOfwFF7r0PjcWsQYPXMTpu/+B0tR3Q6b264WixYN3UxHTuhXklN7wbwut7TxhZzocSREaxewjlJ2kLkf3At+tntPfJQumcBBw3Rb9CRPfKBP4Slbq6rSvARRRnUSCmepnBA== 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=wQ9oSHqLXKFNKhHgPqYkrc78zjIZx1hVU7ZozAuohNU=; b=TL0NvZ5gnvCRVarMAXSXiQ1QEoQohhRi7v4o72jBxETeTFC2cmGO3tH3zPSf66P10Ayd5XF/Wuo4bnVFBmOSS9HdAiTJ91J8m1nJQulexLnf7smYiv6Gr4K1nl+6Ctpjsgn7FHx/3QjVdOmdWUOKVr8J/iXGB23eKdJ4wLyCCSM= 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 AM0PR08MB4515.eurprd08.prod.outlook.com (2603:10a6:208:148::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Fri, 3 Dec 2021 13:08:13 +0000 Received: from AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a]) by AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a%7]) with mapi id 15.20.4669.024; Fri, 3 Dec 2021 13:08:15 +0000 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, hreitz@redhat.com, kwolf@redhat.com, vsementsov@virtuozzo.com, jsnow@redhat.com, Max Reitz Subject: [PATCH v4 12/19] iotests: massive use _qcow2_dump_header Date: Fri, 3 Dec 2021 14:07:30 +0100 Message-Id: <20211203130737.2924594-13-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211203130737.2924594-1-vsementsov@virtuozzo.com> References: <20211203130737.2924594-1-vsementsov@virtuozzo.com> X-ClientProxiedBy: AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) To AM9PR08MB6737.eurprd08.prod.outlook.com (2603:10a6:20b:304::18) MIME-Version: 1.0 Received: from kvm.ch-qa.sw.ru (130.117.225.5) by AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16 via Frontend Transport; Fri, 3 Dec 2021 13:08:14 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 142a7d0d-a89f-49ee-e5d1-08d9b65df76b X-MS-TrafficTypeDiagnostic: AM0PR08MB4515: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:55; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fUxOkf6SW0e+FnhuncPc8exP88Rx1rDeSdUeTjAATRBFkY3kkeYgUzPtSPhSKPW+52kySiNtBur84PSC0XiTBquRp2OGbc2YlBW4eJJa9N5e35f+BsuUkyshDHNDYZvf/r5wY5p44M9qbLmRkvJnXn5UxDH4IvIoqSNmmyk83MjQZIY6OwhuGajCbdgHk8W1ychvtbYzSGz5WZImiM+m0wyv7uVHGh8+R5pUIfgZN286RBVq7n40NIu+rvrv3IGTgZg4RWtXhlSmDxGlwb+zi1wrld+3EqwNDnOSNEOXMIYpww3ugPEL+J2ZWey5W5BEPZMMiSdLGRKuTelG6e9V1d2tvgXvWLI/44pAfkGZaPQ0/gYC1pmP9bRZtb01Q5YlQXbt4jA+OJ6SjJ704mTNQfy4WfNvCdGnPolhUfMc+eg8GjbS9kPr2t48WxszF4NPjevQimHikWgCRwBtewg6oA5MeeTDuq8gDja1ACMlWP2FfoBOMsL3v2k3Krp2LNNYVzi5XfM8GqfV61uB9udrkzpRrxlR+Na4+EgbkbPZVdfxvzpvk6i2y9UXPsJIMo4FI0aj1yXzsXXpqHsHMfIaLxWNzGyRAvrZiinF4WeKVP10gfxql4vpW6i8F7BVJJFxXBp6dp4mwEpp4wFTBf4hD9D8hLDrFcqx6Al8EwVX/1vX+wsMu4GRJKfoVn95GsHkZzo/Jhx/3wNcjUeSikolOQ== 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)(2906002)(4326008)(186003)(30864003)(6512007)(52116002)(6506007)(1076003)(5660300002)(36756003)(86362001)(38100700002)(26005)(956004)(508600001)(2616005)(8676002)(316002)(6486002)(66476007)(8936002)(66946007)(66556008)(6666004)(83380400001)(38350700002)(6916009)(14583001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: C+7jv2QuCq5gjY9xnf8PQG+Gmwtc8g1GpWRQKfNx+EyVRzYGNaHaFWq6vkDeznpCpn3RyDSnCNT7hmI7gvFaHcP98ozvQSB4HM3p13ysEOEZ/nWKNareBdQDGN6l7MercHVuU9WDAyu+AiVSdhW8cbRgq+aQmu9wSSK8nPx2ZWlzyrl4QQGCNngZ6ZIA6jyy6c/fUItRSo2/GkpPamzyiEFXfuYwMbR+gh6R98DvSzEV0sG6gkNLf5DEOKAMFhqANYE34IxPg1hs0hhx6gHzptneCpzSxHWl4VfUarxOJ7s145EtSjqD73nqOrJ0fclJumUgewcJDsfHj7/2CzFhfpz8BQHplSVSBM+KaHYHu1d+w/3sjVUqzy2QkPifBDpb0MY4gyxZOlHnRza/AJ361x8LteUhDtc62f0E35yn3SvUodnIq1mPFrXMvqHKDfGrAjUoPSbHFzGIXUQMNqpMGK4N5ti/xjuN1MkWzjjzHTmJlwT9LzfzRK/ZI/MB9o8HEdN/vW2k6626YybdDQhKy9ZNX0/0Pfo3uR9QWKsdweOwdtdK8wgzjDNkjCUDepnTjsRAGuVmrKCoqoBm9SHc4BkORIAEMPUXH9fK+ve136ntmmk1KxtcuevJVixey4qq6FCGddMa600D2Dxb0k4pM1EzFGgnr22vbbyVi4C3GTRgGKoiBdURiG8744k4nfaDvobvD30WuUgMkA22EDRDOiuochUfo10muKL4WOJYeNbZ/sJPvCzkL6iSNiC4d9DsaE+VkOrXCaqpoiUVG47+x4fqBUMb1N/cjDNLF3J+oQ87za57y9JDCCmLCeDIsVsfuRA0V+s6dl8hT4mffyXjfFysRK7nOsbjM1/24KalGxnDxcJpRTLatHt+rzSw3Bd98gfAISuRnY9n+kmqgYHn0Umv8IXXtpNjijeTdHsYYvyFt8tOZhxDbLJ+ccwkiguEwVcFT+fwQ0J1Kop3q//iLNhPKeINcibqVGcdZf+ratCfon9eT+sc4brRtbhGeLwVGNbMAbQgnKi1lS5g6KzaGfF3ZeVV7peezYNGPvJ+5qwvgs2fWqwsQUjtKh7FE5/vk0yzO3uu91WPlHfad7ro2xS07vY35yD7GilIt5kEyUDaOIuFxcRysSMUqElpj9wQx2xhPIF3MOTw+T/K1joXWBdDspN01vbe2OrrPgBuH2QwlDbK1s4xAikFnbCJETVlsXooZ6APzTg3UPgZeY4DppryhVwlN4shr7R8SUldNGwe8vwXPBTFk3zJC//oFWcJ4xH4epeZeHGKAqHUBIPd6HXsuDO4RshIBdPJJuqmPtiZvaRHYHwjEGvdjj9+w0+waHI0/3nZyqSL7cEJx3jn8lke6VU+pAmnWAO6wTRc2oZCUwEZ9qpAPhzv1SgdGl4+4uExr823vzmOfR/2IyXdi5Rsp20UzmN/bg3lF6PDyUgj2GQ6yQVnrQ67FHUNHJzMZ6dseqywdBGAFcewf/RnFK4GCcm0n11NBz2fr0sAad5dmAlBfOV1SW43glAoDp4FLJZwZ3gO4EhYH8QXw85zxbc9LQp54wbYTV22maKA98o7n/UavG4q9LUzF0YaTQU2qWru/JJ6pkiaH0FwPCj50BUx5rw1K2IJST0ewQCfRiXnKVGh0yiVKp6FLe1VF7XErTDfBr0jkjioO4SoMo+Odw== X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 142a7d0d-a89f-49ee-e5d1-08d9b65df76b X-MS-Exchange-CrossTenant-AuthSource: AM9PR08MB6737.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2021 13:08:15.0735 (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: qapyc2cuPZ09i9rZ/DpXi/sDYxvyspwwOECEgVi6Hl/mK82eMPCOhQqDhXv02J9g2ir/R96DPk9c4k5mLZ8NV1hekE1O4RpvTaWedKl+qZE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4515 Received-SPF: pass client-ip=40.107.4.107; envelope-from=vsementsov@virtuozzo.com; helo=EUR03-DB5-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, MSGID_FROM_MTA_HEADER=0.001, 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 are going to add filtering in _qcow2_dump_header and want all tests use it. The patch is generated by commands: cd tests/qemu-iotests sed -ie 's/$PYTHON qcow2.py "$TEST_IMG" dump-header\($\| \)/_qcow2_dump_header\1/' ??? tests/* (the difficulty is to avoid converting dump-header-exts) Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/031 | 6 +++--- tests/qemu-iotests/036 | 6 +++--- tests/qemu-iotests/039 | 20 ++++++++++---------- tests/qemu-iotests/060 | 20 ++++++++++---------- tests/qemu-iotests/061 | 36 ++++++++++++++++++------------------ tests/qemu-iotests/137 | 2 +- tests/qemu-iotests/287 | 8 ++++---- 7 files changed, 49 insertions(+), 49 deletions(-) diff --git a/tests/qemu-iotests/031 b/tests/qemu-iotests/031 index 58b57a0ef2..648112f796 100755 --- a/tests/qemu-iotests/031 +++ b/tests/qemu-iotests/031 @@ -58,21 +58,21 @@ for compat in "compat=0.10" "compat=1.1"; do echo _make_test_img -o $compat 64M $PYTHON qcow2.py "$TEST_IMG" add-header-ext 0x12345678 "This is a test header extension" - $PYTHON qcow2.py "$TEST_IMG" dump-header + _qcow2_dump_header _check_test_img echo echo === Rewrite header with no backing file === echo $QEMU_IMG rebase -u -b "" "$TEST_IMG" - $PYTHON qcow2.py "$TEST_IMG" dump-header + _qcow2_dump_header _check_test_img echo echo === Add a backing file and format === echo $QEMU_IMG rebase -u -b "/some/backing/file/path" -F host_device "$TEST_IMG" - $PYTHON qcow2.py "$TEST_IMG" dump-header + _qcow2_dump_header done # success, all done diff --git a/tests/qemu-iotests/036 b/tests/qemu-iotests/036 index 5e567012a8..f703605e44 100755 --- a/tests/qemu-iotests/036 +++ b/tests/qemu-iotests/036 @@ -58,7 +58,7 @@ $PYTHON qcow2.py "$TEST_IMG" set-feature-bit incompatible 63 # Without feature table $PYTHON qcow2.py "$TEST_IMG" del-header-ext 0x6803f857 -$PYTHON qcow2.py "$TEST_IMG" dump-header | grep features +_qcow2_dump_header | grep features $PYTHON qcow2.py "$TEST_IMG" dump-header-exts _img_info @@ -107,7 +107,7 @@ echo === Create image with unknown autoclear feature bit === echo _make_test_img 64M $PYTHON qcow2.py "$TEST_IMG" set-feature-bit autoclear 63 -$PYTHON qcow2.py "$TEST_IMG" dump-header | grep features +_qcow2_dump_header | grep features $PYTHON qcow2.py "$TEST_IMG" dump-header-exts echo @@ -115,7 +115,7 @@ echo === Repair image === echo _check_test_img -r all -$PYTHON qcow2.py "$TEST_IMG" dump-header | grep features +_qcow2_dump_header | grep features $PYTHON qcow2.py "$TEST_IMG" dump-header-exts # success, all done diff --git a/tests/qemu-iotests/039 b/tests/qemu-iotests/039 index 12b2c7fa7b..8e783a8380 100755 --- a/tests/qemu-iotests/039 +++ b/tests/qemu-iotests/039 @@ -59,7 +59,7 @@ _make_test_img -o "compat=1.1,lazy_refcounts=on" $size $QEMU_IO -c "write -P 0x5a 0 512" "$TEST_IMG" | _filter_qemu_io # The dirty bit must not be set -$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features +_qcow2_dump_header | grep incompatible_features _check_test_img echo @@ -73,7 +73,7 @@ $QEMU_IO -c "write -P 0x5a 0 512" \ | _filter_qemu_io # The dirty bit must be set -$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features +_qcow2_dump_header | grep incompatible_features _check_test_img echo @@ -82,7 +82,7 @@ echo "== Read-only access must still work ==" $QEMU_IO -r -c "read -P 0x5a 0 512" "$TEST_IMG" | _filter_qemu_io # The dirty bit must be set -$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features +_qcow2_dump_header | grep incompatible_features echo echo "== Repairing the image file must succeed ==" @@ -90,7 +90,7 @@ echo "== Repairing the image file must succeed ==" _check_test_img -r all # The dirty bit must not be set -$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features +_qcow2_dump_header | grep incompatible_features echo echo "== Data should still be accessible after repair ==" @@ -108,12 +108,12 @@ $QEMU_IO -c "write -P 0x5a 0 512" \ | _filter_qemu_io # The dirty bit must be set -$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features +_qcow2_dump_header | grep incompatible_features $QEMU_IO -c "write 0 512" "$TEST_IMG" | _filter_qemu_io # The dirty bit must not be set -$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features +_qcow2_dump_header | grep incompatible_features echo echo "== Creating an image file with lazy_refcounts=off ==" @@ -126,7 +126,7 @@ $QEMU_IO -c "write -P 0x5a 0 512" \ | _filter_qemu_io # The dirty bit must not be set since lazy_refcounts=off -$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features +_qcow2_dump_header | grep incompatible_features _check_test_img echo @@ -141,7 +141,7 @@ $QEMU_IO -c "write 0 512" "$TEST_IMG" | _filter_qemu_io $QEMU_IMG commit "$TEST_IMG" # The dirty bit must not be set -$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features +_qcow2_dump_header | grep incompatible_features $PYTHON qcow2.py "$TEST_IMG".base dump-header | grep incompatible_features _check_test_img @@ -159,7 +159,7 @@ $QEMU_IO -c "reopen -o lazy-refcounts=on" \ | _filter_qemu_io # The dirty bit must be set -$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features +_qcow2_dump_header | grep incompatible_features _check_test_img _make_test_img -o "compat=1.1,lazy_refcounts=on" $size @@ -171,7 +171,7 @@ $QEMU_IO -c "reopen -o lazy-refcounts=off" \ | _filter_qemu_io # The dirty bit must not be set -$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features +_qcow2_dump_header | grep incompatible_features _check_test_img diff --git a/tests/qemu-iotests/060 b/tests/qemu-iotests/060 index db26c6b246..d1e3204d4e 100755 --- a/tests/qemu-iotests/060 +++ b/tests/qemu-iotests/060 @@ -80,13 +80,13 @@ poke_file "$TEST_IMG" "$l1_offset" "\x80\x00\x00\x00\x00\x03\x00\x00" _check_test_img # The corrupt bit should not be set anyway -$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features +_qcow2_dump_header | grep incompatible_features # Try to write something, thereby forcing the corrupt bit to be set $QEMU_IO -c "$OPEN_RW" -c "write -P 0x2a 0 512" | _filter_qemu_io # The corrupt bit must now be set -$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features +_qcow2_dump_header | grep incompatible_features # This information should be available through qemu-img info _img_info --format-specific @@ -114,19 +114,19 @@ poke_file "$TEST_IMG" "$(($rb_offset+8))" "\x00\x01" # Redirect new data cluster onto refcount block poke_file "$TEST_IMG" "$l2_offset" "\x80\x00\x00\x00\x00\x02\x00\x00" _check_test_img -$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features +_qcow2_dump_header | grep incompatible_features $QEMU_IO -c "$OPEN_RW" -c "write -P 0x2a 0 512" | _filter_qemu_io -$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features +_qcow2_dump_header | grep incompatible_features # Try to fix it _check_test_img -r all # The corrupt bit should be cleared -$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features +_qcow2_dump_header | grep incompatible_features # Look if it's really really fixed $QEMU_IO -c "$OPEN_RW" -c "write -P 0x2a 0 512" | _filter_qemu_io -$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features +_qcow2_dump_header | grep incompatible_features echo echo "=== Testing cluster data reference into inactive L2 table ===" @@ -139,13 +139,13 @@ $QEMU_IO -c "$OPEN_RW" -c "write -P 2 0 512" | _filter_qemu_io poke_file "$TEST_IMG" "$l2_offset_after_snapshot" \ "\x80\x00\x00\x00\x00\x04\x00\x00" _check_test_img -$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features +_qcow2_dump_header | grep incompatible_features $QEMU_IO -c "$OPEN_RW" -c "write -P 3 0 512" | _filter_qemu_io -$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features +_qcow2_dump_header | grep incompatible_features _check_test_img -r all -$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features +_qcow2_dump_header | grep incompatible_features $QEMU_IO -c "$OPEN_RW" -c "write -P 4 0 512" | _filter_qemu_io -$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features +_qcow2_dump_header | grep incompatible_features # Check data $QEMU_IO -c "$OPEN_RO" -c "read -P 4 0 512" | _filter_qemu_io diff --git a/tests/qemu-iotests/061 b/tests/qemu-iotests/061 index 9507c223bd..70edf1a163 100755 --- a/tests/qemu-iotests/061 +++ b/tests/qemu-iotests/061 @@ -55,9 +55,9 @@ echo "=== Testing version downgrade with zero expansion ===" echo _make_test_img -o "compat=1.1,lazy_refcounts=on" 64M $QEMU_IO -c "write -z 0 128k" "$TEST_IMG" | _filter_qemu_io -$PYTHON qcow2.py "$TEST_IMG" dump-header +_qcow2_dump_header $QEMU_IMG amend -o "compat=0.10" "$TEST_IMG" -$PYTHON qcow2.py "$TEST_IMG" dump-header +_qcow2_dump_header $QEMU_IO -c "read -P 0 0 128k" "$TEST_IMG" | _filter_qemu_io _check_test_img @@ -68,10 +68,10 @@ _make_test_img -o "compat=1.1,lazy_refcounts=on" 64M $QEMU_IO -c "write -z 0 128k" "$TEST_IMG" | _filter_qemu_io $QEMU_IO -c "write -z 32M 128k" "$TEST_IMG" | _filter_qemu_io $QEMU_IO -c map "$TEST_IMG" | _filter_qemu_io -$PYTHON qcow2.py "$TEST_IMG" dump-header +_qcow2_dump_header $QEMU_IMG amend -o "compat=0.10" --image-opts \ driver=qcow2,file.filename=$TEST_IMG,l2-cache-entry-size=4096 -$PYTHON qcow2.py "$TEST_IMG" dump-header +_qcow2_dump_header $QEMU_IO -c "read -P 0 0 128k" "$TEST_IMG" | _filter_qemu_io $QEMU_IO -c "read -P 0 32M 128k" "$TEST_IMG" | _filter_qemu_io $QEMU_IO -c map "$TEST_IMG" | _filter_qemu_io @@ -84,9 +84,9 @@ _make_test_img -o "compat=1.1,lazy_refcounts=on" 64M _NO_VALGRIND \ $QEMU_IO -c "write -P 0x2a 0 128k" -c flush \ -c "sigraise $(kill -l KILL)" "$TEST_IMG" 2>&1 | _filter_qemu_io -$PYTHON qcow2.py "$TEST_IMG" dump-header +_qcow2_dump_header $QEMU_IMG amend -o "compat=0.10" "$TEST_IMG" -$PYTHON qcow2.py "$TEST_IMG" dump-header +_qcow2_dump_header $QEMU_IO -c "read -P 0x2a 0 128k" "$TEST_IMG" | _filter_qemu_io _check_test_img @@ -96,9 +96,9 @@ echo _make_test_img -o "compat=1.1" 64M $PYTHON qcow2.py "$TEST_IMG" set-feature-bit compatible 42 $PYTHON qcow2.py "$TEST_IMG" set-feature-bit autoclear 42 -$PYTHON qcow2.py "$TEST_IMG" dump-header +_qcow2_dump_header $QEMU_IMG amend -o "compat=0.10" "$TEST_IMG" -$PYTHON qcow2.py "$TEST_IMG" dump-header +_qcow2_dump_header _check_test_img echo @@ -106,9 +106,9 @@ echo "=== Testing version upgrade and resize ===" echo _make_test_img -o "compat=0.10" 64M $QEMU_IO -c "write -P 0x2a 42M 64k" "$TEST_IMG" | _filter_qemu_io -$PYTHON qcow2.py "$TEST_IMG" dump-header +_qcow2_dump_header $QEMU_IMG amend -o "compat=1.1,lazy_refcounts=on,size=128M" "$TEST_IMG" -$PYTHON qcow2.py "$TEST_IMG" dump-header +_qcow2_dump_header $QEMU_IO -c "read -P 0x2a 42M 64k" "$TEST_IMG" | _filter_qemu_io _check_test_img @@ -120,29 +120,29 @@ $QEMU_IO -c "write -P 0x2a 24M 64k" "$TEST_IMG" | _filter_qemu_io $QEMU_IMG snapshot -c foo "$TEST_IMG" $QEMU_IMG resize "$TEST_IMG" 64M && echo "unexpected pass" -$PYTHON qcow2.py "$TEST_IMG" dump-header | grep '^\(version\|size\|nb_snap\)' +_qcow2_dump_header | grep '^\(version\|size\|nb_snap\)' $QEMU_IMG amend -o "compat=1.1,size=128M" "$TEST_IMG" || echo "unexpected fail" -$PYTHON qcow2.py "$TEST_IMG" dump-header | grep '^\(version\|size\|nb_snap\)' +_qcow2_dump_header | grep '^\(version\|size\|nb_snap\)' $QEMU_IMG snapshot -c bar "$TEST_IMG" $QEMU_IMG resize --shrink "$TEST_IMG" 64M || echo "unexpected fail" -$PYTHON qcow2.py "$TEST_IMG" dump-header | grep '^\(version\|size\|nb_snap\)' +_qcow2_dump_header | grep '^\(version\|size\|nb_snap\)' $QEMU_IMG amend -o "compat=0.10,size=32M" "$TEST_IMG" && echo "unexpected pass" -$PYTHON qcow2.py "$TEST_IMG" dump-header | grep '^\(version\|size\|nb_snap\)' +_qcow2_dump_header | grep '^\(version\|size\|nb_snap\)' $QEMU_IMG snapshot -a bar "$TEST_IMG" || echo "unexpected fail" -$PYTHON qcow2.py "$TEST_IMG" dump-header | grep '^\(version\|size\|nb_snap\)' +_qcow2_dump_header | grep '^\(version\|size\|nb_snap\)' $QEMU_IMG snapshot -d bar "$TEST_IMG" $QEMU_IMG amend -o "compat=0.10,size=32M" "$TEST_IMG" || echo "unexpected fail" -$PYTHON qcow2.py "$TEST_IMG" dump-header | grep '^\(version\|size\|nb_snap\)' +_qcow2_dump_header | grep '^\(version\|size\|nb_snap\)' _check_test_img @@ -154,9 +154,9 @@ _make_test_img -o "compat=1.1,lazy_refcounts=on" 64M _NO_VALGRIND \ $QEMU_IO -c "write -P 0x2a 0 128k" -c flush \ -c "sigraise $(kill -l KILL)" "$TEST_IMG" 2>&1 | _filter_qemu_io -$PYTHON qcow2.py "$TEST_IMG" dump-header +_qcow2_dump_header $QEMU_IMG amend -o "lazy_refcounts=off" "$TEST_IMG" -$PYTHON qcow2.py "$TEST_IMG" dump-header +_qcow2_dump_header $QEMU_IO -c "read -P 0x2a 0 128k" "$TEST_IMG" | _filter_qemu_io _check_test_img diff --git a/tests/qemu-iotests/137 b/tests/qemu-iotests/137 index 4680d5df3d..52ee135184 100755 --- a/tests/qemu-iotests/137 +++ b/tests/qemu-iotests/137 @@ -140,7 +140,7 @@ $QEMU_IO \ # The dirty bit must not be set # (Filter the external data file bit) -if $PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features \ +if _qcow2_dump_header | grep incompatible_features \ | grep -q '\<0\>' then echo 'ERROR: Dirty bit set' diff --git a/tests/qemu-iotests/287 b/tests/qemu-iotests/287 index 2d5334e8bf..5427ad5456 100755 --- a/tests/qemu-iotests/287 +++ b/tests/qemu-iotests/287 @@ -61,13 +61,13 @@ echo echo "=== Testing compression type incompatible bit setting for zlib ===" echo _make_test_img -o compression_type=zlib 64M -$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features +_qcow2_dump_header | grep incompatible_features echo echo "=== Testing compression type incompatible bit setting for zstd ===" echo _make_test_img -o compression_type=zstd 64M -$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features +_qcow2_dump_header | grep incompatible_features echo echo "=== Testing zlib with incompatible bit set ===" @@ -75,7 +75,7 @@ echo _make_test_img -o compression_type=zlib 64M $PYTHON qcow2.py "$TEST_IMG" set-feature-bit incompatible 3 # to make sure the bit was actually set -$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features +_qcow2_dump_header | grep incompatible_features if $QEMU_IMG info "$TEST_IMG" >/dev/null 2>&1 ; then echo "Error: The image opened successfully. The image must not be opened." @@ -87,7 +87,7 @@ echo _make_test_img -o compression_type=zstd 64M $PYTHON qcow2.py "$TEST_IMG" set-header incompatible_features 0 # to make sure the bit was actually unset -$PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features +_qcow2_dump_header | grep incompatible_features if $QEMU_IMG info "$TEST_IMG" >/dev/null 2>&1 ; then echo "Error: The image opened successfully. The image must not be opened." From patchwork Fri Dec 3 13:07:31 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: 12655191 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 E2B04C433EF for ; Fri, 3 Dec 2021 13:29:45 +0000 (UTC) Received: from localhost ([::1]:46186 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mt8dE-0008M5-VO for qemu-devel@archiver.kernel.org; Fri, 03 Dec 2021 08:29:44 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57956) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mt8Is-0002O9-7q; Fri, 03 Dec 2021 08:08:42 -0500 Received: from mail-eopbgr40135.outbound.protection.outlook.com ([40.107.4.135]:40808 helo=EUR03-DB5-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 1mt8Ig-00071Q-8U; Fri, 03 Dec 2021 08:08:40 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EhDI4fznsCe6lAqJOHsxZm1URXFL/PuRmi5V6hMOFrhW4yKdv9wK6woU5Qb+SssJJCS3kiHOIHO78sx5IrJlG0pcu8WFmNkYMAiQUYf3fGFLY8ISGI/k+40ujNO76xDiK8CaNzRXsGcejE2C/ndDIbKZXyuNz6S+OexS2hJYBLkvoUw8dQlOkZw9EsKjeCR16FzjPnhQJu8ydBA6+z7Wh7AJzrGt4JIRAZgMpyphqh2qX1crXQfQDwU5AHDePpEEhDhXli+WxQ+fGWdJC+BRteqnZ6Tm7+5aKNR1JuSGuHQEevkgRfgKgbheqmuNXmhvut+TxQhY20OmyuQXJch8Rg== 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=aNBEUzaEKpyy3EPJPJuLjstFxgZdcUWJxXmmbd+oSZs=; b=lqUptJpn9e3KhjAp3fiNPmIFyJ1tQe0ZlndBC7yBm9MjJv89NUD1+Q7YKLg2RZFo2BgBM+biaPEnsv3rn8d/5tOH1GcKH7F3DJZOVAzmdQs9cOwEpczVHq+YPBZMeM4pExdHF6bDiozQNOSddtH8mB9rkpOcMgq9hsl0TPUm80i33IRWPL5DQWsbieXagSIrT4FWhdazmOwJ4YejFzkKMaQGrMSN912MDSRXTlbgM0MC0PD7/tdolERIfax1CUGv03TyBQDki7v/CK9mv1klkdbxdvQuu7l1398meSGFdYaTJlRlKBzH384JgseM4iQhDEfwJlX3hvTWdVck1pDpUg== 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=aNBEUzaEKpyy3EPJPJuLjstFxgZdcUWJxXmmbd+oSZs=; b=cuX1dKPeFclVF63+GeZ3GyEkJOxOcX0pHgQjr6KyGP6w5Hcy9u9wW1WCAhhSlcdmKLnZEO+27ThIIdEFxrhPFxWp91pBB6Z7uJnX6tHNlU4iaSz1R/29XR64mzGT0M1roaGnDimdV1Xtybg/UW6Lv+2c6EwfN5CaUZsKlQ8Kx9w= 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 AM0PR08MB4515.eurprd08.prod.outlook.com (2603:10a6:208:148::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Fri, 3 Dec 2021 13:08:13 +0000 Received: from AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a]) by AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a%7]) with mapi id 15.20.4669.024; Fri, 3 Dec 2021 13:08:16 +0000 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, hreitz@redhat.com, kwolf@redhat.com, vsementsov@virtuozzo.com, jsnow@redhat.com, Max Reitz Subject: [PATCH v4 13/19] iotest 39: use _qcow2_dump_header Date: Fri, 3 Dec 2021 14:07:31 +0100 Message-Id: <20211203130737.2924594-14-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211203130737.2924594-1-vsementsov@virtuozzo.com> References: <20211203130737.2924594-1-vsementsov@virtuozzo.com> X-ClientProxiedBy: AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) To AM9PR08MB6737.eurprd08.prod.outlook.com (2603:10a6:20b:304::18) MIME-Version: 1.0 Received: from kvm.ch-qa.sw.ru (130.117.225.5) by AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16 via Frontend Transport; Fri, 3 Dec 2021 13:08:15 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2bb5da08-df07-4fb4-eea5-08d9b65df800 X-MS-TrafficTypeDiagnostic: AM0PR08MB4515: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:47; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 45o6+LAIbA0R+DIRiWraOYVob+4h+ekevkqIf3JjTM3DFjpEJGJsnAGQCj40GFhXPopo/nM9isJ8FbU7AX2szQxrNS1adZEPzSNhJNfj4la1VKttzZJaFdEWfGEyY1az9TdcHwxjc/iAb20mBm283K/x3zpA8lIm55RqyiQrBW06WQd/lciLQbfiwyP5NL0/8Ycr6wGrB80YldqfZy8xD1EYuuyVDdGZGO2K9LDa552HqE6KkWHOVrvKfjR53JWuX4qin5Auo0tum4JB986PKQuMqoNo7FaulX5OqbX4F5BntBufpxPs7odCe6iJMjom4cgrG3cbZFDqtz73u8AzQUnA+sVhxXD7fVm+xdiC14S6llQPw4cw9aNHcQ7Y0XTELY65zs382JZoajALBDnREyf0Sa+G534WOs11U0trqWnfNLBgbTpnNXarUC/uqCFLp9UDVe4723PPvrcb9n1g6H11ImW+gCgxWF/Zr6ZbyBHF5T4OQHJrpD+isacKdk3qxzEdqwXM19fz1SrmtJuQOWKy6xvh6jb9i6F9vod0YM2MlVXzwQQeEOjxe05hn/7XTUt4fnLPJe54oGK6lIaLQ1CghD2R3xms1RuL3rcGMyCdraaR2R13w/b/DMvdSmN34YSXQcwnjPQL9Ekv3VJT//FGLOKVowk9zuTMju5u2ey/8ks5g3OQBNBpdkEP9RIegi0DNqTxZlcfNJ97L6zsww== 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)(2906002)(4326008)(186003)(6512007)(52116002)(6506007)(1076003)(5660300002)(36756003)(86362001)(38100700002)(26005)(956004)(508600001)(2616005)(8676002)(316002)(6486002)(4744005)(66476007)(8936002)(66946007)(66556008)(6666004)(83380400001)(38350700002)(6916009); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +G8acmD325mDidl/vJkpSYX1OTLxxZZ14eCEJW2nUW3ULIfTu0wIEuAKZgWKY1mpDcmC7ymlRgVHwTUeWYZBT5eNqQ6gFpJbJvnUbbbHZC0s45/0rkyepkBJouSmiApFq9/7is7salqnFgAoGMBSw/nCDYTgD6RjUmwWpe0ZB8sJkdAHaNXmhYioDXI64j3a+cT2zomu6Zq8RLrZn5k0NB4LFTrH+XVZsa1NEN3MFLeLdISjqTlPGc/06/xR0Zb1TWGt45LsHoebJTeofJAMIrcOp4PMui4QaYPdhCwQuUPCHNqQwK8ONuOexS3w58T9mGPc60fR1q/zxotmT62CLf9bM7qNA+fl3TDJ1kDumo5wS6pfH33awcQjsoEGKNq7DmX7y5zAoPM0rn5po7Iaxhh1bvYdvAbhrLXYtmiH5vgftp/49IU2QQ5z5UZpTLRlY4L+ucdytl3fJfPn+lJo0V7Dc3M2sDxZ4utUaAo8Ahgb+JqxgU4QWDIemESIVcBCma6YypzoXpEzjXG4TgRPKDfKtZpUCsozFGeBQVjdGTOMkMdGqdLwFbxxhnABoldgDs7e7CKo8JdK9X+yxoYV/TV0KYXzXHE8FhHBh3xPm/SmV03I0ueWUiUwGD1ch91MOaGa9VvBtfewA8dKvpmU91mHsWi8lXHK+d4VSnev3zwRk1eiln2efhJI88gX+lbir1RzVISXFK3rMoaNlSotMwVzrxe9aU/y6Kz6Frxw7zFaSo272VgHB7u/AafgrVNtdsZkdEdTPv0mc0PoLCgnf2v+0yn8C3HqhqoHkdxu3AQLW58L1Fhe63gxRZ/lYKylQr2/ZtUmKYKU2ZJd0Sbw7uJFMOCIJ811pk1qCHJGLHT+mYbckGZmZlFtsqwIG4QjdUm9RwSkPGMsVByQN+lnUUDqQNbfjLnN6A2ZmC19PciuQmNFK5WI28KVEpr2OZ5YSyLldlAT9ELCnc/Rk2kXSYrEGwqq3MyA6RVFaFNvukRRqGwY/6IXFwvSwvupAg1ouXH2XeRYnmSgSUQzgFGiYhGi+SbtQg4O0WrKQLvvFx0xVm74Gold2Ksd8W/GDwYZBJqFfmMpV9xrw8gpQyqDSGDBPAgh3ajsZKqv7YZvWaq7VFa7lUpJkHAN7whqc0RA2TI4wxj74H588DJreY988IWLXVIKm05DEJ7tHvCxwNIBhF25MjG+Po8UsqcA7wLrrPNDAFpBR4gxm3rPf26xTlJ/UmlETt+VrDJSKITYjJG7pIa/t6t82CywCpT3VyPT4gnt+nzX3Oe/Q8e3Eg47E9yWmY+ljew0qnAFgEttaWYiC7S1oH3t22DvOoh3KwkQR4tjhLVNPBcb/h4bZ+u83YTzKFspZvAE3Mdg/I0tDBkUqzy+q5IA5Gu3e7bjeiJg46CROqm5G+Irinp+0trNEYsCIs6cQlzsUFBEFARCUr3+cje0TCdPRhrZF/FSuVhmk0VCI+wO//rzUKu8XU6xKtS/FJrFl80o/rn7LT5K1OXs3LnwWrNiK+hoW7yWlGo64c4DkanBrbiQj4TyBfd0RiTDt/FDxwwbTMIaEtzTP8y71qmnQg9ZpWEAJgVUCk5U1xazutZekdnMNL+HN6GG8ZFXhdBEFPCPFuX1k7NpCsB1XuHOxFtgCAoIfvtkXuxJ6fL7gXTZXUY0QCPbayx37A== X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2bb5da08-df07-4fb4-eea5-08d9b65df800 X-MS-Exchange-CrossTenant-AuthSource: AM9PR08MB6737.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2021 13:08:16.0621 (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: Z2cEDwOTA14R4+JSgvPNoGTrpAvyFZ/HOwKHv58QqT1qN49G7vtUpXn6PueEzaQdQ9ERWcgJYLS81frk35rRupCcu74nRblciZC6h+jOV4M= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4515 Received-SPF: pass client-ip=40.107.4.135; envelope-from=vsementsov@virtuozzo.com; helo=EUR03-DB5-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, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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" _qcow2_dump_header has filter for compression type, so this change makes test pass with IMGOPTS='compression_type=zstd'. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/039 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/039 b/tests/qemu-iotests/039 index 8e783a8380..00d379cde2 100755 --- a/tests/qemu-iotests/039 +++ b/tests/qemu-iotests/039 @@ -142,7 +142,7 @@ $QEMU_IMG commit "$TEST_IMG" # The dirty bit must not be set _qcow2_dump_header | grep incompatible_features -$PYTHON qcow2.py "$TEST_IMG".base dump-header | grep incompatible_features +_qcow2_dump_header "$TEST_IMG".base | grep incompatible_features _check_test_img TEST_IMG="$TEST_IMG".base _check_test_img From patchwork Fri Dec 3 13:07:32 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: 12655247 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 CA1F4C433EF for ; Fri, 3 Dec 2021 13:39:56 +0000 (UTC) Received: from localhost ([::1]:37302 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mt8n5-00057b-P2 for qemu-devel@archiver.kernel.org; Fri, 03 Dec 2021 08:39:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57930) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mt8Iq-0002Mb-31; Fri, 03 Dec 2021 08:08:40 -0500 Received: from mail-eopbgr40107.outbound.protection.outlook.com ([40.107.4.107]:61828 helo=EUR03-DB5-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 1mt8In-00071J-3M; Fri, 03 Dec 2021 08:08:39 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nitPQEafDKZojeXWo3Z+RErk9v7NY94XdNOMpD3NAKy3QO29wKPSpdpNd/dpNSfyBDIgSUZB66VPy/EUDJ8J/VQXkLfj5q9B/Cqgaj4ECp7E+F6ynAzEUJU5rPyIgiUwcDy12Litmu69tWy314mExw5OcksSEdm5YYn8R5EUTkZeOEA8W0gCGsYEeQKD0dLB8oGo5xPnVAa/Ndhyy7QeH7J5sZlJ9A1Ak1uYeMqcHFqVxyoh9ExOMXyHiE+NQaF8J+CpgmT/3v8xGY4SLgolEtpwRj79iP8c0OV04dSVbUexbanalk1iXXj/QrqJO1ANvzKMncevKauT8MkdXKpHmQ== 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=hXu3FmnQgyJT9YuFbr3lHECaL5vJaHc5sDd1ZHx1QRY=; b=JsfRHKzSHMGeWoG0bT27M+SzKSNf+tPOU9gyDgvKkJeTWsMyJ3DR1w/LiFME+1r8LD2MKqmx1ml0aSDA7LXHMytaROqtUqw9wwMy2wijCQsmrH3o2QkveVwwCRNbexXxm662WMxWO5aQMJ4SCyuaoYUFGYQu3QteE9qIKUM994x2mYpOwHoFvc74pSdfd/LvY2dhDC0KPYq5CB6dKxNd+FB439Yeprk/xyOtHqxvrVtiKNLBd0SFTeFDrStyUk0bsWCNNL8xTNxX9u5F9rkjh51v0nmEdbJ9XcmMRvXt5fgjroeTtY/uT2SRRpB1FQqLKkXjy4MJKwTAoOj7EImFvw== 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=hXu3FmnQgyJT9YuFbr3lHECaL5vJaHc5sDd1ZHx1QRY=; b=NmtjPzXnWcgl//kEP9e5ek6JO04KWT5KIm/Ft7Q65gRBJNIp1bFLulvU+Xznumksu7Gwt7ZSLToQzbka7IovLz5ye/dwlFE4Usq+U7RT8kTa+8ItI7pBnGhZ7MsjIv/yun5LtKNgFfQ/OexAjSbb8xO2isPaLW6ivC68v26ZWek= 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 AM0PR08MB4515.eurprd08.prod.outlook.com (2603:10a6:208:148::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Fri, 3 Dec 2021 13:08:15 +0000 Received: from AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a]) by AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a%7]) with mapi id 15.20.4669.024; Fri, 3 Dec 2021 13:08:17 +0000 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, hreitz@redhat.com, kwolf@redhat.com, vsementsov@virtuozzo.com, jsnow@redhat.com Subject: [PATCH v4 14/19] iotests: bash tests: filter compression type Date: Fri, 3 Dec 2021 14:07:32 +0100 Message-Id: <20211203130737.2924594-15-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211203130737.2924594-1-vsementsov@virtuozzo.com> References: <20211203130737.2924594-1-vsementsov@virtuozzo.com> X-ClientProxiedBy: AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) To AM9PR08MB6737.eurprd08.prod.outlook.com (2603:10a6:20b:304::18) MIME-Version: 1.0 Received: from kvm.ch-qa.sw.ru (130.117.225.5) by AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16 via Frontend Transport; Fri, 3 Dec 2021 13:08:16 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a401fe0d-d214-4d50-0212-08d9b65df856 X-MS-TrafficTypeDiagnostic: AM0PR08MB4515: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2201; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UYwr+ZoU8RUWGWRCxpvlgPHWMA31ZdyTOseuwKKkocZl0EOP3m/P4nXhjoUYol2xI7KrMdgKVwzDaAETnPs5BrMLfW8EOCO2WcaSr7UgSSISx1jfpJYbIknhmuLl0OlZPqIJmp8O+SboT8u+wU2JmN3zRBpxnx/aWHZ/p6SF9vQPK3gllKP8ktv8quPsgNldrR9BtwQRo1hWUSnXeRSUT7fsOAfNRRj/05fIRjBtv9nR9DuCx2V2Cczf+XPF2SeIVcx/IeQ1I+sck1PmdgZ+GbPXim7pIk3cQPOYGS4tgqBWK++WXtiYYqh5nk1gHDDI8mlL1WbSL0pWMBmQ9bfKyf7wH4ENEfguMDAirkBAaXwqz3d8ew76lirlpfPmwq8OwlLq5o4JoCFH0EWgSQT7/uCdoYo510fyeQ8k9Ovrt3g4HQ69SRiJeo9LGh0XppCNHr8GzlxqLqgNOCqmq0hTkxCLI7MiMEKGoDyvttAny1pYCdvABx27rz9BvgQCRHwKqv3Kp2jqR+gqFyzxPHclTUYp7hsKSlAjgebLy6326lmntKUKccQtQMkeAvq+kr/zRT2G+I6uC9lJaCpvp8rhqQf7uMJCJgWEh/AHTYn5IqKZqVlo/aSWx88Rv8WOSG9HaOCFA/xsq6A4o51YLY0O42qCztBsknn0qWNm1VV0LCTipJSZUXIyd/qH46aLcoAewjlNkVy0PTYipRwPeALFCg== 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)(2906002)(4326008)(186003)(6512007)(52116002)(6506007)(1076003)(5660300002)(36756003)(86362001)(38100700002)(26005)(956004)(508600001)(2616005)(8676002)(316002)(6486002)(66476007)(8936002)(66946007)(66556008)(6666004)(83380400001)(38350700002)(6916009); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: B1EJa5Jfrm1N2sZSn3nFl4rJQln3Hf0JUgc0GANLt/SPQM4l8G5LRTKt1w8aWFRp4PRkiQRTBAIS/R8EmlsbcqAp69pnJS6+OZf7BdL+wfmgIhIlR+paYSw9mXCaGQyvZtm7d2vJaz4DjjOFrZ4z+AUEz48lppfqDLJB+ZcUhJFiJ8dO0rbL6Glj/uiQK5I7OQhHhG7t6QE5X9YvFEgHBNEgbf8N6crjV/endFfdPhjMYPfanTtL6AUKlUCbFVK7d48J1Qm1piPwb5CrtA9R2O+jWHHNB1yFUCe5VeEplyWjTusEUe6u2wi1Q31oMW3pSkdb+lRpRG+wJLUYYKQcwXbN+eLbsBXAjklmJxxyUvXkX9eBZdEkiwG0w0oWC98mdm5tCDGiFonL6opdDun0oYrmzzQrzE7WrQ8Hj7RlVxs07pV2/T+5vJZUCgW3nrVmqf/F1A4I/u1I8Dm+4Nfsvqi2SZL0TRY+DmHHBnP2Wz6PRManpS8OZMneW/NAK6i8dnOjioG7VylZf3DYneZ3/suXtKUZvvUb6N5Yh5XLRGAN/mtrZuj2/COpKt8McWJYz3GS+NeHTMwA+vPwoX9hKfmc9jqI89ibajaZyAO5zoSY8MxlKSDGH3lhtVt+DN08gbDPWdawhKZ3FSYy3+N4BQULM2cOhl2ymGIyWs4YNBSX/BNH+XFD3BOoBVoPZ7qWSk763N+91TaahnN5NCak7FQ7riX5BOT03RSbbNbL7zf/pWASCvyThM1TLyrBzoeQjFX36Qgg8zU5L3pD+mY8SlAigO51QU4rxT2+PXnERQCh7zMy8DEDOFTPzMTFzjGHtumKSq6AdLn8fylt+nU8wpBKcc0hcWRbRrf/FXtbTkaR67cYh++9DZlGnpbgaiSFARWeUHhE7wqaIcU+Bb6aABMifcPot/VhTELMPu33+Zw6RX90zE9Fev+I7UphqhHDogl4ZhSvf7HXQqDr/146qcYopQbgrLb0SWOaTh5MyokL11m9I94tI8+eaIFiXSg7oGXdvlaxq3zl3tZEqGQ/p94h2tr2g1yC/1gyMLZUCGcYhW3QU5/MjlZ1MylTkKFM1LC2UMpx/HH6QXfvDNPB8jARkPgt/Z+uywDYK0RNqtjZ1P9BEh5lbJMRGhurVDztv3ysnGry0nYWE88SfbB+c5g5fxvovYQP5IdWX6pjJINRPULn2Mh+5T5V/ATCDmk6KJlr/IbR0SRA6CGTAXNsqG1OLCX8fxkM5575CSlIn6r28eDZk83qAEe3dtizlHQmomAqyNVf54G354qwVhyBRhCldaRTxliHvK2W/eIHPiZQmNhPgnEd2LCkmGT2cHmiD21oTqZ2KeCyn9CBh/D42ij0rxv5s6U+oEZKMFwZweEphFNdKtlHhpGtxAxeN7ebl0Q9HRk4Pd3eOcbWDPjAyctwpdHvYW9pJU48KxfuB2k/ASh+zX/IGajqnFs//t/6IOA2z8Y4HU/gz40q/S4qCrP7aP8gV/xmMIvovtQNo9dlxF6fSuHBkhsk0lJdQ/hqZogf5iO9KKar9IWsc+mIEkOGp4Xq6haI3CuJYl/MFqrdUp+awjgJ/sTrXmEXcWGO+nFN2xl0XCEUD37xtz8HqmITR/rJ/t1em66Ly9ekrJ/Nvq2Ypk8PHXSKgD7EvfDLsc9PCpfcHRi0CJDGJ26TqA== X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: a401fe0d-d214-4d50-0212-08d9b65df856 X-MS-Exchange-CrossTenant-AuthSource: AM9PR08MB6737.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2021 13:08:17.0468 (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: +oqdpLSmifq5iUwQs6lzJnMgAiGIz7v9xdRCHyXknodJdv2Fae4kcMH3lK1rp4luI/8N+IjZKg86lI9QDRo9xV+Sti7yM6oNoR0W+LO3qCQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4515 Received-SPF: pass client-ip=40.107.4.107; envelope-from=vsementsov@virtuozzo.com; helo=EUR03-DB5-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, MSGID_FROM_MTA_HEADER=0.001, 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 want iotests pass with both the default zlib compression and with IMGOPTS='compression_type=zstd'. Actually the only test that is interested in real compression type in test output is 287 (test for qcow2 compression type), so implement specific option for it. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz --- tests/qemu-iotests/060.out | 2 +- tests/qemu-iotests/061.out | 12 ++++++------ tests/qemu-iotests/082.out | 14 +++++++------- tests/qemu-iotests/198.out | 4 ++-- tests/qemu-iotests/287 | 8 ++++---- tests/qemu-iotests/common.filter | 8 ++++++++ tests/qemu-iotests/common.rc | 14 +++++++++++++- 7 files changed, 41 insertions(+), 21 deletions(-) diff --git a/tests/qemu-iotests/060.out b/tests/qemu-iotests/060.out index b74540bafb..329977d9b9 100644 --- a/tests/qemu-iotests/060.out +++ b/tests/qemu-iotests/060.out @@ -17,7 +17,7 @@ virtual size: 64 MiB (67108864 bytes) cluster_size: 65536 Format specific information: compat: 1.1 - compression type: zlib + compression type: COMPRESSION_TYPE lazy refcounts: false refcount bits: 16 corrupt: true diff --git a/tests/qemu-iotests/061.out b/tests/qemu-iotests/061.out index 7ecbd4dea8..139fc68177 100644 --- a/tests/qemu-iotests/061.out +++ b/tests/qemu-iotests/061.out @@ -525,7 +525,7 @@ virtual size: 64 MiB (67108864 bytes) cluster_size: 65536 Format specific information: compat: 1.1 - compression type: zlib + compression type: COMPRESSION_TYPE lazy refcounts: false refcount bits: 16 data file: TEST_DIR/t.IMGFMT.data @@ -552,7 +552,7 @@ virtual size: 64 MiB (67108864 bytes) cluster_size: 65536 Format specific information: compat: 1.1 - compression type: zlib + compression type: COMPRESSION_TYPE lazy refcounts: false refcount bits: 16 data file: foo @@ -567,7 +567,7 @@ virtual size: 64 MiB (67108864 bytes) cluster_size: 65536 Format specific information: compat: 1.1 - compression type: zlib + compression type: COMPRESSION_TYPE lazy refcounts: false refcount bits: 16 data file raw: false @@ -583,7 +583,7 @@ virtual size: 64 MiB (67108864 bytes) cluster_size: 65536 Format specific information: compat: 1.1 - compression type: zlib + compression type: COMPRESSION_TYPE lazy refcounts: false refcount bits: 16 data file: TEST_DIR/t.IMGFMT.data @@ -597,7 +597,7 @@ virtual size: 64 MiB (67108864 bytes) cluster_size: 65536 Format specific information: compat: 1.1 - compression type: zlib + compression type: COMPRESSION_TYPE lazy refcounts: false refcount bits: 16 data file: TEST_DIR/t.IMGFMT.data @@ -612,7 +612,7 @@ virtual size: 64 MiB (67108864 bytes) cluster_size: 65536 Format specific information: compat: 1.1 - compression type: zlib + compression type: COMPRESSION_TYPE lazy refcounts: false refcount bits: 16 data file: TEST_DIR/t.IMGFMT.data diff --git a/tests/qemu-iotests/082.out b/tests/qemu-iotests/082.out index 077ed0f2c7..d0dd333117 100644 --- a/tests/qemu-iotests/082.out +++ b/tests/qemu-iotests/082.out @@ -17,7 +17,7 @@ virtual size: 128 MiB (134217728 bytes) cluster_size: 4096 Format specific information: compat: 1.1 - compression type: zlib + compression type: COMPRESSION_TYPE lazy refcounts: true refcount bits: 16 corrupt: false @@ -31,7 +31,7 @@ virtual size: 128 MiB (134217728 bytes) cluster_size: 8192 Format specific information: compat: 1.1 - compression type: zlib + compression type: COMPRESSION_TYPE lazy refcounts: true refcount bits: 16 corrupt: false @@ -329,7 +329,7 @@ virtual size: 128 MiB (134217728 bytes) cluster_size: 4096 Format specific information: compat: 1.1 - compression type: zlib + compression type: COMPRESSION_TYPE lazy refcounts: true refcount bits: 16 corrupt: false @@ -342,7 +342,7 @@ virtual size: 128 MiB (134217728 bytes) cluster_size: 8192 Format specific information: compat: 1.1 - compression type: zlib + compression type: COMPRESSION_TYPE lazy refcounts: true refcount bits: 16 corrupt: false @@ -639,7 +639,7 @@ virtual size: 128 MiB (134217728 bytes) cluster_size: 65536 Format specific information: compat: 1.1 - compression type: zlib + compression type: COMPRESSION_TYPE lazy refcounts: true refcount bits: 16 corrupt: false @@ -652,7 +652,7 @@ virtual size: 130 MiB (136314880 bytes) cluster_size: 65536 Format specific information: compat: 1.1 - compression type: zlib + compression type: COMPRESSION_TYPE lazy refcounts: false refcount bits: 16 corrupt: false @@ -665,7 +665,7 @@ virtual size: 132 MiB (138412032 bytes) cluster_size: 65536 Format specific information: compat: 1.1 - compression type: zlib + compression type: COMPRESSION_TYPE lazy refcounts: true refcount bits: 16 corrupt: false diff --git a/tests/qemu-iotests/198.out b/tests/qemu-iotests/198.out index 3952708444..805494916f 100644 --- a/tests/qemu-iotests/198.out +++ b/tests/qemu-iotests/198.out @@ -36,7 +36,7 @@ image: json:{ /* filtered */ } file format: IMGFMT virtual size: 16 MiB (16777216 bytes) Format specific information: - compression type: zlib + compression type: COMPRESSION_TYPE encrypt: ivgen alg: plain64 hash alg: sha256 @@ -81,7 +81,7 @@ virtual size: 16 MiB (16777216 bytes) backing file: TEST_DIR/t.IMGFMT.base backing file format: IMGFMT Format specific information: - compression type: zlib + compression type: COMPRESSION_TYPE encrypt: ivgen alg: plain64 hash alg: sha256 diff --git a/tests/qemu-iotests/287 b/tests/qemu-iotests/287 index 5427ad5456..6414640b21 100755 --- a/tests/qemu-iotests/287 +++ b/tests/qemu-iotests/287 @@ -61,13 +61,13 @@ echo echo "=== Testing compression type incompatible bit setting for zlib ===" echo _make_test_img -o compression_type=zlib 64M -_qcow2_dump_header | grep incompatible_features +_qcow2_dump_header --no-filter-compression | grep incompatible_features echo echo "=== Testing compression type incompatible bit setting for zstd ===" echo _make_test_img -o compression_type=zstd 64M -_qcow2_dump_header | grep incompatible_features +_qcow2_dump_header --no-filter-compression | grep incompatible_features echo echo "=== Testing zlib with incompatible bit set ===" @@ -75,7 +75,7 @@ echo _make_test_img -o compression_type=zlib 64M $PYTHON qcow2.py "$TEST_IMG" set-feature-bit incompatible 3 # to make sure the bit was actually set -_qcow2_dump_header | grep incompatible_features +_qcow2_dump_header --no-filter-compression | grep incompatible_features if $QEMU_IMG info "$TEST_IMG" >/dev/null 2>&1 ; then echo "Error: The image opened successfully. The image must not be opened." @@ -87,7 +87,7 @@ echo _make_test_img -o compression_type=zstd 64M $PYTHON qcow2.py "$TEST_IMG" set-header incompatible_features 0 # to make sure the bit was actually unset -_qcow2_dump_header | grep incompatible_features +_qcow2_dump_header --no-filter-compression | grep incompatible_features if $QEMU_IMG info "$TEST_IMG" >/dev/null 2>&1 ; then echo "Error: The image opened successfully. The image must not be opened." diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter index 2b2b53946c..75cc241580 100644 --- a/tests/qemu-iotests/common.filter +++ b/tests/qemu-iotests/common.filter @@ -247,6 +247,7 @@ _filter_img_info() -e "/block_state_zero: \\(on\\|off\\)/d" \ -e "/log_size: [0-9]\\+/d" \ -e "s/iters: [0-9]\\+/iters: 1024/" \ + -e 's/\(compression type: \)\(zlib\|zstd\)/\1COMPRESSION_TYPE/' \ -e "s/uuid: [-a-f0-9]\\+/uuid: 00000000-0000-0000-0000-000000000000/" | \ while IFS='' read -r line; do if [[ $format_specific == 1 ]]; then @@ -337,5 +338,12 @@ _filter_authz_check_tls() $SED -e 's/TLS x509 authz check for .* is denied/TLS x509 authz check for DISTINGUISHED-NAME is denied/' } +_filter_qcow2_compression_type_bit() +{ + $SED -e 's/\(incompatible_features\s\+\)\[3\(, \)\?/\1[/' \ + -e 's/\(incompatible_features.*\), 3\]/\1]/' \ + -e 's/\(incompatible_features.*\), 3\(,.*\)/\1\2/' +} + # make sure this script returns success true diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc index 5dea310ea0..9885030b43 100644 --- a/tests/qemu-iotests/common.rc +++ b/tests/qemu-iotests/common.rc @@ -699,6 +699,7 @@ _img_info() -e "s#$TEST_DIR#TEST_DIR#g" \ -e "s#$SOCK_DIR/fuse-#TEST_DIR/#g" \ -e "s#$IMGFMT#IMGFMT#g" \ + -e 's/\(compression type: \)\(zlib\|zstd\)/\1COMPRESSION_TYPE/' \ -e "/^disk size:/ D" \ -e "/actual-size/ D" | \ while IFS='' read -r line; do @@ -998,12 +999,23 @@ _require_one_device_of() _qcow2_dump_header() { + if [[ "$1" == "--no-filter-compression" ]]; then + local filter_compression=0 + shift + else + local filter_compression=1 + fi + img="$1" if [ -z "$img" ]; then img="$TEST_IMG" fi - $PYTHON qcow2.py "$img" dump-header + if [[ $filter_compression == 0 ]]; then + $PYTHON qcow2.py "$img" dump-header + else + $PYTHON qcow2.py "$img" dump-header | _filter_qcow2_compression_type_bit + fi } # make sure this script returns success From patchwork Fri Dec 3 13:07:33 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: 12655249 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 6012DC433F5 for ; Fri, 3 Dec 2021 13:42:34 +0000 (UTC) Received: from localhost ([::1]:43974 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mt8pd-0001P3-0C for qemu-devel@archiver.kernel.org; Fri, 03 Dec 2021 08:42:33 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57970) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mt8Iu-0002Q3-E7; Fri, 03 Dec 2021 08:08:44 -0500 Received: from mail-eopbgr40107.outbound.protection.outlook.com ([40.107.4.107]:61828 helo=EUR03-DB5-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 1mt8Iq-00071J-Qf; Fri, 03 Dec 2021 08:08:43 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TuiB2F79jU07ApJyYWZvLDrZffp/+upLEa/yJmVvdWLh9hiQSVhzoKsxLtAh1jT51c54lt+f8rltCw6eD/urueCWgvRDPml2ZOHxj94wKtrIw/Ggy4rGzJeApbGhYnSmbSNQqJsN9EtLo49j4QBWxX1bcSWovwsYtDZ+3mng8JwddXr8RgJkJbFPrXv6t/7Lip0k2METOP44KZA+u4loRrF1lfSKR94ihCbBBLe1ujLZrkasx/B0E06r0844cbe/WVpPk5aUxO9W2UuZcg0UJs/KtLLWebNrcrdaASvwz5rq3e2MPbtZYauQqKKsfhgW6Ii0vpdZ4S4+iPBSYMa2Aw== 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=5RU88eMYqH5FMqCplfNXc+E/GqCiMwnkaRc630GvQCs=; b=XhhLS5oDEXCp71LMecLyjrSNdrJy7pXeoZPCZUfLVctVTw1tFi6n8Zu7+jZvMhNmI3Xa0FmAifzM22sw3Qdq1HIMJmyJ4U7AcTFu0En3JzRmQSiSOWtC7Ai/6OpJFgLEJNTAsXnIpG0rHrq2O7tFu31MwpRY8RJHCOxygZi0WBk1rQNwWQWHDnDpcGf/heEZ1uhfV9ddfgp822zpU1qa8liHmiFIsn/wQLrwaWO4NgkeVO/rxQTQpAVmbbt8HoB7mh0Ar6CGu3/NY/LsRm8l3KPKdHUNjUrJnboDaPpw4r6FNiYwCQULc0kB/1c1xiEK88aBbTfIX1v13iK6Z5m/kA== 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=5RU88eMYqH5FMqCplfNXc+E/GqCiMwnkaRc630GvQCs=; b=RB07rdm0EO8I8XCHwbH8wltK7r8CkHOghVp0Pffr26Hd1XGqkyqZCg/ynN7uRLkIjVJn9kMz3kaxN3FOJRaEK693KeXhOsMjaOVzf6A9U7zX4tnlEgTxdepl8unGnVBBYXYi7unVbbUPyauNht7Ltsb0Y+K41rK4rc06uCX2srY= 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 AM0PR08MB4515.eurprd08.prod.outlook.com (2603:10a6:208:148::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Fri, 3 Dec 2021 13:08:16 +0000 Received: from AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a]) by AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a%7]) with mapi id 15.20.4669.024; Fri, 3 Dec 2021 13:08:19 +0000 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, hreitz@redhat.com, kwolf@redhat.com, vsementsov@virtuozzo.com, jsnow@redhat.com, Max Reitz Subject: [PATCH v4 15/19] iotests 60: more accurate set dirty bit in qcow2 header Date: Fri, 3 Dec 2021 14:07:33 +0100 Message-Id: <20211203130737.2924594-16-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211203130737.2924594-1-vsementsov@virtuozzo.com> References: <20211203130737.2924594-1-vsementsov@virtuozzo.com> X-ClientProxiedBy: AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) To AM9PR08MB6737.eurprd08.prod.outlook.com (2603:10a6:20b:304::18) MIME-Version: 1.0 Received: from kvm.ch-qa.sw.ru (130.117.225.5) by AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16 via Frontend Transport; Fri, 3 Dec 2021 13:08:17 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 48c649e8-bd18-4ca4-b67a-08d9b65df93b X-MS-TrafficTypeDiagnostic: AM0PR08MB4515: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:256; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: W5rS3Ck1jlnkXNrbqd01twTUsSgtJLYLUicxvPJmok4QiTWXOjfF0EqOxzGrF1vX/JJe+ZM9C/IW+7vHUtkkqV1+lrlDKlV/lK/+QmMJ9ZLLJziXPPyfJM/NdtlohAa/gYhJqDH/S2Io7DkCN/7eiYiaCpe+/XoLdHy1t+di5e8NFVOMB4UGs9nYFmqPMwyj97WQW3giEqgjh8v2xy2EV8GeDRT6Dh8qNOBi8pTbtnJeYwHuLL8736XolyLg4M2Dq6qfsum+BM8+6otV+4gMv/1abSoqur9VNEmmG3g+0W1l0XIr9HkK6Edp0lyz3mEsyijoMnhJr48EaNpNzZg7Ktzhiko2zbF7UmyRcOWvk7hFBynxafGVy9vF38attQ2q7pTZ4yKjSXZPL4oVepj/fyZ8d+SoyA11bdTSfOVIhvUDjEn0Rqi6MCHVIL6ABxA/1R/4UdVl2B0xR37Bxeox+eirBeCAuzuTYj2kFlcysNp28Mv9A7vZ+fj2vW6h66fn6pcV25BsCzbxJEkkYqudCGMNuoX5QYZoAvo8bnby/HAY7FH70zkG8rg2E9D36ovCmScbLeAT1pyaCeLgcJNSBJomDbQ8VRxoadqcDb4Rrl3jm18yCIXhHcHTjehRyq+iKt2DCm39yMD1FfzYEDNPdpWJCcrIgUOD0uuHsuTvPkZFnzfF4+oX1j3qUEuYeoyduLeBvqXPrG1dZFkDmYJlzz3709lPHwEL/N2Q2p9L7hc= 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)(2906002)(4326008)(186003)(6512007)(52116002)(6506007)(1076003)(5660300002)(36756003)(86362001)(38100700002)(26005)(956004)(508600001)(2616005)(8676002)(316002)(6486002)(4744005)(66476007)(8936002)(66946007)(66556008)(6666004)(83380400001)(38350700002)(6916009)(14143004); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1TxjHayuTLlxbCCHpcm+h0dK4LBplIoq3GoLhm5jckBXSulmpplDrzI5Ow7leSvAVf9/RgN0ZgbJ3MNMdPpb4y9L0Sn9XKrElctuypUy3FS2bOGRWBv2IdZ4+YIXlZdI3N4MgvXhLAQHT8qUQZ1kLU1ExpaBdQJRRsIp2viIoY+o1Q6uclN8t8c88LXc35GRNrWI4PSmPJdnUwzUYJng5oJ0WzV2JAnF449RmU5Iy6X/wpBHvfn+xHwYRHeYNCZw/+1EoSJV04Q6S8z1Drv/ifkzmlhAlrtEKpz2vgQfubA377JPXKjeQPIORUcUKhBu7qaD7ezSvP29QEcGaq5MkDDrP3LoPTs7qiVBZTsWSUa2diyPvZhx69UAvKeNVyZVoveTLDxKJzV3FojTk9iQy4gk0gSPlvQz+ZY+LiaSviVBmTxVfttdkAidQ5ahALvI4daO4nWilM58UgpALv77spGAUhptzinNqtjBPAyHiot1QboXMkacxnYQwT/fZskOjeObzorioRkig289sZvFl2njLlrf2NzoAZGiqz8YhSYdFAh0sgGRO6IPZxbMZwTVRU77bDtcDKg58l4Bbf+r1YGKuyh02kJPniSYJBYAhI/CWU+8Wyq+fLdOZUzA9PYgVdv4sqYt23TN/u+NjrM/Pv7ZqI7y4YBq74zUj/uQO4qnLYiN0e/MrPzsn8dwhQV8AzpmfX/eln4kJxcO4YOH4m0iiq+8MHstXkm/VhXxvMGDQ7D5Qui8lfiKga6MG7l4J79FdrQpfZKxpGDsdasttdydNkfvsiwAXqC/jxe77szBv2/Dm+Y6JMWIvgLAq9igXhC5fetrJuSA6SX1JEnEIhBXVFZP5+WI7RcAGgJg4nH6SHl8EnDNqBJnyuj0YvPKwMlOHNEXy2SFeYY1ru3Eo0ZFa8KiAIYYlr/BwJ0mE8jlCwhv3XHyHuR1wN+4pPnNrSBDb/KoWYKLNnUVplH88zy2mxwbhKoI4h2+SrCfFQkvBvmi6tMIAY5/7ftcNOOUAOAOl3O/ILwP7ISgrVMGb1PmA3FDdq7sfuVSi2O2a3GOHjHDWCB4SdZHWkb5UfZ2n6pc2G6MkrgPpdoTPcEYb07Sbfwn/NsDAWAR2HMaGJ/yRgz0X40A7sSlOmm3JvMj1Z5CXQsctsbLA8B3Qewor2ol7SFanaaiLWNRniLHQzwewyo0XuQmg94+Z0HacyJ9bALeFVkefnAqxgA4BokF6758qQuuVndYfhwAHjml2VPuht5WbnHkjMdKsQiiBtbeTsWh8JFqHQyI+VFs4+JmHaMTAt2+NhZLdm0T7OaIw/A0e+3WIUcP6RaIFjFqtHH2NRArLoP/xpqQyMR3Aq08si49d9sWJAYsRn1hKloXBET6kgio6VIToeLC6oeV73S3yfoKZ89f0/8XHPJOOik+KQw4C5st4kLDUYp0SeRN1WxSE8T8xhc3FM7vs4rH8rpfFABvbl3Yuj4HuuO9zPZP75A/RKP9+jJg9W7bH0H0Q2sYeblqt1WLrWoNow1/+yv96Dyzx+fW5J0rTJY3GoZhqnCiI6duISIyhILsVbjNWQBJ2hP741VouuV0O53kk2ugcpLTPPVX1Mb57ly3P9RtBX9NI4gFDwOyp8NHkc5f7BvoL/aNdXnve0DfEBkeCj0/yD/E+AwKm+7tExCIakJoXQ== X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 48c649e8-bd18-4ca4-b67a-08d9b65df93b X-MS-Exchange-CrossTenant-AuthSource: AM9PR08MB6737.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2021 13:08:18.8399 (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: 4/xPEfkBd0wkqXzXnkHrIEYhIV9tVV0Uut1g/3XMmFquKJRDqQayodA0of15HywvrACOLt+MLtnlHEzGiCgHjdW8A8oTsvfj32RkmI/ceCo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4515 Received-SPF: pass client-ip=40.107.4.107; envelope-from=vsementsov@virtuozzo.com; helo=EUR03-DB5-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, MSGID_FROM_MTA_HEADER=0.001, 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" Don't touch other incompatible bits, like compression-type. This makes the test pass with IMGOPTS='compression_type=zstd'. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/060 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/060 b/tests/qemu-iotests/060 index d1e3204d4e..df87d600f7 100755 --- a/tests/qemu-iotests/060 +++ b/tests/qemu-iotests/060 @@ -326,7 +326,7 @@ _make_test_img 64M # Let the refblock appear unaligned poke_file "$TEST_IMG" "$rt_offset" "\x00\x00\x00\x00\xff\xff\x2a\x00" # Mark the image dirty, thus forcing an automatic check when opening it -poke_file "$TEST_IMG" 72 "\x00\x00\x00\x00\x00\x00\x00\x01" +$PYTHON qcow2.py "$TEST_IMG" set-feature-bit incompatible 0 # Open the image (qemu should refuse to do so) $QEMU_IO -c close "$TEST_IMG" 2>&1 | _filter_testdir | _filter_imgfmt From patchwork Fri Dec 3 13:07:34 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: 12655251 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 A3A53C433EF for ; Fri, 3 Dec 2021 13:44:54 +0000 (UTC) Received: from localhost ([::1]:50358 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mt8rt-0005kz-Id for qemu-devel@archiver.kernel.org; Fri, 03 Dec 2021 08:44:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57980) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mt8Iv-0002RF-Ru; Fri, 03 Dec 2021 08:08:46 -0500 Received: from mail-eopbgr40135.outbound.protection.outlook.com ([40.107.4.135]:40808 helo=EUR03-DB5-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 1mt8Iu-00071Q-1X; Fri, 03 Dec 2021 08:08:45 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fVY4xXM481F1wGAqXr5aYH2Wv8M41q6Nx8wH3VsFlqyXGg4/I5Umx5oEkUsnf3s4ArmiKtkYUA/o8DphRWjAhx2knMEHJMMWUGRPrqFkbc+7lDkwypFUIiCuw+CWRGjIbKXJIN3nlw2sfsJTKz4Z4ohvW8vEHu57s2UV+ZXilQUYnOipQHaL6fSWv7/JtZcLxSy9NZuvCevxJXUn6fjRUP1JbhRyGkirHmpTpSRmVzZFjeuLeKhYx42E5NbL/fD4r0kQo+rb9sCipHOf+NyU/5cZjdRQrNWri3ZFNEO8xCiDGfSPY1wbYauf+R0UDYZdv2bkIiEbBlRD0moCIAFMSA== 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=YBPMoASQarVNPpivG6QfxwVne5VyP6pZdhBUnZyQXb4=; b=oR4SrMat31y9NPrf6NNWh99QJ2rxl7fUu3C3vKNW2sP/fRn/CtgsX9Wes5FlkZFLavNrJwGhtYlgeOI5d33Yw1Q0UMrxCuGjGmLcshhq2y1lGPJz/Ftv4W/O9b/ojznN8LxjZZh/HJa/O2LxVCG2ULfjXUNoA4lAkhNNatbPnIWgZIE0PZFj2ARJOtc9T5x38r4XSXNZDW12D3B0Ev/vHpY0Exak1X/G8R/je8vNNV9lH1/RvAOA1m+z2yizMp+ky9/0MJLtpTbj6UOyWGLmBukU6DQ9o0lwRxfvqJbq7K2+Phf2f/9fd7V059iZBdek0wyXtGXadodmnIkzdI4UoA== 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=YBPMoASQarVNPpivG6QfxwVne5VyP6pZdhBUnZyQXb4=; b=b1tjXUFKy/P0Wxd18ABEmHMsIgV2jVk/hQfJXl4BdTuuuGnR+nIGUM0Ppgg2WIDZ03aHEuh7PmuOearu99ueuF/HI3yyNqULDevo+Ur9fR3zwa5tgYB52lioc9plGxSmKtA/0W9ORHWcxfZor7YQrg8DOIo3beui+Mgpkckxd+U= 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 AM0PR08MB4515.eurprd08.prod.outlook.com (2603:10a6:208:148::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Fri, 3 Dec 2021 13:08:16 +0000 Received: from AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a]) by AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a%7]) with mapi id 15.20.4669.024; Fri, 3 Dec 2021 13:08:19 +0000 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, hreitz@redhat.com, kwolf@redhat.com, vsementsov@virtuozzo.com, jsnow@redhat.com, Max Reitz Subject: [PATCH v4 16/19] iotest 214: explicit compression type Date: Fri, 3 Dec 2021 14:07:34 +0100 Message-Id: <20211203130737.2924594-17-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211203130737.2924594-1-vsementsov@virtuozzo.com> References: <20211203130737.2924594-1-vsementsov@virtuozzo.com> X-ClientProxiedBy: AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) To AM9PR08MB6737.eurprd08.prod.outlook.com (2603:10a6:20b:304::18) MIME-Version: 1.0 Received: from kvm.ch-qa.sw.ru (130.117.225.5) by AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16 via Frontend Transport; Fri, 3 Dec 2021 13:08:19 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b811c438-817c-435d-e127-08d9b65df9f6 X-MS-TrafficTypeDiagnostic: AM0PR08MB4515: 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: a9DL8bVK06L0wC++U6RNygTrJ7MHhB2DpUkBWXmvpyBMoGKpyn4YcVXSyWsf7TauIXdR4u2QwuCwfdI68mEsmmYd+/a5eVhsABTGVuAguWYZVHSuRXrTySTGPOFpzGd6YIgAgpIou8rlNt0NIPIlRw24C3GIdxc+7pPjN6rdw/gGA/SEqeTUf2DnBI4a2np0LOKNEUpDF9xwAFBq9mNYl+W4C7MKg1pPKxROiBt76PdG70ialcg9gJubK753YfJFvC+INm+ZroouNE9ICXDcn3HHo1XBHuMZV5tLTU6PQNmZvp6qndUKef5VpXljhl5eBdi/SUw2BXaRNKWWDFSnMqZ1gewuEkfEDfD4uBBCXjIK2x1D9bBIWY0Wm64PD7GIQtb9lTCjE9La0KyuapspqNvsOZL+/FzQp5ALTSrwTDH+JqY7h6V6vz+l4Z6y4g62RVTW8UIpgUwgZ+hlA0sjt1a+U0QNe172Cg2JGPXrT0uz7O+emhOt6EMrzW8HkK8vtjBxkUgWk8VKDtbaTnNL9uX3Ey2SCZE21oNvyEBgFEde8qwitaQIhzOyzoCNrXtG6SfZ4KMtZDpPjAOaVapX/4ZP4HVTVmOKay30PJ9HiDxRGGqclurC4tFM3BAU6lIaqmm4lOBJrePbRQcUDPomceGSWbR1B6aTZsZzxBFqt/VK4lBbIBCpPg5EfHasJsCum1b4n5/qBs/zt21BtAm0GQ== 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)(2906002)(4326008)(186003)(6512007)(52116002)(6506007)(1076003)(5660300002)(36756003)(86362001)(38100700002)(26005)(956004)(508600001)(2616005)(8676002)(316002)(6486002)(4744005)(66476007)(8936002)(66946007)(66556008)(6666004)(83380400001)(38350700002)(6916009); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: DK7ST1dZua+L4Lchd8YNA6rabu0h9vgKG9vx+Nt6cusNfy/u385GEDozWCYsyKXUlN/aTx0lrrIMYZo0vTcWxZ3Z5ZGPGk+SiH1lbgQkRFUUE6TO2xkywGLQjoIIZxy+0LeevKJzyddQPwrT3vEDi9RDMGaySyUO2A+6bkFMEhLsgyfvu4Dbq39Oz4Q6KmOrjG7rDjxPBBwAeGxBAVXoZK5r2XrTb5K2QYj+mQqt48bvnTUWdI95YRRV/GdVs57cAUQJCWtOsDF2x7KWS/oYeLLW/x40B/5ouoJlfEqJdgOrCv1wP/aEph/YPWtWxpl+bIQDm5ToY30x/8dU+ejT4BE5kHiZysE1sAwXChq5gsX9PDfT2eAsqOjTb1F6YlbIDudCxfEEcA7inxb+Fmimng8cyOv5YwUd6uexHI4Mqur2SL1ee/zF/m+v4DvDRqgppgGkeEx0bMZFbLxsiYwhL3sC0tiilfjrGRaf1o7JTkvgWsEfyplfwSTUTV/SNNO6riOlMcnxIQP6piaUnuUhIwFCBe9GAyCz/TeROrNkQf4T2py/936TQ2TmX5FiIp/mNIfh5CoC6xDxi/M7CwJqmo/9VkOLWOP/ayAIkybd76zkHgUgggikBzgQPDR2oA3zGpoLVghhkjq2oP6Mji+/bBaPvfzqxBQOdn55iB5/4FkXJ1lDeaOV0YZ4Ei84gBzUFk+MgetP+TI+kt04csKXzRqc/0bUOde+2CP6dDa4FHIVfzmFmOVRfmMGx7LnfLjOWllc8fdDylFn6zptxnOB50cfG7yD9lVj5jvmTL1de2UjUW5vqlV1Ra85A1wP7sWVQhwlJGOFEqWfe/+I7HMM92R2bdkxYDbZ21CHVVyFcS5QcspA3Yriwt3Dy0nRVYL7+87vmgUNQkWcweohnXDL2JEVkaQOC31y/HMX3RLBazrnmNqtcq4CDPfP27tB5C0P5dWZwU7rwo6V7wclfnTJlkILsXpUkpILvYKXPBM9zINJhqw4+ZaAeQOzK/5gDqfcUeqFn82qX1WXz7GRYzilKdQvx003+OWlgX+/zjTccHN7Rq7Mi80PT+A1Ri6tyQBsZg/pPbgn2QsfCHEOdAPfCzIGDXiCeQycRSInFvptIZwTZVUb4RK8FI/vn3tu0o7WqleTaPG+2cPMjLTVQEsRUfzLDFlKzniixHeAKeIyZLTmDJyQl1VgNPu9hWkUAsbBXcN2q5SzsTKAvcdqMuoGXAY7of5i2J0F3xZNJHr2xloDeWX7oQrLJoGK+RpyOPdl2A8wgZyMmoNUmGeUFAEUMgvuNwA6E98dJyGhjgGslLmLpuWIgWd7RBsIcTyjR7PRkDHnZfr5R/R+snausdQNFx+gldRG+wAb5bgGoQJIaD1Pqn2s46ZKlhV8/YoG0X6HXmxLoqQYC4wR0b3xWtYQ7KmrHfZ2SoKMHa7HvAa3aqBzbaIv93XM7GeloRyK+sajgHCe3Z4klN/KP3bFWCP02Gep1GUO1iGrCqAeMi9/7NHWADanD0iv02yNPav7TC7AbjQXolwU7Dhr/NjrOrpgOr9ChMB+cP90xrqge3uNfKo0X/0v1hzKsdOF6LbNN0MIIvsmjGiUi68GjQNI+HPKULqqdB6C3Rta39qkXOLkBffbjYD6SkVQYIMyaXNXa45Mec8MA9efRQdf6Vxz2SVpbA== X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b811c438-817c-435d-e127-08d9b65df9f6 X-MS-Exchange-CrossTenant-AuthSource: AM9PR08MB6737.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2021 13:08:19.3128 (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: iDWxu7d/LgU5sNNrkNQyiEL5S5bwEuakEkPMagU1iu8uebekTQgeDAkHk1ofstqusMsUC/FB52EcnhHounbzhsRZpA+bZRuG29i0ZmWF5os= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4515 Received-SPF: pass client-ip=40.107.4.135; envelope-from=vsementsov@virtuozzo.com; helo=EUR03-DB5-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, MSGID_FROM_MTA_HEADER=0.001, 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" The test-case "Corrupted size field in compressed cluster descriptor" heavily depends on zlib compression type. So, make it explicit. This way test passes with IMGOPTS='compression_type=zstd'. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/214 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/214 b/tests/qemu-iotests/214 index 0889089d81..c66e246ba2 100755 --- a/tests/qemu-iotests/214 +++ b/tests/qemu-iotests/214 @@ -51,7 +51,7 @@ echo # The L2 entries of the two compressed clusters are located at # 0x800000 and 0x800008, their original values are 0x4008000000a00000 # and 0x4008000000a00802 (5 sectors for compressed data each). -_make_test_img 8M -o cluster_size=2M +_make_test_img 8M -o cluster_size=2M,compression_type=zlib $QEMU_IO -c "write -c -P 0x11 0 2M" -c "write -c -P 0x11 2M 2M" "$TEST_IMG" \ 2>&1 | _filter_qemu_io | _filter_testdir From patchwork Fri Dec 3 13:07:35 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: 12655163 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 3C79CC433EF for ; Fri, 3 Dec 2021 13:22:43 +0000 (UTC) Received: from localhost ([::1]:35704 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mt8WQ-0000Im-9D for qemu-devel@archiver.kernel.org; Fri, 03 Dec 2021 08:22:42 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57756) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mt8Ib-0001zb-3Y; Fri, 03 Dec 2021 08:08:25 -0500 Received: from mail-eopbgr70115.outbound.protection.outlook.com ([40.107.7.115]:63695 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 1mt8IZ-00072T-BS; Fri, 03 Dec 2021 08:08:24 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N2PWbKp1Dt7+izHAI369ZnQ/tnZnbJ2MxwnnuIVoTEQvs/GPdpKjt+J6HbG+HvO0ExmU/bT+w9GdqPIwAEAldiU93UieLKMty4obQQNnQkZh7sCofR44xRifGv67xtHf+oqRo8ljt8cA/AMM+hGRndldFSj2nc7If/ixs5vn8+IqjMwcjg8MIRE8BLkLptoRg5A3U9zYpTO9El02LygmJHfAsL4aYh4L1EVtAM6SxnkG+fWznM6BOiuylp0fEffKtzveHL6KDIUW9vLHpxsXwTAFsnoBqDSqsuw/+MTVKrC2nG9m9q1SryPZqWwpN2Nu+3794j4ADc7VIvKmx/PqKA== 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=OMwXdZz7gBViyPMoWfGcrwQnD0M52NhNqrghnGxkZ4o=; b=kIa6QYePOIc54nKdm4mPtJ5Qhhn3c2b6zkpQ/LVLhwhk//b1I0wDF+ULCALO65pR20Nb4ja8mXuiWW8qKHYst2+fSbYoaFgrJ8N5XwUMoXxb1PCh5KtFsAuYSvdV0WeYPMsFto9o08TKYi9AjNn3CZ6TK4bw38ulZIp596/r1fBE6nsp1gpc9+GWiWEqK06Ng1QcWnpmagLItNz/FSRDnstqlJVzlCDrpQo39YJRmuVQO2s5frh+Rdeq/Iix6ofDdPMWjfk4TqaGI/BuDYYJv49KJayrDVLkYbO59uHnbr/a5CwopxbqGxDzx8udgYQy/ES6SKqgReI4/5WoSf2KZg== 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=OMwXdZz7gBViyPMoWfGcrwQnD0M52NhNqrghnGxkZ4o=; b=QMJXB1S+f4drZlxTfrwWEn74iQFkoYFJje+JMDs5mo456f+gie8smBVW+GOb1cbx943UomgtMPG8t7CasKgQenwpPOK8lqiceZWs4wo+otNxaIrmpi+oti0SxEwuodOfdaMyMbrE4PnhCwrYhL8KUMH6SQMasEqVtBrYQzGYY+w= 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 AM9PR08MB6968.eurprd08.prod.outlook.com (2603:10a6:20b:417::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.21; Fri, 3 Dec 2021 13:08:20 +0000 Received: from AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a]) by AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a%7]) with mapi id 15.20.4669.024; Fri, 3 Dec 2021 13:08:20 +0000 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, hreitz@redhat.com, kwolf@redhat.com, vsementsov@virtuozzo.com, jsnow@redhat.com Subject: [PATCH v4 17/19] iotests: declare lack of support for compresion_type in IMGOPTS Date: Fri, 3 Dec 2021 14:07:35 +0100 Message-Id: <20211203130737.2924594-18-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211203130737.2924594-1-vsementsov@virtuozzo.com> References: <20211203130737.2924594-1-vsementsov@virtuozzo.com> X-ClientProxiedBy: AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) To AM9PR08MB6737.eurprd08.prod.outlook.com (2603:10a6:20b:304::18) MIME-Version: 1.0 Received: from kvm.ch-qa.sw.ru (130.117.225.5) by AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16 via Frontend Transport; Fri, 3 Dec 2021 13:08:19 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ba41cce8-acd9-4515-2bb5-08d9b65dfa4d X-MS-TrafficTypeDiagnostic: AM9PR08MB6968: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: v4d5YtqrKtg0U4LeVNE0Ov9kbk0YzFxeNrqtROp9SqeL0wEjS4OZvkZbCAQrH8F/pXVWMYePvr/WjL5sCo0zzg7kCU+vGlt7TcfxaW6MoAtqKOV3Kr1ueyihWagJBMZbj0c58NSay5BNKzg/WODp5MDteXqQFz/spNHh+Ru5Fhv7U8kYM1iP6495LsA9opZoR0N+viLAl45bDCULxmHTo6Uc6h9KU2AcFNqkwDDJ5XZ4f24oJwULstBX7WW03/ZhcbGovCuxLqZNzmTvUTe0XetIVCMRNhkU/Py2C4n8tdi4Q6HXwudkEx+IUxkPAiPQLvLxho5W65e3J7GoOImAggvppZb7LvOUyxGzk0RowwuGdin+DZA2uuBZZSRGPWqqhmyFbPFsT2PRKXpaEPb1dngg6WhRbR1+y6aclHVDn99nIOK4obhAdjNi59swpNqaMsKnbVvPST/yBacbUsxFsH8+gl/u9FSYlYr4hmnB93pyBQaHVengOhD05vulH64JhGiOZ5Rj9ev06npii+0AvI+/dCiF/bJ5m25BHshhpHf5WelrQnp+m+ay5Z67OLcwhofJTWp4QR73o6vCo1XswT4jISbVrcfl9KFI5nHds6TAjHwTweLkM7Weuxn9zH6j7rLCV2NG/2Uyiy6YHwg3GV0BE6WpZWhm+69oY933pSuNZdmnexajItiOzbaF3Bjt6LI5w4augCowyslIWExBAQ== 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)(1076003)(6666004)(6486002)(8936002)(2616005)(52116002)(86362001)(316002)(6506007)(508600001)(956004)(6512007)(5660300002)(2906002)(4326008)(38350700002)(186003)(38100700002)(66556008)(66946007)(8676002)(66476007)(6916009)(83380400001)(26005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: L7HKL3DgoBK0ABT1wz0mUR9cwKs6hkUTDV26WQK0Syq72ItnHri6HuVEn8ngZZ1zUrL2l+H378TkgNyMARP/c2T8Dr7A+ybghVS+A/PYve6KjtaqPLRGZYpgbb4r41y7QImy9PCyfZVATK9HzK6fUjnmeH907tqoxjlwJNopGI/qC+o3BIJn1JpFlHSsBAhUARge4nI8a9t2hTonEHxaLLg/CpQCskweC4UQWJt3RuId9BxMObNe4NfHKw6LcvCgHFgfJC9u4EevzM+uo5MKkDyDmlHFKK8abZDgK3PTRJGBKrtoX7fUsUuoaHo/6MfGW3DLIBadyI3iFKIDG2a9ps3XOripfGkxzUDcA5Z8TwoghuUkIC3OpYVbTtlq1+3TfUjOaxrCngMDreQaUHX1Z9SExcodtF1bWdfFoD/UQT+ylytZdAeWi1wJjw0krLplBB8HE501ySoqy4m7z8NFQBThyjVO/QJeDicwg2sj9AqqzgByHemzoDXiNWupkGPXIbrAyHaJa2XOY+74jinmwp2fKIsE2GX7SloikPoAOPyZT1LZ3hvHM+ZmWqpHnFYdRC8eVH3YCRM6gGE3wpkJZ5AUUAjoF0wL7Nqu9oJjxt9N3hNPTx25dX5b0BehxWeOsWIV6O5MZyeTxU0bpgufzJLVihKDDuhx9NWcJAeV/fcHtvAsP6vM/ajeSFqpSQ5xSRzuO2Rh9AyA30c7hPo31liV92Sx1Cj/wFYIdUsj0SU21WwaWu0a2qQ/COURy/EYef7FNjDfPqmbM0weK0ImAxdi3xXzoMqIz0SOC+mCAOkDBZNzMmzqWLoYAW0f2Dtk/7dcqsTCYmnj4ilUYKWS2LxJBf0wpGoJxNeEmZ8knLJDU/OOVyuhB4DcUppOb5HPak6Ge226p9uRhye6ShTLL9QiV9DuCVmOoWs/rcaNde/CgAzxnngaqe+ZkYKFKDdXTMtONOf2LRwBpONrphR1I4J6171534UbBw2YetVKjWLKUnkkOpkBv4JqMGPGfr35elV6VidQh+7sMybxKQlM0tABwjTwRyb2gHCT1FpdqIqC/2zK+moDtfvoWtEr7Y7B34TRgpKAMaUwtRgtcTuNeKjlEtZHbAMoENBjtCSj0yxD6Z4ddyupESuuHnwXlFCW5Nx7UZXMKIIEXIaLzEWKDegPB3wby/VShi3R3mpVIqc0PO9OARgo+HsUF2Zo7lsT+/icFm9JeGa8VNarY3padr1e96Jrt1nj9tO2gy8knZ0IabeBRHkk8A9JDCM0F6l/tXpfpkKMmZ1ROtOA2gESkG713ccWBAN/9/px8113/JZe2mfg3CxyirmxL6dxvMKxJ6qJ0x/SuHqFagbueFYhFKH4xqLENzlLCPPMPrtHrAFSL3tsxo6TWTL14bgRR577J5vLPcE6t0behsdJRRBchlLuiz2LxC6entO+IIlO2plXO6IUiDadawGlYb7HYsZcshJb7qvhk7NRwQrLtyUBRqp5FsGNynp9x/agvj1iCzuuTyMsHYhMFL4ahe5Wr0StMGPommfZ6Uv81puhzeVjTVOqU2wfcc5Qa6bhnRse70cY/y0rnSwqF69qr5xYL6xNwXZG0tsAY7GUWfiMoa0Z2X0qvIkxqqgvHUeWV3gB/SdxkrDDkXAJFlBaVoA/i9Cf+w99ivjT+GSSsw4nC3SiHg== X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ba41cce8-acd9-4515-2bb5-08d9b65dfa4d X-MS-Exchange-CrossTenant-AuthSource: AM9PR08MB6737.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2021 13:08:20.2049 (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: 4Z6Yvwy41109F5YFXP+T/8aLpKYaB318jL6vm+J0g57TBsgx03KwxfGhZPbV+I/1knC/1aKWd7giE62wWQPyN/xDzpvcHfI5wnDwsgWs2iw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB6968 Received-SPF: pass client-ip=40.107.7.115; 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, MSGID_FROM_MTA_HEADER=0.001, 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" compression_type can't be used if we want to create image with compat=0.10. So, skip these tests, not many of them. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz --- tests/qemu-iotests/031 | 5 +++-- tests/qemu-iotests/051 | 5 +++-- tests/qemu-iotests/061 | 6 +++++- tests/qemu-iotests/112 | 3 ++- tests/qemu-iotests/290 | 2 +- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/tests/qemu-iotests/031 b/tests/qemu-iotests/031 index 648112f796..ee587b1606 100755 --- a/tests/qemu-iotests/031 +++ b/tests/qemu-iotests/031 @@ -42,8 +42,9 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 _supported_fmt qcow2 _supported_proto file fuse # We want to test compat=0.10, which does not support external data -# files or refcount widths other than 16 -_unsupported_imgopts data_file 'refcount_bits=\([^1]\|.\([^6]\|$\)\)' +# files or refcount widths other than 16 or compression type +_unsupported_imgopts data_file compression_type \ + 'refcount_bits=\([^1]\|.\([^6]\|$\)\)' CLUSTER_SIZE=65536 diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051 index 1d2fa93a11..da93587039 100755 --- a/tests/qemu-iotests/051 +++ b/tests/qemu-iotests/051 @@ -41,8 +41,9 @@ _supported_fmt qcow2 _supported_proto file # A compat=0.10 image is created in this test which does not support anything # other than refcount_bits=16; -# it also will not support an external data file -_unsupported_imgopts 'refcount_bits=\([^1]\|.\([^6]\|$\)\)' data_file +# it also will not support an external data file and compression type +_unsupported_imgopts 'refcount_bits=\([^1]\|.\([^6]\|$\)\)' data_file \ + compression_type _require_drivers nbd do_run_qemu() diff --git a/tests/qemu-iotests/061 b/tests/qemu-iotests/061 index 70edf1a163..513fbec14c 100755 --- a/tests/qemu-iotests/061 +++ b/tests/qemu-iotests/061 @@ -48,7 +48,11 @@ _supported_os Linux # not work with it; # we have explicit tests for various cluster sizes, the remaining tests # require the default 64k cluster -_unsupported_imgopts 'refcount_bits=\([^1]\|.\([^6]\|$\)\)' data_file cluster_size +# we don't have explicit tests for zstd qcow2 compression type, as zstd may be +# not compiled in. And we can't create compat images with comression type +# extension +_unsupported_imgopts 'refcount_bits=\([^1]\|.\([^6]\|$\)\)' data_file \ + cluster_size compression_type echo echo "=== Testing version downgrade with zero expansion ===" diff --git a/tests/qemu-iotests/112 b/tests/qemu-iotests/112 index 07ac74fb2c..5333212993 100755 --- a/tests/qemu-iotests/112 +++ b/tests/qemu-iotests/112 @@ -43,7 +43,8 @@ _supported_proto file fuse # This test will set refcount_bits on its own which would conflict with the # manual setting; compat will be overridden as well; # and external data files do not work well with our refcount testing -_unsupported_imgopts refcount_bits 'compat=0.10' data_file +# also, compression type is not supported with compat=0.10 used in test +_unsupported_imgopts refcount_bits 'compat=0.10' data_file compression_type print_refcount_bits() { diff --git a/tests/qemu-iotests/290 b/tests/qemu-iotests/290 index ed80da2685..776b59de1b 100755 --- a/tests/qemu-iotests/290 +++ b/tests/qemu-iotests/290 @@ -41,7 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 _supported_fmt qcow2 _supported_proto file fuse _supported_os Linux -_unsupported_imgopts 'compat=0.10' refcount_bits data_file +_unsupported_imgopts 'compat=0.10' refcount_bits data_file compression_type echo echo "### Test 'qemu-io -c discard' on a QCOW2 image without a backing file" From patchwork Fri Dec 3 13:07:36 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: 12655233 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 A04F2C433EF for ; Fri, 3 Dec 2021 13:34:07 +0000 (UTC) Received: from localhost ([::1]:53842 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mt8hQ-0005Rr-NZ for qemu-devel@archiver.kernel.org; Fri, 03 Dec 2021 08:34:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57804) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mt8Id-00026I-U7; Fri, 03 Dec 2021 08:08:29 -0500 Received: from mail-eopbgr70115.outbound.protection.outlook.com ([40.107.7.115]:63695 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 1mt8Ib-00072T-Qj; Fri, 03 Dec 2021 08:08:27 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dOwNccXH15XigPfKD7sIyLpudzC9mKxWx0qJK4RfYZXZWa6MBp7UHNvxOeahNVEzf4S40XgS0qyYEIBDy0l3FQVNd3NBhxvmip85mEbZLPA18Cx9tq4DlNRbPql//FYgMsyCIcxsfEGCR6X3kIv9fLn4XxMsYfx0k1kgpQBiBkYJS8jrfgxwtXizDq9KWREYU/hAKzsJ+yAtUgWoWzCuL2H18sNEEzLQ38993fNZIxEiOFI+4iOhY+Uq+0fbmydVTXMMZ3Igrk0g/7DYiXkrXZ9xC3/Dqr0RmZejxTxf6UNWZRKlwgnngx5ZaQaBd2kOXfgoHeZZjOJrlyrbyYw7DQ== 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=xfU5SxbYMAO+bW5dCnbZM8sH1AoGJXlQJah+VWaXImM=; b=YVqb0OzYuuZKjqiz93yGlf10qNru+gHI2yB9+A1gLD1TSFjJaHg/TNIaAdMSTwrFIWp8a/1jXrjT5sZ6ien1VD5i41G6beZuyKyEsqiHZ2/hnMMOSKY/Q1k6dxMJ0H5vPEMotPuiioW/wbQIjmidJ94bRRUYQ4BYf7wW+/vpDEXqFU3lchxlFhY4ENqpt+P3m6RGIgF+luMfFMpxg2pYlUJkv2SamzhiDoSaSa+FMGHYs7mLxylRbeTl4iLrXi/htujSPX5qh8uyUli4Fl/lhIaPlNX2z/TmAu4HqM3y+AXYwpGrR4jb8WNnDIhq402cqOn2v4MnF5RLpPaw+RhuEw== 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=xfU5SxbYMAO+bW5dCnbZM8sH1AoGJXlQJah+VWaXImM=; b=j+RKJ6b+kciKSuI5vL+s+AY/WX1s4FKZAW2dfjfaPJ3U+x3GYgUnYNT262iJCcPHF0txuiFvMoAdYEoD8SoSEsBZPE7c7lA5FcWO2eXMwNabIWEU7quWhOWok2iTVIvwhs4PxiQcppWr/GkvYIsbPR4ZdV7lVyNNZYAhoWjP3EQ= 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 AM9PR08MB6968.eurprd08.prod.outlook.com (2603:10a6:20b:417::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.21; Fri, 3 Dec 2021 13:08:21 +0000 Received: from AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a]) by AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a%7]) with mapi id 15.20.4669.024; Fri, 3 Dec 2021 13:08:21 +0000 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, hreitz@redhat.com, kwolf@redhat.com, vsementsov@virtuozzo.com, jsnow@redhat.com Subject: [PATCH v4 18/19] iotests.py: implement unsupported_imgopts Date: Fri, 3 Dec 2021 14:07:36 +0100 Message-Id: <20211203130737.2924594-19-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211203130737.2924594-1-vsementsov@virtuozzo.com> References: <20211203130737.2924594-1-vsementsov@virtuozzo.com> X-ClientProxiedBy: AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) To AM9PR08MB6737.eurprd08.prod.outlook.com (2603:10a6:20b:304::18) MIME-Version: 1.0 Received: from kvm.ch-qa.sw.ru (130.117.225.5) by AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16 via Frontend Transport; Fri, 3 Dec 2021 13:08:20 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b34a6e5e-c916-40a5-eab1-08d9b65dfaf2 X-MS-TrafficTypeDiagnostic: AM9PR08MB6968: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gtCFH0W6iGn+HFbq6Z700X9kMx6xCMwaJZN/IO4WLSNQkY4+WtKgsKZr03f4Abpi2UdGHzzxe4Vd0SJpyNpYwbku77oh7gl/r18gKiwygmGN0tIu7p3Rww090AWvRmzkaSporRYSvYXFd35hF36SMc7LIHGEdwN/mYE5f4CbVEJamUym0urNic2TRgsc3HzwNyyo0wpGVt78hi2fbt9bD8cnKvE8kyH8TJEMZVqj1syBE0rvy6HTQee6HRuHl0X6012qPNq45Nt0Kn7LCr1t36KVhj3lh6xmAFpM8e0ecXonJMMeFefFHdgjNd58XvH/B7cpNBXzZ+UIcc+X9FZTVlYEZ5bUIuArd6zi+9gMt8oUQqcjEyYZQRSH+DY0MLAQ9MvjwU2ehNrdvZJKChJKR+KwpKmZ7lUeZrY301A7+w9gOG2mrsEXsyRR7btlWeP2IPPhccW9OZcpNm8GjlYvhVBIu2B9sHkr3fd1rVbinugrUKHpj5UiteX+yr8tmfON4o0wxgZ6JUOBP069zRzIITm0Sc2M3HF2LZ98p4yrFRWRAcLZXZX1xIYdYKepr0vFmlqutP6EtrXfHVPcKuweIPv/7JwmjrCSM5HIhEoU4II/X6V7E3MwGHpMulVKVbOVTmSS5rhBIzEPmIdfWsjVuaItkdQHCS55ZNf3UGW3/GV9p37LMXK2r2xXtT6GFFWdgVm+d46AZKdiGB1qtxBcVg== 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)(1076003)(6666004)(6486002)(8936002)(2616005)(52116002)(86362001)(316002)(6506007)(508600001)(956004)(6512007)(5660300002)(2906002)(4326008)(38350700002)(186003)(38100700002)(66556008)(66946007)(8676002)(66476007)(6916009)(83380400001)(26005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +CxgTfeJZG0RxowD/qnZGeErQnuyDj9kZ9G0ewK6eqLuvWxaJhNwnZ9rJiRiC2mnRXjPjpE7f5QLQ6tJDHHJhm9ukHeyrK+6yF6inGywZQ8n9gpCIYS8lS6QTTEQoXNxwV42jRlVjMkAnTG86y1/Cd4OOWmRD8N7LLsGYekOivEW/vMBb0frA/y0v9rbssrja/8WIE4/n4Eh5lqRIHX7ENWsanve4dYBkBcIGFYqhR41Ba81EMvX4YXJgILYoNfbSdVvDVTJbOaQctjQYBmRUu0mA9M7bunM+DePvqS14Juxu4ERJil+aXThc2YX197ZYtWKSrYUHGHPfzRtqVu3soXlp+0B5hv1RPAnjBDgqTgvDvGGD56LT3gWxtv9Fy2COUvqA1TZQ9Zi7Gyb4iL3BPgXV+e3FPk2+8sDjqkHUmm2esNKw08lbON+aaJACIY3sMRM/cm2RIQ/hxcO5bfhFR08R/6SmHcwJPzUcnd3VWZ8/t5Jno45DixdPuKkQFaPA06h2s+cWe2CgjLh3Ud+gi65yKl2MgAH4a4/X2xSr6PiUL4gNqiwa48Wsv2XDKvElLK4dLJnsdqWqzFTMT3yThxcTXFJ4DdocQs4NXfhyhzlbl3pacGY0wFq0WiKzKyqGpdLCJocqV+hJADH8KVYJ0RyiUEJ/4u85xIWOJ0JMyLbxGpRDERBztTGaT+/3O04VFTqMLek0rUpWoL+Ycuy2of6+CSDmbbTUK2cyVirStE3MtlBgh9wVtx2sJaTjVeXpDAbc4ggsNH48zFxrJsvNe+FFbZ+T78znDXaYsvP8/1qt+DcMmEbrnUp0q4DmTirrpcouwfvePA84EVP75Qw1gZ0DBfQ/h37BPepU16sGRuokgG5O/mkcLYDmWgTs5gXhMwI/0++zpE1ShxE1VNgbcjlp5jrP8294Vrs30I5TBUG86tlqxDjtZRWSIEy6lc/6W6PbdjBRDgjm78oTwEk7/63f3ayRSY65A6sePOsnR/2K2dNK2pyVqjLv8DozBgt7NeCpScBSQqcLyzX9tAEV/X3ScmRIjK+TY9d9fxaG1VY/pF06OIaMjg+a6rRLQCZpkJDefeliBdgWT1Eeoiyt3TOjfkxrvizILliQF832edhOipfdjzDGWIcxG5YZMNc2DyH9Whos2MARvszChjoPzmzelvXgihdsxLpfBTov8/oiBqUr+neaIu3xL3H+GWgxrG8SbHYnS+gzJy4DUw6HNSk+9wVDruKryYE+aGIMAJQRseFUWLiCB7hE/x6mVrd62a3cpGgm1ga33A8VBGGMW0Hw6qEAuKieLQQvFDrm8eVXQkECPZWiui9yRxwpiO96y9mO327pANTtMwp7cIyiE44NHLoczEy1VpYAGtHOlCk7LlT2FSJEaTg8YYv4IvbjzEU260NRzT3DBOibtNBUY2aZqkpWqT2Fn4/LPifw8sGz9sfIWd8RACBzMZ+gqmb+XXOvgS2EWzqK6OM6FQOkcSRCUwGd8FptYYyt2E0s2upJmxQPlPr2Jq0d2KIYl42Iwe8emQZF+WB5QyIisJRLt7ET62h41gz0+KmYooJPQC21WBSLxqBPc8vNqAL3+nIwz2P4lLfi7n1iHnhEL/H5Jsk1zwLDkWo06nAyQo66NLnW4py5ebC/StTBW60Hrve+6Qg6om++E/UHGR11ZinIA== X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b34a6e5e-c916-40a5-eab1-08d9b65dfaf2 X-MS-Exchange-CrossTenant-AuthSource: AM9PR08MB6737.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2021 13:08:21.3210 (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: sTMyR/7yOLQubjdC0Sg2B0K9IrH12eta5kPnvKsyqKgFq84i7C0rUROdKjKjzC2gcHJ8pN0TlfNtORNn/ca2mSPhNulaBQDR7gOD9ucNIOo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB6968 Received-SPF: pass client-ip=40.107.7.115; 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, MSGID_FROM_MTA_HEADER=0.001, 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 have added support for some addition IMGOPTS in python iotests like in bash iotests. Similarly to bash iotests, we want a way to skip some tests which can't work with specific IMGOPTS. Globally for python iotests we now don't support things like 'data_file=$TEST_IMG.ext_data_file' in IMGOPTS, so, forbid this globally in iotests.py. Suggested-by: Hanna Reitz Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz --- tests/qemu-iotests/iotests.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 903686b402..2cbb13d67a 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -1238,6 +1238,17 @@ def _verify_virtio_scsi_pci_or_ccw() -> None: notrun('Missing virtio-scsi-pci or virtio-scsi-ccw in QEMU binary') +def _verify_imgopts(unsupported: Sequence[str] = ()) -> None: + imgopts = os.environ.get('IMGOPTS') + # One of usage examples for IMGOPTS is "data_file=$TEST_IMG.ext_data_file" + # but it supported only for bash tests. We don't have a concept of global + # TEST_IMG in iotests.py, not saying about somehow parsing $variables. + # So, for simplicity let's just not support any IMGOPTS with '$' inside. + unsup = list(unsupported) + ['$'] + if imgopts and any(x in imgopts for x in unsup): + notrun(f'not suitable for this imgopts: {imgopts}') + + def supports_quorum(): return 'quorum' in qemu_img_pipe('--help') @@ -1414,7 +1425,8 @@ def execute_setup_common(supported_fmts: Sequence[str] = (), unsupported_fmts: Sequence[str] = (), supported_protocols: Sequence[str] = (), unsupported_protocols: Sequence[str] = (), - required_fmts: Sequence[str] = ()) -> bool: + required_fmts: Sequence[str] = (), + unsupported_imgopts: Sequence[str] = ()) -> bool: """ Perform necessary setup for either script-style or unittest-style tests. @@ -1434,6 +1446,7 @@ def execute_setup_common(supported_fmts: Sequence[str] = (), _verify_aio_mode(supported_aio_modes) _verify_formats(required_fmts) _verify_virtio_blk() + _verify_imgopts(unsupported_imgopts) return debug From patchwork Fri Dec 3 13:07:37 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: 12655121 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 3415EC433EF for ; Fri, 3 Dec 2021 13:12:16 +0000 (UTC) Received: from localhost ([::1]:47884 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mt8MI-0005ww-VQ for qemu-devel@archiver.kernel.org; Fri, 03 Dec 2021 08:12:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57850) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mt8Ih-00028G-3p; Fri, 03 Dec 2021 08:08:31 -0500 Received: from mail-eopbgr70115.outbound.protection.outlook.com ([40.107.7.115]:63695 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 1mt8Ie-00072T-K4; Fri, 03 Dec 2021 08:08:30 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aLBX9YncTtVL3+DX9HmHDbyyqh150CfDz4lwqSBX1t6BVdufUPXAvWru/+9BJYbeiyjgT1fO1eZCGskYD5H5P8qgmdBRPXfKXxIc5PSb/f4FAkIqxO1YIuhsXBaqkJ9hYI8HPr8VXS3pXeYyTEmDVqlSgqb5yUNbvQ2rT2ZlJbr5Yv8iMWr9ZNEUbMorX45oVIaDpN02LJy+0vxI2NEACTXH3TRyoHMzHQT9MJGYLsmUtt1VdDdeNvHSQ8e7H76CI0UJN1YCXwfpJf4oNy/zyJ4e3ZuKkRjiCOGsvMcvlbCOrCpnfQcQ+t4Xx8K29K4LYcT/FwaxvD4AvYXOC6Z2Kg== 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=Zcc+de4kwWv5zmz0NYMY8B2kA70UV3IY6wCEe9/wOQI=; b=UfkHlAJNEO0Z5iPRGVd5lkZ2H5xD8dIJF3hs7dmBEZKSsLuiNF7Hxesh+wUmMl7NgX7LNLiVWhWUDy+OKqViqRw+MPSe1e3x3v2dPNoIPZElTw97+TAfZqCxFrbAkacqanRdmdIhlIBRQcjEjJWrFR8FQ/ExqgzidNdFItmuix+ykZvuGfV6Suntnyutbp3owC5x2nv6mexFmIeMi+ia1YgYGOJzOrIpWXPi8lVaqDo+7wRCS9vWXuFgMirOVFW55gPKH4lh6+N3m5j2y3+ODfIlLC3fMzLdxsD3LaglenQCE2PNDp1+gr9s88YyEH4cIpkR3MRk2j0yrxdS7+4i5A== 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=Zcc+de4kwWv5zmz0NYMY8B2kA70UV3IY6wCEe9/wOQI=; b=naylNr6LO1+12aIlnLGYQcM86NoQQ+1pw938SkvoX1xCwZyiQkoTLSL2r8su6EtwjJHQkFAb7XHIsMwFTKPrrAr/gpvBvEKIRsdSU1ADScBgKM4N8Ej0JXmXJXl32YLHig3W4QghL8BgHSyIMelsIHz8wALXk/x1y2IIAa3tP7g= 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 AM9PR08MB6968.eurprd08.prod.outlook.com (2603:10a6:20b:417::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.21; Fri, 3 Dec 2021 13:08:23 +0000 Received: from AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a]) by AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::2078:5a2:1898:d83a%7]) with mapi id 15.20.4669.024; Fri, 3 Dec 2021 13:08:22 +0000 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, hreitz@redhat.com, kwolf@redhat.com, vsementsov@virtuozzo.com, jsnow@redhat.com Subject: [PATCH v4 19/19] iotests: specify some unsupported_imgopts for python iotests Date: Fri, 3 Dec 2021 14:07:37 +0100 Message-Id: <20211203130737.2924594-20-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211203130737.2924594-1-vsementsov@virtuozzo.com> References: <20211203130737.2924594-1-vsementsov@virtuozzo.com> X-ClientProxiedBy: AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) To AM9PR08MB6737.eurprd08.prod.outlook.com (2603:10a6:20b:304::18) MIME-Version: 1.0 Received: from kvm.ch-qa.sw.ru (130.117.225.5) by AM6P194CA0095.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16 via Frontend Transport; Fri, 3 Dec 2021 13:08:22 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e1dd4e17-85d1-4132-9b28-08d9b65dfbc7 X-MS-TrafficTypeDiagnostic: AM9PR08MB6968: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2582; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wozcubGQFQa0ytv+EpyiPsOJTlTNBJtt+J8IRsSb9IgL+QK87yqISXlNGSzS7Rb7B7pqXXQYYjD5hQtz6edqdcDxnmn6aZQTbE26DljG5u7kWIBUYYNwPJ7aI2a9NewHvIR1It8ztp/EUxipFNBwn8U6geQ9iHcOijrNguSDw4T20jIA41Rm3R0ohM1SeuZFvo4oFKnjOTOZXhKUc2wj7YnIG+DeFxds3FQ99aOJspb4dIFn03XHlzGpqyNDVKsklgwxoUyu3pgxUkYyxEwZXVJiE52GNK8K/ptU1tzIf8l0aD8Wyekz8daSHzAJL0nIs3BFIq7L+OaIC8DoqeJqVnTDmfYNdjbORvY8sl8u8RHkafPaYNZr+bYpUWBoZ6Sh1UR78pZxQM3FZr0DiwWjvIobMzrgcGemo7S94WRqyXfzCvFYYwSPJ2x7OH50PMBUzaeutGdjutQm1LYzLxgs1j786heuqMKP+nRo0MM9qI0KHH2CQLhoLZKfRBUMxEC8o+qyeYr3ATfV7BLHVCJOh6zajUZYkrK5iHp1yQzpSx3YMUrZYmKM4cn5FXkwjavDpw1VFjnxt4XVlRX6P/208TxpHqm3iszr84LBb6fO49y2eJa6w4YsJuO7L0OH7Z+tnHkYn965REkesBgK4dgTslfzHACFsCcALKyOd7HM+vYMWfeFD35BsWN+qCbT5O4NJDiBXJAsLVrcReytRwWL0Q== 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)(1076003)(6666004)(6486002)(8936002)(2616005)(52116002)(86362001)(316002)(6506007)(508600001)(956004)(6512007)(5660300002)(2906002)(4326008)(38350700002)(186003)(38100700002)(66556008)(66946007)(8676002)(66476007)(6916009)(83380400001)(26005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: robtl1/3QwzGHoVwyXTZiKoPprs5gWhDe59VwZ02MqbCWxv4UGaJOgOHmgF6JUu1BjM9X8eb2oShlFnuTpTu85SW0ywR+3+pvN/xwaXGuo/igjWJJFCH911V0e/J79uiQbbq8NhgFYY7qjFqBTooN7C837nqE5s082yQMmEaCNw6bQG0YkvMjv0zTEp+wfMU6obDnNdScfqFEC3mbz092BngDpSuecqbOAxJtVUUx+CtlOpJaudTw/c6+SbyySfFSV+duQALZLoFBQ0rxXgCGL2DNYBiYBbuvPHY23QLn9ERbR7wMEY4zNL8u8apJYqDFWzTqF6icAV5UGJhLasJ0AvJx1ikYmJrwL8PUPuyOmJo0WQSE7EQWJysO88/Auw+wKMYo9ssyt6GzifJZ5MexbQUvNpbwFzG+bCj+eYpyllOfhR5iC4HSpKXKaC8BuvtU9xJB4pqaApc5BloFoQb3cHN7YkUZYsjEviJvJ7exKGwhwDRgYgM0VNXbIZhAoHI5s1ZD+oYn5kh7F1y+VUEgCwqzFN+Vtu80MRXygi5BBjC5fHwNNQ5ChLWleeKB16hMdbAhFPHJnmgRYDHQGM+dcuuwcgQpQ6vhpdgq4M4fL7BFbqAKpoWhhOzhTGT4TQ1YBpnvLl2vSA6RxFmDThXgRkMixQ+JbmKSC7RboEUgaYRyg71mqctwksWl/IcDt5OfsLG7bleYXDUBY7ISG103TPYRcGIwIhkn4s6jVd1q6/WwJPJBpfMV2Ry1rpPnChY1fttShYRybSaZtuHIwtfoifh429cZ0bZjoiGG5ZrJHykS24Iy7koUwizL4/08DgjSAjmED8zuQrt36iXiFy82dGEf+TdgCNPc62yl7mMN6qBraZvYTl3AtHr2MkBxPnTVomJCQ20tqvO7d1+JKQ/DSLVpSH28+E5U7Yi1WkUE0uXchPREtN5Iyy4A3f9S/BUGjCJV9TegHZmQR4t/lAybWCj2mmk8hK7uBV0omVlUAretlZX8iGY5s99At6Njq6beTWbAfF+1rHl9rQEbSu0Cvrjqwlxizp006MKktZm4aoXGsA8H51VnlVEjIGRKQTEc/kOBY0D1OstGTwzyd1cFyJtOXXvaUXYPSoWeyExPKw7Ep2LhhMPfWcEULGAyhNHAZQ7kbTPI/hEKtKtsjEgCCrzpt8rQSX1XS8ABqGJGfTQZn8QwutRQqJaRl+qJoJzjkQ9DSt7y29fRV16X+TYKt/5RoJYH/LsGC2Kri4OGNDw+cDP9uIVCy9kV1fsH9ek3eHV3qo6RwjAImbp+1wUFlUQ/1dZ0DsKL08qPwDnFBZBxqIDdsQOiP1hjOlN7GzTLRmdSxiCPmEj0S7Qz4ZeqP3zGQia4qu7zevJlPtYO67lOqJ2QQWFbWDcQ5VTqro+GuIjLWoRxSybT63VEMlhe2zbULQTmBgVRE6SA+bJzTzIThpf2RMmwvLSeihxKcNpVGhPcqJJ+yUYP3VbuYrZIfxx2iSWMwkF7Z7FOK3vIwx5v23FngmwMICjVPNVF9H7//Hx/NCMUOVrZdQrq8lxbq4/Pgl5QMygpf66eyDUAKsjzqhe+7srFy3tFs7DDVp1WVdLXPHT7HAVEvWZAoYLi4HKscyBW1k2w2pl1TB8uCh+BkfVJD1/0aR+PD+5PkAQx7KEJ4R/PGjsWEBn+0ps6g== X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: e1dd4e17-85d1-4132-9b28-08d9b65dfbc7 X-MS-Exchange-CrossTenant-AuthSource: AM9PR08MB6737.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2021 13:08:22.5009 (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: WYqmShh+I/sWf0GrHB7FFiNoa+QUD6llwe3YxAwT8xQ2uUsb0rnUjn75WHznHDcFPuOfepxS7HEQosF25FR1h6k9qBcoKle2OI4kdTfp+3g= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB6968 Received-SPF: pass client-ip=40.107.7.115; 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, MSGID_FROM_MTA_HEADER=0.001, 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 support IMGOPTS for python iotests now. Still a lot of tests are unprepared to common IMGOPTS that are used with bash iotests. So we should define corresponding unsupported_imgopts. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/044 | 3 ++- tests/qemu-iotests/065 | 3 ++- tests/qemu-iotests/163 | 3 ++- tests/qemu-iotests/165 | 3 ++- tests/qemu-iotests/196 | 3 ++- tests/qemu-iotests/242 | 3 ++- tests/qemu-iotests/246 | 3 ++- tests/qemu-iotests/254 | 3 ++- tests/qemu-iotests/260 | 4 ++-- tests/qemu-iotests/274 | 3 ++- tests/qemu-iotests/281 | 3 ++- tests/qemu-iotests/303 | 3 ++- tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test | 3 ++- tests/qemu-iotests/tests/migrate-bitmaps-test | 3 ++- tests/qemu-iotests/tests/migrate-during-backup | 3 ++- tests/qemu-iotests/tests/remove-bitmap-from-backing | 3 ++- 16 files changed, 32 insertions(+), 17 deletions(-) diff --git a/tests/qemu-iotests/044 b/tests/qemu-iotests/044 index 714329eb16..a5ee9a7ded 100755 --- a/tests/qemu-iotests/044 +++ b/tests/qemu-iotests/044 @@ -118,4 +118,5 @@ class TestRefcountTableGrowth(iotests.QMPTestCase): if __name__ == '__main__': iotests.activate_logging() iotests.main(supported_fmts=['qcow2'], - supported_protocols=['file']) + supported_protocols=['file'], + unsupported_imgopts=['refcount_bits']) diff --git a/tests/qemu-iotests/065 b/tests/qemu-iotests/065 index 4b3c5c6c8c..f7c1b68dad 100755 --- a/tests/qemu-iotests/065 +++ b/tests/qemu-iotests/065 @@ -139,4 +139,5 @@ TestQMP = None if __name__ == '__main__': iotests.main(supported_fmts=['qcow2'], - supported_protocols=['file']) + supported_protocols=['file'], + unsupported_imgopts=['refcount_bits']) diff --git a/tests/qemu-iotests/163 b/tests/qemu-iotests/163 index dedce8ef43..0b00df519c 100755 --- a/tests/qemu-iotests/163 +++ b/tests/qemu-iotests/163 @@ -169,4 +169,5 @@ ShrinkBaseClass = None if __name__ == '__main__': iotests.main(supported_fmts=['raw', 'qcow2'], - supported_protocols=['file']) + supported_protocols=['file'], + unsupported_imgopts=['compat=0.10']) diff --git a/tests/qemu-iotests/165 b/tests/qemu-iotests/165 index ce499946b8..144cf4a7de 100755 --- a/tests/qemu-iotests/165 +++ b/tests/qemu-iotests/165 @@ -157,4 +157,5 @@ class TestPersistentDirtyBitmap(iotests.QMPTestCase): if __name__ == '__main__': iotests.main(supported_fmts=['qcow2'], - supported_protocols=['file']) + supported_protocols=['file'], + unsupported_imgopts=['compat=0.10']) diff --git a/tests/qemu-iotests/196 b/tests/qemu-iotests/196 index 2451515094..fe93ebd760 100755 --- a/tests/qemu-iotests/196 +++ b/tests/qemu-iotests/196 @@ -65,4 +65,5 @@ class TestInvalidateAutoclear(iotests.QMPTestCase): if __name__ == '__main__': iotests.main(supported_fmts=['qcow2'], - supported_protocols=['file']) + supported_protocols=['file'], + unsupported_imgopts=['compat=0.10']) diff --git a/tests/qemu-iotests/242 b/tests/qemu-iotests/242 index a9b27668c2..8cdf02e8d9 100755 --- a/tests/qemu-iotests/242 +++ b/tests/qemu-iotests/242 @@ -26,7 +26,8 @@ from iotests import qemu_img_create, qemu_io, qemu_img_pipe, \ file_path, img_info_log, log, filter_qemu_io iotests.script_initialize(supported_fmts=['qcow2'], - supported_protocols=['file']) + supported_protocols=['file'], + unsupported_imgopts=['refcount_bits', 'compat=0.10']) disk = file_path('disk') chunk = 256 * 1024 diff --git a/tests/qemu-iotests/246 b/tests/qemu-iotests/246 index 5932a0e8a9..a6fef31e1a 100755 --- a/tests/qemu-iotests/246 +++ b/tests/qemu-iotests/246 @@ -23,7 +23,8 @@ import iotests from iotests import log -iotests.script_initialize(supported_fmts=['qcow2']) +iotests.script_initialize(supported_fmts=['qcow2'], + unsupported_imgopts=['compat=0.10']) size = 64 * 1024 * 1024 * 1024 gran_small = 32 * 1024 gran_large = 128 * 1024 diff --git a/tests/qemu-iotests/254 b/tests/qemu-iotests/254 index 108bf5f894..5f08541214 100755 --- a/tests/qemu-iotests/254 +++ b/tests/qemu-iotests/254 @@ -22,7 +22,8 @@ import iotests from iotests import qemu_img_create, file_path, log -iotests.script_initialize(supported_fmts=['qcow2']) +iotests.script_initialize(supported_fmts=['qcow2'], + unsupported_imgopts=['compat=0.10']) disk, top = file_path('disk', 'top') size = 1024 * 1024 diff --git a/tests/qemu-iotests/260 b/tests/qemu-iotests/260 index 2ec64a9b99..c7b701a094 100755 --- a/tests/qemu-iotests/260 +++ b/tests/qemu-iotests/260 @@ -23,8 +23,8 @@ import iotests from iotests import qemu_img_create, file_path, log, filter_qmp_event iotests.script_initialize( - supported_fmts=['qcow2'] -) + supported_fmts=['qcow2'], + unsupported_imgopts=['compat=0.10']) base, top = file_path('base', 'top') size = 64 * 1024 * 3 diff --git a/tests/qemu-iotests/274 b/tests/qemu-iotests/274 index caab008e07..70a2f9573b 100755 --- a/tests/qemu-iotests/274 +++ b/tests/qemu-iotests/274 @@ -23,7 +23,8 @@ import iotests iotests.script_initialize(supported_fmts=['qcow2'], - supported_platforms=['linux']) + supported_platforms=['linux'], + unsupported_imgopts=['refcount_bits', 'compat=0.10']) size_short = 1 * 1024 * 1024 size_long = 2 * 1024 * 1024 diff --git a/tests/qemu-iotests/281 b/tests/qemu-iotests/281 index 956698083f..66e0aa91c9 100755 --- a/tests/qemu-iotests/281 +++ b/tests/qemu-iotests/281 @@ -245,4 +245,5 @@ class TestBlockdevBackupAbort(iotests.QMPTestCase): if __name__ == '__main__': iotests.main(supported_fmts=['qcow2'], - supported_protocols=['file']) + supported_protocols=['file'], + unsupported_imgopts=['compat=0.10']) diff --git a/tests/qemu-iotests/303 b/tests/qemu-iotests/303 index 9dee2bdfb8..d621d37b82 100755 --- a/tests/qemu-iotests/303 +++ b/tests/qemu-iotests/303 @@ -23,7 +23,8 @@ import iotests import subprocess from iotests import qemu_img_create, qemu_io, file_path, log, filter_qemu_io -iotests.script_initialize(supported_fmts=['qcow2']) +iotests.script_initialize(supported_fmts=['qcow2'], + unsupported_imgopts=['refcount_bits', 'compat=0.10']) disk = file_path('disk') chunk = 1024 * 1024 diff --git a/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test b/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test index 00ebb5c251..0e89fc1dc0 100755 --- a/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test +++ b/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test @@ -272,4 +272,5 @@ class TestDirtyBitmapPostcopyMigration(iotests.QMPTestCase): if __name__ == '__main__': - iotests.main(supported_fmts=['qcow2']) + iotests.main(supported_fmts=['qcow2'], + unsupported_imgopts=['compat=0.10']) diff --git a/tests/qemu-iotests/tests/migrate-bitmaps-test b/tests/qemu-iotests/tests/migrate-bitmaps-test index c23df3d75c..a6a6437c62 100755 --- a/tests/qemu-iotests/tests/migrate-bitmaps-test +++ b/tests/qemu-iotests/tests/migrate-bitmaps-test @@ -307,7 +307,8 @@ def main() -> None: iotests.main( supported_fmts=['qcow2'], - supported_protocols=['file'] + supported_protocols=['file'], + unsupported_imgopts=['compat=0.10'] ) diff --git a/tests/qemu-iotests/tests/migrate-during-backup b/tests/qemu-iotests/tests/migrate-during-backup index 34103229ee..12cc4dde2e 100755 --- a/tests/qemu-iotests/tests/migrate-during-backup +++ b/tests/qemu-iotests/tests/migrate-during-backup @@ -94,4 +94,5 @@ class TestMigrateDuringBackup(iotests.QMPTestCase): if __name__ == '__main__': iotests.main(supported_fmts=['qcow2'], - supported_protocols=['file']) + supported_protocols=['file'], + unsupported_imgopts=['compat=0.10']) diff --git a/tests/qemu-iotests/tests/remove-bitmap-from-backing b/tests/qemu-iotests/tests/remove-bitmap-from-backing index 8d48fc0f3c..da4d0b9c7e 100755 --- a/tests/qemu-iotests/tests/remove-bitmap-from-backing +++ b/tests/qemu-iotests/tests/remove-bitmap-from-backing @@ -21,7 +21,8 @@ import iotests from iotests import log, qemu_img_create, qemu_img, qemu_img_pipe -iotests.script_initialize(supported_fmts=['qcow2']) +iotests.script_initialize(supported_fmts=['qcow2'], + unsupported_imgopts=['compat=0.10']) top, base = iotests.file_path('top', 'base') size = '1M'