From nobody Thu Nov 14 17:52:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=virtuozzo.com); dmarc=pass(p=quarantine dis=none) header.from=virtuozzo.com ARC-Seal: i=2; a=rsa-sha256; t=1629796040; cv=pass; d=zohomail.com; s=zohoarc; b=nwM6/oB+pVXAiGtbl3Y9g+DOcALX0Fdjbh1wvWiSGsZETuBgC60TGMmyZoDrZwc8c8HUbJS8slNHFX9eVRU2g7MoMGijJq07NVfcn2tq/ZsO+Fc2sfj47liOddQQmpYCwoRxPwkxV6gTlOAPzUJ4BypK90kunuZReeKbWZ/VoXU= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629796040; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0Fdt/9kXHN1yQLBrMNRdUEjvnHhIP48yC5QLgDEN0ag=; b=NwHI+HmI2xW6cQCuhHuTxtsPqD4ANnhMnDI2lxPnApbznkDqV/0Gmm57Bnp4GakrC15H8pKgaDIAAp3NGpVIbKAVdvEOX8LMdyKACeB2pNBEuOZDNq5epqzrEkz68NCOjBVpCqUBt9DpzoZjdu5RTQQgQrwbEGJRl4krbdo49Sg= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=virtuozzo.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1629796040234760.1782881301231; Tue, 24 Aug 2021 02:07:20 -0700 (PDT) Received: from localhost ([::1]:56794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mISOt-0006ik-3R for importer@patchew.org; Tue, 24 Aug 2021 05:07:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIRz5-0005EL-AX; Tue, 24 Aug 2021 04:40:39 -0400 Received: from mail-eopbgr130131.outbound.protection.outlook.com ([40.107.13.131]:22309 helo=EUR01-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 1mIRz3-00086z-Ly; Tue, 24 Aug 2021 04:40:39 -0400 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM6PR08MB5077.eurprd08.prod.outlook.com (2603:10a6:20b:e6::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4436.19; Tue, 24 Aug 2021 08:40:30 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::3c5e:7829:362d:1423]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::3c5e:7829:362d:1423%2]) with mapi id 15.20.4436.025; Tue, 24 Aug 2021 08:40:30 +0000 Received: from localhost.localdomain (185.215.60.249) by HE1PR05CA0178.eurprd05.prod.outlook.com (2603:10a6:3:f8::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4436.19 via Frontend Transport; Tue, 24 Aug 2021 08:40:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T2f6psVDq93/4AmE5mpc/MZ0merakFV+Gme176uxQpinDQ+vKCl1EzoYmYsGe885RJClH4u5179NzUtG7Amb54ueaOX90Mq7zC9PzCZHQREV7Eqvho1u9rN/Y7ysqHEe9Du0kOJ7snQhaDU785CazwZn2uzNE+jz8hf1ZwCT2OSt6NRWgSOvzQCxHnW1d7QIjBlxEWE61PDxoDMr9aJZ+XsNutufkR1rZrlsA6P3wYoozRnYGIUcN+sbmjALIvXVK7W7/oM0U8ZrbpMV80d6Xb/R7vSlKoKle5alvbliBpEr6B0JX5bn3G5RePRILdOEcAK+KtHBe1gKEtOyvhSrEQ== 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-SenderADCheck; bh=0Fdt/9kXHN1yQLBrMNRdUEjvnHhIP48yC5QLgDEN0ag=; b=iQCJJyR9YZ3LpMvOl9I3gada+hoZrZeQPo8dw9MrHTqPNc1OTS/061YxY7Vdy+vAtJW+ilVgl36VmCRfCppWBleJzstJY+0b3tEGIR9chEMDqz9lxJX6hkKGrzjeokLmeIRDQV9tnwYRe+kzz9gJ+F4cyZ/e/cIpRpyN3lZWmCtL3my0w8wq+A0hMGAlyl1suGiAxHzd4sinwZ0MkaThRacmWo6rr/Yhoueaem5aE6zFOMT/Nc/mHutK49N/hoBB6jC8+h1MyKFiarMr1pjN6P8jkJd5iCofpJ/uKrM+Lydnnl8cHXcodsqunm6lhbuFOxC2ZOaLZHHS8mLQEuRWvg== 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=0Fdt/9kXHN1yQLBrMNRdUEjvnHhIP48yC5QLgDEN0ag=; b=MTw7lR8oQKrwIOaQq/srv/2khxG9srIU+DsMutqRvT1lDduEgT4fnnK7BR5GSdNJEAivLUbKDYIcwdZYPWmKiaG3sg90HMQxBpnfbmeYpV44tzZG6vF2YnoKGoToxCXAo69zVBgoYFHQcUMAV8ICpwEwz4gBMC6Hhf8eutSDgQU= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=virtuozzo.com; From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, eblake@redhat.com, armbru@redhat.com, crosa@redhat.com, ehabkost@redhat.com, berrange@redhat.com, pbonzini@redhat.com, vsementsov@virtuozzo.com, jsnow@redhat.com, hreitz@redhat.com, kwolf@redhat.com, Max Reitz Subject: [PATCH v8 32/34] iotests/image-fleecing: prepare for adding new test-case Date: Tue, 24 Aug 2021 11:38:54 +0300 Message-Id: <20210824083856.17408-33-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210824083856.17408-1-vsementsov@virtuozzo.com> References: <20210824083856.17408-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: HE1PR05CA0178.eurprd05.prod.outlook.com (2603:10a6:3:f8::26) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 971e8b8f-f972-46d2-c4bc-08d966dac464 X-MS-TrafficTypeDiagnostic: AM6PR08MB5077: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:478; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OhOqStHa8IEKNWMRCjbbq297njzhoaqDf5nwt8A4WKChT+zhe/+ZVFqnPyQCbAeDlY1SqJHq7syAwk7MIvdDhHhIVJRru3WS9uygJf3TpH+4BrrwdR60JnfQBUQJKnG7+muO2uFcD0qHrKHr+z+f/4pgTyXGHdq50Qh9n5wu9xhbpltzer4XE42ZDzJJl1mLTEJc2cWL/8GNSEfhYsbIgGs2dvaX/t5F3eS3c+zEkdpRaGBjtU01ohyagLcQthVZ0yE3FxsJ+8Dv917xIABfbgPS/rBFIGEuBM2EK5iFTesoAHIizMHjWCbruQL1gSgEmk+liaNbebCHEmtqFI/n44BLM3ZCenqFVgkuCIvDC586w/WuhdU7aqrmswYs2GLvAeiicf8uhnVx8wfsA/uvcKrNIhKxxuQexILPWDnbTkdIJ79bIQX7RxBz1+udF57ot/pUam7zOMaAszc9MkqmDrrfDJQ41B3+ROjFYUI7QZ/eE709A/jE9vST8M+5eMiFFm2G9rxanoeeft7v6FLdrUC7vaMaam2VWRC9qaRgD940ZdQVCtFEbI58EjPBLWOsdXZpaLn/jU0aZOiqiF8c6Dzg4OWHPtumNdwBvmFtcdfv4IXWddbMyrQclc12s8VoA9w5301ME7u2QK6zkSA36VIYA3HYcJ9Hih3xX2ugvwcsrpf2F7VqNjhSmG8CZe8SyS3XogyuM3z6LHv9rk0sEg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR08MB5494.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(376002)(366004)(136003)(39840400004)(346002)(956004)(66476007)(66946007)(316002)(6506007)(36756003)(2906002)(66556008)(6512007)(186003)(2616005)(1076003)(6486002)(52116002)(6666004)(86362001)(38100700002)(38350700002)(8676002)(4326008)(478600001)(26005)(5660300002)(7416002)(83380400001)(6916009)(8936002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?wA/IqnQ/nEd5wfpjPSU6mxm8MwbA/f+GbXKYVkNLm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ascii?Q?hlXc7ihHeSgXLEXPdjgwXfbCnFo6WvMNcwvfXdv0LaOspNLtBKgfhVnhtwMu?= =?us-ascii?Q?pqEMS+l2XGsYOzLpzBBbhuTEm8hr808E+f4dULNXqfAemWq8a0T/yoVbS/Ac?= =?us-ascii?Q?QOpgCpR2RS6fsqcPlydVCZ+Dm+oJGZ2kTA7OM0eDRVeCUfTEtZhtMm4u3Shi?= =?us-ascii?Q?SU+J9+QnnsHIxc/v2L54ZMTdetSxuKD5f640vNxS/OH6r68hfdDxe/wjX47u?= =?us-ascii?Q?IA47RSyKrGkPlMMtpbO3UlwWPzr+EyCXaxbSrYg/ZSSmbyXICMrgPEhJj7cq?= =?us-ascii?Q?1zBf1NxMOJ/L/3k1jHlbOocnOQoxWfad3SmNFw+T7W8JOFqHrp3mHPoyLd9W?= =?us-ascii?Q?5cQjOUNZBQk7Yuouea8bqTLtBjolJSjlpCoyU27xFbwdOZwCF8wAdcRVPj+k?= =?us-ascii?Q?W2pyd2p7pPBd1WFjDQ1xjPkl?= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 971e8b8f-f972-46d2-c4bc-08d966dac464 X-MS-Exchange-CrossTenant-AuthSource: AM7PR08MB5494.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Aug 2021 08:40:03.5289 (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: yNqrI14cPBINLKAW90KsWZz5JzLdCuxInqj1ct7hlmXxuPMkfiiRuI4pwMyxcUIZfO1eF2vk8y1nORtpaiiaPv/AWJyRrnz9y+rOCzBOGZk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB5077 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=40.107.13.131; envelope-from=vsementsov@virtuozzo.com; helo=EUR01-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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @virtuozzo.com) X-ZM-MESSAGEID: 1629796044275100001 Content-Type: text/plain; charset="utf-8" We are going to add a test-case with some behavior modifications. So, let's prepare a function to be reused. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/tests/image-fleecing | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/tests/qemu-iotests/tests/image-fleecing b/tests/qemu-iotests/t= ests/image-fleecing index ec4ef5f3f6..e210c00d28 100755 --- a/tests/qemu-iotests/tests/image-fleecing +++ b/tests/qemu-iotests/tests/image-fleecing @@ -48,12 +48,7 @@ remainder =3D [('0xd5', '0x108000', '32k'), # Right-end= of partial-left [1] ('0xdc', '32M', '32k'), # Left-end of partial-right [2] ('0xcd', '0x3ff0000', '64k')] # patterns[3] =20 -with iotests.FilePath('base.img') as base_img_path, \ - iotests.FilePath('fleece.img') as fleece_img_path, \ - iotests.FilePath('nbd.sock', - base_dir=3Diotests.sock_dir) as nbd_sock_path, \ - iotests.VM() as vm: - +def do_test(base_img_path, fleece_img_path, nbd_sock_path, vm): log('--- Setting up images ---') log('') =20 @@ -163,3 +158,15 @@ with iotests.FilePath('base.img') as base_img_path, \ =20 log('') log('Done') + + +def test(): + with iotests.FilePath('base.img') as base_img_path, \ + iotests.FilePath('fleece.img') as fleece_img_path, \ + iotests.FilePath('nbd.sock', + base_dir=3Diotests.sock_dir) as nbd_sock_path, \ + iotests.VM() as vm: + do_test(base_img_path, fleece_img_path, nbd_sock_path, vm) + + +test() --=20 2.29.2