From patchwork Wed Oct 21 14:58:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Sementsov-Ogievskiy X-Patchwork-Id: 1385603 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=virtuozzo.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=virtuozzo.com header.i=@virtuozzo.com header.a=rsa-sha256 header.s=selector2 header.b=Rz/VEsZ3; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4CGYsx4JMHz9sRk for ; Thu, 22 Oct 2020 02:13:41 +1100 (AEDT) Received: from localhost ([::1]:51422 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kVFo3-00058h-GZ for incoming@patchwork.ozlabs.org; Wed, 21 Oct 2020 11:13:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58666) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVFaT-0006KC-HJ; Wed, 21 Oct 2020 10:59:37 -0400 Received: from mail-eopbgr70109.outbound.protection.outlook.com ([40.107.7.109]:36743 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 1kVFaP-00085a-Vz; Wed, 21 Oct 2020 10:59:37 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FH1Ah0DQgkY54V8axLt46CzxrHJzNtmKlurp/csRr7n4fl3eZhG60GfEVMQJPilAlCY7wI4gXPfa68lRSRQBhHZ51w5KfoCKgtc7Po2kNBSOkCmL/RDE0AgC/OO5qDn3xQWhSh6quhiMJHYiID07CvZDwMxdGpDEloeiBr9ZDP7G7MixZZOJNjbU9qhCPawWNRyzg4QEh2AH7J+nXz5n08bXpjTBuHN/0Xlf13r9z6K3B/YligqX4NkJkAkt/qOQrytMzsUR3EqFm9tGkVjBIdOaJ2BAzyxK1RCHCOAuNiGTwgLTLXnNdJe6ucwPtZZWlPfdqJLSOnTBNwWolDRZWA== 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=oR0ONDRoF+5EK3YWXkG8xZVzxx8Bn9qVxrPG41lbUIo=; b=SdygHUUlfgwzzM0GTGs18IGcG8d96sRuGjQTRp973dnUGMBFv4ffGFHbhJYbWwQ0Lp9naTlWUZsLxuwanm93pXsY9sssIkDgMfG3Sajd0FF+/w3cl8j9XYju2++XoooFyZbPiz+fgENf6eWzFZ0zQU5dmNnwJxZ/EHs53bYkKtPHEDDYhOaw5gmkHHmyf3KqU9KMY9COPf3wS4iS6RHJIkYV0yzQa621epdY9BB7ASWY7BakOIIhYScfl8ErwwSM35vUrDju+A+Ehf/kuFVSzolpvJWXrQ+9k1maervT/okBNY6RIEjwqu2gKj8zmg5HiNocLhIPomfJUB+jSu/w6w== 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=oR0ONDRoF+5EK3YWXkG8xZVzxx8Bn9qVxrPG41lbUIo=; b=Rz/VEsZ3gC+IA2UbqHXDYsD1q+M5dq7R/IwIGEcm3kOVvt8bXkzD02CZDtTqgJ3nfe7iGQtR+6AurQQRFico77KLFBezt1IOll1z49ivmT9h+LEEDcfju4rj+n9iRJJBd817hGf/pYbssxuDabJseZMtw3OWLa/8KC3zDHhi8RY= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=virtuozzo.com; Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM6PR08MB4472.eurprd08.prod.outlook.com (2603:10a6:20b:bf::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.18; Wed, 21 Oct 2020 14:59:22 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::fd02:1330:f620:1243]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::fd02:1330:f620:1243%9]) with mapi id 15.20.3499.018; Wed, 21 Oct 2020 14:59:22 +0000 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, vsementsov@virtuozzo.com, eblake@redhat.com, armbru@redhat.com, fam@euphon.net, stefanha@redhat.com, mreitz@redhat.com, kwolf@redhat.com, den@virtuozzo.com Subject: [PATCH v7 11/21] iotests.py: execute_setup_common(): add required_fmts argument Date: Wed, 21 Oct 2020 17:58:49 +0300 Message-Id: <20201021145859.11201-12-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20201021145859.11201-1-vsementsov@virtuozzo.com> References: <20201021145859.11201-1-vsementsov@virtuozzo.com> X-Originating-IP: [185.215.60.82] X-ClientProxiedBy: AM0PR03CA0091.eurprd03.prod.outlook.com (2603:10a6:208:69::32) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from kvm.sw.ru (185.215.60.82) by AM0PR03CA0091.eurprd03.prod.outlook.com (2603:10a6:208:69::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.18 via Frontend Transport; Wed, 21 Oct 2020 14:59:21 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: eee0852b-3f37-4d21-af35-08d875d1e4dc X-MS-TrafficTypeDiagnostic: AM6PR08MB4472: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3513; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eaRd9JQqcVY9mCROnJ85r/yN/SkZMnMDpZqF/IGX3lFOtY5UKurTKeJ4x0x0sBZznFMZswCQ6+j7WKs6OH8j1xQ7ytQ7dwkhY7I9CXmIcK76Ez7797W1Znm4pZCeX5415B3rtxtzC87XsJxx7YWWkVYMzWJKwFYozktbI9Zn3f9oNKr7YQScyw9V0gf9LbjXR7CUIb5Ad8winX1+6E69Q/CiBNQ8neOHJt07EHKwFaDkV8ymA+Vtkx0wsF5NbK9lcGX3PHHwS0/GBg800RLKXfQ9ejVb+F7lFK9d00Epg0YwhxlqNBapyom4+NBi5THa3fi6A9lGtVCrUGoeXBKdWA== 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)(346002)(39840400004)(66556008)(16526019)(66476007)(83380400001)(6512007)(26005)(478600001)(66946007)(186003)(6506007)(6916009)(86362001)(1076003)(6486002)(8936002)(2906002)(5660300002)(52116002)(8676002)(2616005)(6666004)(316002)(956004)(107886003)(4326008)(36756003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: fNaSr8K159Gujp6iOX2IXF5nbXqOvzbK8KydD+RvwMkRE0jIyfnvEcpJAJoYskLoHFvvZB/ACdqugJeKkHgjzv1FqVIZNbr4Zd3lik+f0d6bodmnorOR6OP6RtMmlmoNlzpztFuGD7l2YB+CMBIiutxXiXkXPtIHK2hb3ZrqUMiIM82d696li/H0YzcOFGgxghQKAy3SiVLz5HYxajA5CpCcS2Ha1LshrazqEl2N6tURLkFv0GUypiZf+8vNqZpXehWmyvM9FVTvS3Yp1wYbd5qtstoGk4ROcPGVBEyks7TjMniywczxUILl2hDGGcrmBzziwbtbHWAhy577nQn+RgKCoP3Q6YsdKeH7Ct/xXCDlEgjXhJyOWAy8Ea7IgSbX8B6T+XWsxqljFoj5Y/3loRreNSBw9G+3ufhr5pvJfpbb2IueNKeAjXYk2NTaulnuQXxUXkVDA8KAbPau/SOVKT2lGWhcn67UiJeHHcMPHXeefNn/dUxmDKSr4Pj8hf2GNeO7e+BpUTPzS4xWAIVUJB7Vm4skvm7eBaB/7vxVIKXBpyIqU5Q2YmSNDW06ymjDZ7jFhZplUFvDFfhQCxNNQvQMayQ4SKTnuTbUA8ulIndm1BE45Rag+GA1DynSmDx1ozgLW/gGdPvhF3RW/2zk/g== X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: eee0852b-3f37-4d21-af35-08d875d1e4dc X-MS-Exchange-CrossTenant-AuthSource: AM7PR08MB5494.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2020 14:59:22.2661 (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: 5RkgVJjlHNmCKvgZwNk9O9WsRILBvAV6QBlmGfllnIiNJD3nstkSCateo3RoagY+jEDC0SizVKS3ysZUbaC+FXSvCDLW1qUN2UCcqu9CXbE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4472 Received-SPF: pass client-ip=40.107.7.109; envelope-from=vsementsov@virtuozzo.com; helo=EUR04-HE1-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/21 10:59:15 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Add a parameter to skip test if some needed additional formats are not supported (for example filter drivers). Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/iotests.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 0e3d1d0ba3..274396b14e 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -1109,6 +1109,11 @@ def _verify_aio_mode(supported_aio_modes: Sequence[str] = ()) -> None: if supported_aio_modes and (aiomode not in supported_aio_modes): notrun('not suitable for this aio mode: %s' % aiomode) +def _verify_formats(required_formats: Sequence[str] = ()) -> None: + usf_list = list(set(required_formats) - set(supported_formats())) + if usf_list: + notrun(f'formats {usf_list} are not whitelisted') + def supports_quorum(): return 'quorum' in qemu_img_pipe('--help') @@ -1266,7 +1271,8 @@ def execute_setup_common(supported_fmts: Sequence[str] = (), supported_aio_modes: Sequence[str] = (), unsupported_fmts: Sequence[str] = (), supported_protocols: Sequence[str] = (), - unsupported_protocols: Sequence[str] = ()) -> bool: + unsupported_protocols: Sequence[str] = (), + required_fmts: Sequence[str] = ()) -> bool: """ Perform necessary setup for either script-style or unittest-style tests. @@ -1292,6 +1298,7 @@ def execute_setup_common(supported_fmts: Sequence[str] = (), _verify_platform(supported=supported_platforms) _verify_cache_mode(supported_cache_modes) _verify_aio_mode(supported_aio_modes) + _verify_formats(required_fmts) return debug