From nobody Thu Nov 14 07:07:46 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=1dmarc=pass fromdomain=virtuozzo.com); dmarc=pass(p=quarantine dis=none) header.from=virtuozzo.com ARC-Seal: i=2; a=rsa-sha256; t=1621521733; cv=pass; d=zohomail.com; s=zohoarc; b=BP13bH5JN5MSdqYmqzvSJ1GQU0lRJpZK9PSaqqCVD5hjnHIRpzFnMC3J1fWcOVLyztIwuR5+IeJxoDo6Kgo0RCFakOvcEaZ+nXo1uDocxV/q/Y3VDBEvnRHUfLlWlQULoYkohfCys5L3grq46kSFmMbXDHh0KywWfeOgFybPlRI= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621521733; 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=S788zpFtUV3yvt0smeND5HyWBA0WB4Bo5L0uTDR4kHE=; b=R+0g0gkWJwWoHtjUHQBPVm/JNNV8eFhc1W4UJ417UyTOlsCaT2NKfOjY0zF9rDlc1Afzu1bYqbjWlN8octLzKRGQbaMZKgTPAHvCndqF93dkBSXCbHNjTbI2isBbtva7Kf12ZYQ7bl+9zWhlPjUoPBGMPRV/58cQoNopDHMqyQI= 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=1dmarc=pass fromdomain=virtuozzo.com); dmarc=pass header.from= (p=quarantine dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1621521733488356.9307201240413; Thu, 20 May 2021 07:42:13 -0700 (PDT) Received: from localhost ([::1]:43926 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljjsK-0004xZ-86 for importer@patchew.org; Thu, 20 May 2021 10:42:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60898) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljjZu-0006FO-LZ; Thu, 20 May 2021 10:23:10 -0400 Received: from mail-eopbgr10092.outbound.protection.outlook.com ([40.107.1.92]:6738 helo=EUR02-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 1ljjZs-0005se-Nr; Thu, 20 May 2021 10:23:10 -0400 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM6PR08MB4072.eurprd08.prod.outlook.com (2603:10a6:20b:a8::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23; Thu, 20 May 2021 14:22:58 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::b403:c1a9:6bb7:133]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::b403:c1a9:6bb7:133%7]) with mapi id 15.20.4129.033; Thu, 20 May 2021 14:22:58 +0000 Received: from localhost.localdomain (185.215.60.197) by HE1P190CA0034.EURP190.PROD.OUTLOOK.COM (2603:10a6:7:52::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23 via Frontend Transport; Thu, 20 May 2021 14:22:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ldM8tKL8WbE4FXWC+S8eP7JDpIn7vwZ4721wfW2zK93W+qqE7tLteXz9RFMMkvIdpmgWP56pS5TiK0iEA8kFTpDK777UyAd1y40UAGjqvMXMd12wCR+23PM2CTKMiIwFPZeqbbU4d1sGd9791hmJZuC1SdtGs/gAA1H/eVYsKGdplH1UyrRP1z1ywXk90Y5rliNcARKukrqe2cH0o8/IS4ZCTt4uoDye6EH0fbX1o61CeHoS9HeM3ZWlArVIWEH4gK0xCkxX35BKQ1cUZGg+BnI6yrAh9/MUzoJBI816TA9npQ+yENA2lqE4qO90HWzJGde7HlcNBkNOHDJEXefhow== 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=S788zpFtUV3yvt0smeND5HyWBA0WB4Bo5L0uTDR4kHE=; b=S6YxBodnGzfYnqQ12OQve/1egHymqny5rTZKTg7Akab8WG6Lr+SFZPB5mX8Xukil5XeMFlJ0uP/rny26L/SwGpQ875RTDeXQr7Ik2ykebRerYn1tSaMmwk0F5Pah7FLnrA0wGrnZfi+EgKophlN1zCrelY19734sA161HPvr5xZHdIDmLhPZKEQQr4GqbswgsRLczeHFIctCJ8fCVLzTB3hKPtW/LUBCGpObDV9lrjOyKgtBlCubM25c972af74gXWAZ60jCdz0DMs+9xkqVLGI1KTSnq6ybo4pjj6Pf9Pd27v8zkyCbEHjXl9duQlCFMiPUPg3NV44tLBoHQhM0yA== 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=S788zpFtUV3yvt0smeND5HyWBA0WB4Bo5L0uTDR4kHE=; b=tKZF83njgZb30rQqLELK1F1H1uX/9yIyX2qIylTlc0Z1wO2t/LWEaRxwGP0t6BE7N9kML8IAVUA40YBF04lQTUYXe1Uil3xWQ3Y7naxCfhg0vEHhAGhOgusIuJtlQTcvzPfoagxBGAxHDiTVPxLxrAou3hXee0t2g/fcZll1YBU= 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, mreitz@redhat.com, kwolf@redhat.com, den@openvz.org Subject: [PATCH v2 25/33] iotests.py: VM: add own __enter__ method Date: Thu, 20 May 2021 17:21:57 +0300 Message-Id: <20210520142205.607501-26-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210520142205.607501-1-vsementsov@virtuozzo.com> References: <20210520142205.607501-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-Originating-IP: [185.215.60.197] X-ClientProxiedBy: HE1P190CA0034.EURP190.PROD.OUTLOOK.COM (2603:10a6:7:52::23) 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: 686cfe73-e8f8-4954-7a23-08d91b9ac48a X-MS-TrafficTypeDiagnostic: AM6PR08MB4072: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1107; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CjGmbon400Ne5vB14/prVuQ+03GcpNFeT33c0wTvg89JzZYZAPlhoC5jWrkI1iRu8HWkp3RAwtZ1EUUgffD26s9EPx9eSYmslee7Xvch/896bVB1GRJxV/zy46RtbQsa0nAguj6jI0hpBt6PGvLQi2X4e+eBJAsJIUrTetOF4Ge5rVq5x+YyYF+jGjiW+HJF4B6B10eaFgYGI1waOGtCCXiDuWaR8oqUQJe+vyASSbDFIRV8si9OJjdx/4km8BpAEcYoxfhFz+J0vZ+5gq7KYCn17/V8yQeX0GN3KtwEsXn/7jZds8R1d3/J+aXedOwBPSNX/J46/Y3EkvsnT9VLjbviuQFa7LuBjtDRmEcS2KRK6eptiMoJNTrjovqXNpOecumNyy6fCBU+XYohozO9PeIYAdnechMBCYsGtv8DlOhcODLnc00pGa6klebil16hhB1hPLLTtpLhlVGjLTbqW8R/6xZuLLo0LT2xHi4+nmp7Wv07qiIslIeCdTdyZ2ZVb5DtV6Rci32jANISIqus7Pmo+lfMY0UErzTKstF7LTVLMAiUjdBJ2+fBPezBlUQv7NyoF9VBIlX17ZskZK3Y5YjkyXlky2/qGW5u9mtuGd+h4RnGEWewcmxBeyFL0e1gnE772erbQsp8FqIYJiLNHvsOF+7NjxznMgjmgM02TikFCogmIGqAfa1oAixz+Qjs 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)(376002)(136003)(366004)(39840400004)(396003)(346002)(38100700002)(478600001)(186003)(1076003)(38350700002)(2906002)(36756003)(4326008)(4744005)(26005)(52116002)(6506007)(6486002)(66556008)(6512007)(66946007)(2616005)(66476007)(8676002)(16526019)(956004)(6916009)(8936002)(107886003)(86362001)(316002)(5660300002)(7416002)(69590400013); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?2kS62sqKmMaI+EUiIC92eA9+3xklhdZUzj3z3yR717vma+gDc/k/CdZ2csk6?= =?us-ascii?Q?xs7nnDK9a59Sn0U/JC8XcURG4vCE7RADQr9/YGF5Ez9YQV/y+8szsT5tF1qB?= =?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/u4G+qEj0FyiPOVJmy8h1ov+Z?= =?us-ascii?Q?HX1rphgZesfs6slDE9lBdP83afDEk1K7CVEXFzFn4zkJAex+kgcMDTQpqknE?= =?us-ascii?Q?VRzW0M0tvK63hkpEcRZVjvdAuGR97qwPdRfxLgqXCZGSvi+3d+PZhoWZ35Pd?= =?us-ascii?Q?gcRSlRlQq479EhDhp7yqc3W8PRqggK3/fW0ejNidOZt34tcY5fhfd4IAYdtD?= =?us-ascii?Q?cr7VcqdOiYm1Hfy63RRz5U3HSZqfwjFOTyvH+l8N6+XbqaagXrW+uUa+XY6F?= =?us-ascii?Q?xLU0iFw7a7lWMy+d72A2lVdy+EE0+8ge0jBmYfpiq1Bd+EmK/Ab4IgxzEI1f?= =?us-ascii?Q?T2f4SXxfe1KARy/p7JL2eRcb?= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 686cfe73-e8f8-4954-7a23-08d91b9ac48a X-MS-Exchange-CrossTenant-AuthSource: AM7PR08MB5494.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 May 2021 14:22:58.7352 (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: BmT2LsLPPJ3BuhyNOLnk2JNLcdgbLkv5XxAZ24K7DxKC4EHTdPaTUhVVqz1ASzKq8KdKiZzd7RNNmehjhuvSlt/Wl1y0mPVH5sAvVyoy33Y= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4072 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.1.92; envelope-from=vsementsov@virtuozzo.com; helo=EUR02-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) Content-Type: text/plain; charset="utf-8" In superclass __enter__ method is defined with return value type hint 'QEMUMachine'. So, mypy thinks that return value of VM.__enter__ is QEMUMachine. Let's redefine __enter__ in VM class, to give it correct type hint. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/iotests.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 777fa2ec0e..c7ec16c082 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -568,6 +568,10 @@ def remote_filename(path): class VM(qtest.QEMUQtestMachine): '''A QEMU VM''' =20 + # Redefine __enter__ with proper type hint + def __enter__(self) -> 'VM': + return self + def __init__(self, path_suffix=3D''): name =3D "qemu%s-%d" % (path_suffix, os.getpid()) super().__init__(qemu_prog, qemu_opts, name=3Dname, --=20 2.29.2