From nobody Sun Feb 8 13:36:23 2026 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; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1762856578; cv=none; d=zohomail.com; s=zohoarc; b=UTJ7zTI5XbYMN0W0aJ2fHL80lCSz7nPGK4sHgyUTK37APUOYy+LEKrO0d7+p9ThhixTYq+ih9p8ydbrvUva0Y+nL/BUvQXlrUZdc7j8BgRfPZh2L1Kih3ZcIw2fDfna/G3n5LlocrwjPqgdgJoyByaiUQ8sgSPNLWOYAdxfuqcg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1762856578; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=zdA/0YurBoYCyU7c6uV4yb0KbzFh7JxeG3Sw0XPSv+Q=; b=ZTuQNJRLX0hMgdKci+nlL1rvpBfC84K319Ui/k8U7hgz2x+jR7WHnyE8CQGjRRlGar8ju8b9y90Nhu8Hgu5IflFbazIDnZlS2aBFAkniwo1U51khpIiKGQ2TtCH7zf4C7DMQrW+9uZVKm4kEEoKQb7h7+JCggChj+Ht2ceiIvzQ= ARC-Authentication-Results: i=1; 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; 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 1762856578074435.31104287651647; Tue, 11 Nov 2025 02:22:58 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vIlVs-0000ef-H7; Tue, 11 Nov 2025 05:22:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vIlVr-0000cq-8F for qemu-devel@nongnu.org; Tue, 11 Nov 2025 05:22:11 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vIlVo-0007YI-Fk for qemu-devel@nongnu.org; Tue, 11 Nov 2025 05:22:10 -0500 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-387-oDJEeTONO1upspQL3aF3DQ-1; Tue, 11 Nov 2025 05:22:03 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1A4F4193E8AC; Tue, 11 Nov 2025 10:22:03 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.33.97]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id CCBAA30044E0; Tue, 11 Nov 2025 10:22:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1762856527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zdA/0YurBoYCyU7c6uV4yb0KbzFh7JxeG3Sw0XPSv+Q=; b=MQ2j3mswrtsqCYUiiGVoWaSwGsePr7pihccwhYJtO6jNuoG1iJt9fXASuXeh+sNumCK++t 9ULhMp5bHgjHkT07IWUWXYcWO9HZuRaCJPSWXX0DodGaLWQ+hp4D1jLnkvnfQpFX9xhPmL mUPXdnj1VZkkmXs0NETxrRz9m+76glQ= X-MC-Unique: oDJEeTONO1upspQL3aF3DQ-1 X-Mimecast-MFC-AGG-ID: oDJEeTONO1upspQL3aF3DQ_1762856523 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 1/4] tests/functional: Fix problems in testcase.py reported by pylint Date: Tue, 11 Nov 2025 11:21:55 +0100 Message-ID: <20251111102158.92091-2-thuth@redhat.com> In-Reply-To: <20251111102158.92091-1-thuth@redhat.com> References: <20251111102158.92091-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1762856581026158500 From: Thomas Huth - put 3rd party "import pycotap" after the standard imports - "help" is a built-in function in Python, don't use it as a variable name - put the doc strings in the right locations (after the "def" line) - use isinstance() instead of checking via type() Message-Id: Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Thomas Huth --- tests/functional/qemu_test/testcase.py | 243 +++++++++++++------------ 1 file changed, 122 insertions(+), 121 deletions(-) diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu= _test/testcase.py index 1d773dd697d..58f27401004 100644 --- a/tests/functional/qemu_test/testcase.py +++ b/tests/functional/qemu_test/testcase.py @@ -14,7 +14,6 @@ import logging import os from pathlib import Path -import pycotap import shutil from subprocess import run import sys @@ -23,6 +22,8 @@ import unittest import uuid =20 +import pycotap + from qemu.machine import QEMUMachine from qemu.utils import hvf_available, kvm_available, tcg_available =20 @@ -34,50 +35,50 @@ =20 class QemuBaseTest(unittest.TestCase): =20 - ''' - @params compressed: filename, Asset, or file-like object to uncompress - @params format: optional compression format (gzip, lzma) + def uncompress(self, compressed, format=3DNone): + ''' + @params compressed: filename, Asset, or file-like object to uncomp= ress + @params format: optional compression format (gzip, lzma) =20 - Uncompresses @compressed into the scratch directory. + Uncompresses @compressed into the scratch directory. =20 - If @format is None, heuristics will be applied to guess the format - from the filename or Asset URL. @format must be non-None if @uncompres= sed - is a file-like object. + If @format is None, heuristics will be applied to guess the + format from the filename or Asset URL. @format must be non-None + if @uncompressed is a file-like object. =20 - Returns the fully qualified path to the uncompressed file - ''' - def uncompress(self, compressed, format=3DNone): + Returns the fully qualified path to the uncompressed file + ''' self.log.debug(f"Uncompress {compressed} format=3D{format}") - if type(compressed) =3D=3D Asset: + if isinstance(compressed, Asset): compressed.fetch() =20 - (name, ext) =3D os.path.splitext(str(compressed)) + (name, _ext) =3D os.path.splitext(str(compressed)) uncompressed =3D self.scratch_file(os.path.basename(name)) =20 uncompress(compressed, uncompressed, format) =20 return uncompressed =20 - ''' - @params archive: filename, Asset, or file-like object to extract - @params format: optional archive format (tar, zip, deb, cpio) - @params sub_dir: optional sub-directory to extract into - @params member: optional member file to limit extraction to - - Extracts @archive into the scratch directory, or a directory beneath - named by @sub_dir. All files are extracted unless @member specifies - a limit. - - If @format is None, heuristics will be applied to guess the format - from the filename or Asset URL. @format must be non-None if @archive - is a file-like object. - - If @member is non-None, returns the fully qualified path to @member - ''' def archive_extract(self, archive, format=3DNone, sub_dir=3DNone, memb= er=3DNone): + ''' + @params archive: filename, Asset, or file-like object to extract + @params format: optional archive format (tar, zip, deb, cpio) + @params sub_dir: optional sub-directory to extract into + @params member: optional member file to limit extraction to + + Extracts @archive into the scratch directory, or a directory benea= th + named by @sub_dir. All files are extracted unless @member specifies + a limit. + + If @format is None, heuristics will be applied to guess the + format from the filename or Asset URL. @format must be non-None + if @archive is a file-like object. + + If @member is non-None, returns the fully qualified path to @member + ''' self.log.debug(f"Extract {archive} format=3D{format}" + f"sub_dir=3D{sub_dir} member=3D{member}") - if type(archive) =3D=3D Asset: + if isinstance(archive, Asset): archive.fetch() if sub_dir is None: archive_extract(archive, self.scratch_file(), format, member) @@ -89,108 +90,108 @@ def archive_extract(self, archive, format=3DNone, sub= _dir=3DNone, member=3DNone): return self.scratch_file(member) return None =20 - ''' - Create a temporary directory suitable for storing UNIX - socket paths. - - Returns: a tempfile.TemporaryDirectory instance - ''' def socket_dir(self): + ''' + Create a temporary directory suitable for storing UNIX + socket paths. + + Returns: a tempfile.TemporaryDirectory instance + ''' if self.socketdir is None: self.socketdir =3D tempfile.TemporaryDirectory( prefix=3D"qemu_func_test_sock_") return self.socketdir =20 - ''' - @params args list of zero or more subdirectories or file - - Construct a path for accessing a data file located - relative to the source directory that is the root for - functional tests. - - @args may be an empty list to reference the root dir - itself, may be a single element to reference a file in - the root directory, or may be multiple elements to - reference a file nested below. The path components - will be joined using the platform appropriate path - separator. - - Returns: string representing a file path - ''' def data_file(self, *args): + ''' + @params args list of zero or more subdirectories or file + + Construct a path for accessing a data file located + relative to the source directory that is the root for + functional tests. + + @args may be an empty list to reference the root dir + itself, may be a single element to reference a file in + the root directory, or may be multiple elements to + reference a file nested below. The path components + will be joined using the platform appropriate path + separator. + + Returns: string representing a file path + ''' return str(Path(Path(__file__).parent.parent, *args)) =20 - ''' - @params args list of zero or more subdirectories or file - - Construct a path for accessing a data file located - relative to the build directory root. - - @args may be an empty list to reference the build dir - itself, may be a single element to reference a file in - the build directory, or may be multiple elements to - reference a file nested below. The path components - will be joined using the platform appropriate path - separator. - - Returns: string representing a file path - ''' def build_file(self, *args): - return str(Path(BUILD_DIR, *args)) + ''' + @params args list of zero or more subdirectories or file =20 - ''' - @params args list of zero or more subdirectories or file + Construct a path for accessing a data file located + relative to the build directory root. =20 - Construct a path for accessing/creating a scratch file - located relative to a temporary directory dedicated to - this test case. The directory and its contents will be - purged upon completion of the test. + @args may be an empty list to reference the build dir + itself, may be a single element to reference a file in + the build directory, or may be multiple elements to + reference a file nested below. The path components + will be joined using the platform appropriate path + separator. =20 - @args may be an empty list to reference the scratch dir - itself, may be a single element to reference a file in - the scratch directory, or may be multiple elements to - reference a file nested below. The path components - will be joined using the platform appropriate path - separator. + Returns: string representing a file path + ''' + return str(Path(BUILD_DIR, *args)) =20 - Returns: string representing a file path - ''' def scratch_file(self, *args): + ''' + @params args list of zero or more subdirectories or file + + Construct a path for accessing/creating a scratch file + located relative to a temporary directory dedicated to + this test case. The directory and its contents will be + purged upon completion of the test. + + @args may be an empty list to reference the scratch dir + itself, may be a single element to reference a file in + the scratch directory, or may be multiple elements to + reference a file nested below. The path components + will be joined using the platform appropriate path + separator. + + Returns: string representing a file path + ''' return str(Path(self.workdir, *args)) =20 - ''' - @params args list of zero or more subdirectories or file - - Construct a path for accessing/creating a log file - located relative to a temporary directory dedicated to - this test case. The directory and its log files will be - preserved upon completion of the test. - - @args may be an empty list to reference the log dir - itself, may be a single element to reference a file in - the log directory, or may be multiple elements to - reference a file nested below. The path components - will be joined using the platform appropriate path - separator. - - Returns: string representing a file path - ''' def log_file(self, *args): + ''' + @params args list of zero or more subdirectories or file + + Construct a path for accessing/creating a log file + located relative to a temporary directory dedicated to + this test case. The directory and its log files will be + preserved upon completion of the test. + + @args may be an empty list to reference the log dir + itself, may be a single element to reference a file in + the log directory, or may be multiple elements to + reference a file nested below. The path components + will be joined using the platform appropriate path + separator. + + Returns: string representing a file path + ''' return str(Path(self.outputdir, *args)) =20 - ''' - @params plugin name - - Return the full path to the plugin taking into account any host OS - specific suffixes. - ''' def plugin_file(self, plugin_name): + ''' + @params plugin name + + Return the full path to the plugin taking into account any host OS + specific suffixes. + ''' sfx =3D dso_suffix() return os.path.join('tests', 'tcg', 'plugins', f'{plugin_name}.{sf= x}') =20 def assets_available(self): for name, asset in vars(self.__class__).items(): - if name.startswith("ASSET_") and type(asset) =3D=3D Asset: + if name.startswith("ASSET_") and isinstance(asset, Asset): if not asset.available(): self.log.debug(f"Asset {asset.url} not available") return False @@ -216,9 +217,9 @@ def setUp(self): self.log.setLevel(logging.DEBUG) self._log_fh =3D logging.FileHandler(self.log_filename, mode=3D'w') self._log_fh.setLevel(logging.DEBUG) - fileFormatter =3D logging.Formatter( + file_formatter =3D logging.Formatter( '%(asctime)s - %(levelname)s: %(name)s.%(funcName)s %(message)= s') - self._log_fh.setFormatter(fileFormatter) + self._log_fh.setFormatter(file_formatter) self.log.addHandler(self._log_fh) =20 # Capture QEMUMachine logging @@ -260,7 +261,7 @@ def main(): res =3D unittest.main(module =3D None, testRunner =3D tr, exit =3D= False, argv=3D[sys.argv[0], path] + sys.argv[1:]) failed =3D {} - for (test, message) in res.result.errors + res.result.failures: + for (test, _message) in res.result.errors + res.result.failures: if hasattr(test, "log_filename") and not test.id() in failed: print('More information on ' + test.id() + ' could be foun= d here:' '\n %s' % test.log_filename, file=3Dsys.stderr) @@ -279,7 +280,9 @@ def setUp(self): def add_ldpath(self, ldpath): self._ldpath.append(os.path.abspath(ldpath)) =20 - def run_cmd(self, bin_path, args=3D[]): + def run_cmd(self, bin_path, args=3DNone): + if args is None: + args =3D [] return run([self.qemu_bin] + ["-L %s" % ldpath for ldpath in self._ldpath] + [bin_path] @@ -304,8 +307,8 @@ def setUp(self): self._console_log_fh =3D logging.FileHandler(self.console_log_name, mode=3D'w') self._console_log_fh.setLevel(logging.DEBUG) - fileFormatter =3D logging.Formatter('%(asctime)s: %(message)s') - self._console_log_fh.setFormatter(fileFormatter) + file_formatter =3D logging.Formatter('%(asctime)s: %(message)s') + self._console_log_fh.setFormatter(file_formatter) console_log.addHandler(self._console_log_fh) =20 def set_machine(self, machinename): @@ -343,17 +346,15 @@ def require_accelerator(self, accelerator): "available" % accelerator) =20 def require_netdev(self, netdevname): - help =3D run([self.qemu_bin, - '-M', 'none', '-netdev', 'help'], - capture_output=3DTrue, check=3DTrue, encoding=3D'utf8')= .stdout; - if help.find('\n' + netdevname + '\n') < 0: + helptxt =3D run([self.qemu_bin, '-M', 'none', '-netdev', 'help'], + capture_output=3DTrue, check=3DTrue, encoding=3D'utf= 8').stdout + if helptxt.find('\n' + netdevname + '\n') < 0: self.skipTest('no support for " + netdevname + " networking') =20 def require_device(self, devicename): - help =3D run([self.qemu_bin, - '-M', 'none', '-device', 'help'], - capture_output=3DTrue, check=3DTrue, encoding=3D'utf8')= .stdout; - if help.find(devicename) < 0: + helptxt =3D run([self.qemu_bin, '-M', 'none', '-device', 'help'], + capture_output=3DTrue, check=3DTrue, encoding=3D'utf8')= .stdout + if helptxt.find(devicename) < 0: self.skipTest('no support for device ' + devicename) =20 def _new_vm(self, name, *args): @@ -415,7 +416,7 @@ def tearDown(self): try: vm.shutdown() except Exception as ex: - self.log.error("Failed to teardown VM: %s" % ex) + self.log.error("Failed to teardown VM: %s", ex) logging.getLogger('console').removeHandler(self._console_log_fh) self._console_log_fh.close() super().tearDown() --=20 2.51.1 From nobody Sun Feb 8 13:36:23 2026 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; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1762856563; cv=none; d=zohomail.com; s=zohoarc; b=ISxwKa2Go7wIFeqqgEj3f6xK6PDkMQxm+u669a9x0pzzVj3bzw+DF68Kh38Y/xaZ9B4uSxt8U6QxV32T8ijeWbmN1yVEP22D1N00GTfUsaY10n48Ng2gg8QL70oJhty1IW1cRxU8ebRHYpuhXurHUjDxAGGtgtlcaNGcNxOMOuU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1762856563; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=0oRc0cVg4BRzb1rR189tQt8bOHQIgTDWGlHbTWP4PKg=; b=B6CVOfLJkqhm2tmhIzwi8Sy1GWI1bStf5vbLyqQ2oH7N/B5ZuSBbCGEy9dvVRSm453fguocB36hxc96uNls3VidKlm/qUqaXx+jXW7wxgv4imRq9aLXmqVDAtEtFt2ygBcph3rivwmAA5Nu6MJj7QEASVbJ3N59KcFcPJuK7Ohc= ARC-Authentication-Results: i=1; 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; 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 1762856563626277.69826146463015; Tue, 11 Nov 2025 02:22:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vIlVy-0000mp-HO; Tue, 11 Nov 2025 05:22:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vIlVs-0000g1-Ti for qemu-devel@nongnu.org; Tue, 11 Nov 2025 05:22:13 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vIlVr-0007Yu-0P for qemu-devel@nongnu.org; Tue, 11 Nov 2025 05:22:12 -0500 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-221-Wkk0MzCMM3q6jtaiiWNPmg-1; Tue, 11 Nov 2025 05:22:06 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0BA811956094; Tue, 11 Nov 2025 10:22:05 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.33.97]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id BD27F30044E1; Tue, 11 Nov 2025 10:22:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1762856530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0oRc0cVg4BRzb1rR189tQt8bOHQIgTDWGlHbTWP4PKg=; b=XIf37awIqWSGYqMOTCRFQhlQGEG8DrPa5Yj+MqIOj0la4cutujnr4Q3PQkzkocQAxqFlK3 IjM4iPHZQmfczFOgdYXtTpLoJmnqNpa3gt7jHahnPZgh3b44Fkq4NHQumYd+rOrR0Ewd5U K0cYYCWK9EJIWGl8tlzrY4tKoEGR6cQ= X-MC-Unique: Wkk0MzCMM3q6jtaiiWNPmg-1 X-Mimecast-MFC-AGG-ID: Wkk0MzCMM3q6jtaiiWNPmg_1762856525 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 2/4] tests/functional/aarch64/test_device_passthrough: Fix warnings from pylint Date: Tue, 11 Nov 2025 11:21:56 +0100 Message-ID: <20251111102158.92091-3-thuth@redhat.com> In-Reply-To: <20251111102158.92091-1-thuth@redhat.com> References: <20251111102158.92091-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1762856566237153000 Content-Type: text/plain; charset="utf-8" From: Thomas Huth Remove unused imports, write constants with capital letters and make sure that the code uses the right indentation / formatting. Signed-off-by: Thomas Huth Message-ID: <20251030143203.297692-1-thuth@redhat.com> --- .../aarch64/test_device_passthrough.py | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/tests/functional/aarch64/test_device_passthrough.py b/tests/fu= nctional/aarch64/test_device_passthrough.py index 05a3f52d5e2..10c73728f36 100755 --- a/tests/functional/aarch64/test_device_passthrough.py +++ b/tests/functional/aarch64/test_device_passthrough.py @@ -10,13 +10,13 @@ # SPDX-License-Identifier: GPL-2.0-or-later =20 from os.path import join +from random import randbytes =20 from qemu_test import QemuSystemTest, Asset -from qemu_test import exec_command, wait_for_console_pattern -from qemu_test import exec_command_and_wait_for_pattern -from random import randbytes +from qemu_test import wait_for_console_pattern + =20 -guest_script =3D ''' +GUEST_SCRIPT =3D ''' #!/usr/bin/env bash =20 set -euo pipefail @@ -56,7 +56,7 @@ -device vfio-pci,host=3D$pci_iommufd,iommufd=3Diommufd0 ''' =20 -nested_guest_script =3D ''' +NESTED_GUEST_SCRIPT =3D ''' #!/usr/bin/env bash =20 set -euo pipefail @@ -75,6 +75,7 @@ echo device_passthrough_test_ok ''' =20 + class Aarch64DevicePassthrough(QemuSystemTest): =20 # https://github.com/pbo-linaro/qemu-linux-stack/tree/device_passthrou= gh @@ -86,7 +87,7 @@ class Aarch64DevicePassthrough(QemuSystemTest): ASSET_DEVICE_PASSTHROUGH_STACK =3D Asset( ('https://github.com/pbo-linaro/qemu-linux-stack/' 'releases/download/build/device_passthrough-a9612a2.tar.xz'), - 'f7d2f70912e7231986e6e293e1a2c4786dd02bec113a7acb6bfc619e96155455= ') + 'f7d2f70912e7231986e6e293e1a2c4786dd02bec113a7acb6bfc619e96155455') =20 # This tests the device passthrough implementation, by booting a VM # supporting it with two nvme disks attached, and launching a nested VM @@ -108,10 +109,14 @@ def test_aarch64_device_passthrough(self): guest_cmd =3D join(stack, 'guest.sh') nested_guest_cmd =3D join(stack, 'nested_guest.sh') # we generate two random disks - with open(disk_vfio, "wb") as d: d.write(randbytes(512)) - with open(disk_iommufd, "wb") as d: d.write(randbytes(1024)) - with open(guest_cmd, 'w') as s: s.write(guest_script) - with open(nested_guest_cmd, 'w') as s: s.write(nested_guest_script) + with open(disk_vfio, "wb") as d: + d.write(randbytes(512)) + with open(disk_iommufd, "wb") as d: + d.write(randbytes(1024)) + with open(guest_cmd, 'w', encoding=3D'utf-8') as s: + s.write(GUEST_SCRIPT) + with open(nested_guest_cmd, 'w', encoding=3D'utf-8') as s: + s.write(NESTED_GUEST_SCRIPT) =20 self.vm.add_args('-cpu', 'max') self.vm.add_args('-m', '2G') @@ -139,5 +144,6 @@ def test_aarch64_device_passthrough(self): wait_for_console_pattern(self, 'device_passthrough_test_ok', failure_message=3D'Kernel panic') =20 + if __name__ =3D=3D '__main__': QemuSystemTest.main() --=20 2.51.1 From nobody Sun Feb 8 13:36:23 2026 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; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1762856568; cv=none; d=zohomail.com; s=zohoarc; b=YLgh74kTqN8FqtdaHpaHXrkGi0xfSl6b7NM7xmg0Q+ZwNwTj7V4e54d45Kbsf+R3LGpJ/Isr/k+tvqEX5qArpBEgmDfF99236rpIeXSwLhPfjjIdosI3aNvLfhHJ0PU9P/tv1wbFYzS6EzYkmueWv3la2JvSMzXa2kLP4h4GRBg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1762856568; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=7C1BnT8JW6Zr7bjqu9ZGmvofo/njKkMypzcW1Zj2PEo=; b=ll/XcwFH8iR89jz/8RJZlPx46bGB39JTkERZAEjqj3JjcLRFHi1ot6/G9TZXixn2o2s7L/EOhsbovFv3a2s5eV0TuopcupsLShF8bCrEdJl32TQsakyi01sNSO4+2YDoVFm0ndFjrJSk0JbDg/nnNlerQXMGHeST3h2npKDELCg= ARC-Authentication-Results: i=1; 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; 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 1762856568797184.30355955574123; Tue, 11 Nov 2025 02:22:48 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vIlVv-0000kf-6M; Tue, 11 Nov 2025 05:22:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vIlVs-0000ei-HS for qemu-devel@nongnu.org; Tue, 11 Nov 2025 05:22:12 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vIlVq-0007Yn-3y for qemu-devel@nongnu.org; Tue, 11 Nov 2025 05:22:12 -0500 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-422-H4atruf4PJq_2crab3SMqg-1; Tue, 11 Nov 2025 05:22:07 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D98CE1955F38; Tue, 11 Nov 2025 10:22:06 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.33.97]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 96FE430044E0; Tue, 11 Nov 2025 10:22:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1762856529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7C1BnT8JW6Zr7bjqu9ZGmvofo/njKkMypzcW1Zj2PEo=; b=DAfIp0K8DEenFnuDZjSCUwS2VRNfDK8ISxP/jBA7b1B8AJJeAkm3I4JgVO7xFmWP5wGFgd TX+9BPdJpBcralGBR8IieTMtWcPioaeopWrXKnL6Fm26ElcfpOf78JVfo0LwB/m2AkjSAM 0HcJXit5tOqhPwO5clhostsyJA8D/uk= X-MC-Unique: H4atruf4PJq_2crab3SMqg-1 X-Mimecast-MFC-AGG-ID: H4atruf4PJq_2crab3SMqg_1762856527 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 3/4] tests/functional/mips64el: Silence issues reported by pylint Date: Tue, 11 Nov 2025 11:21:57 +0100 Message-ID: <20251111102158.92091-4-thuth@redhat.com> In-Reply-To: <20251111102158.92091-1-thuth@redhat.com> References: <20251111102158.92091-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1762856571540153000 From: Thomas Huth Drop unused imports, annotate imports that are not at the top, but done on purpose in other locations, use f-strings where it makes sense, etc. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Thomas Huth Message-ID: <20251103192430.63278-1-thuth@redhat.com> --- tests/functional/mips64el/test_malta.py | 15 ++++++++------- tests/functional/mips64el/test_replay.py | 4 ++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/functional/mips64el/test_malta.py b/tests/functional/mip= s64el/test_malta.py index e37463dc291..bc750cb7ad6 100755 --- a/tests/functional/mips64el/test_malta.py +++ b/tests/functional/mips64el/test_malta.py @@ -10,7 +10,6 @@ # SPDX-License-Identifier: GPL-2.0-or-later =20 import os -import logging =20 from qemu_test import LinuxKernelTest, Asset from qemu_test import exec_command_and_wait_for_pattern @@ -50,7 +49,7 @@ def test_mips64el_malta(self): self.vm.add_args('-kernel', kernel_path, '-append', kernel_command_line) self.vm.launch() - console_pattern =3D 'Kernel command line: %s' % kernel_command_line + console_pattern =3D f'Kernel command line: {kernel_command_line}' self.wait_for_console_pattern(console_pattern) =20 ASSET_KERNEL_3_19_3 =3D Asset( @@ -66,7 +65,7 @@ def test_mips64el_malta(self): '75ba10cd35fb44e32948eeb26974f061b703c81c4ba2fab1ebcacf1d1bec3b61') =20 @skipUntrustedTest() - def test_mips64el_malta_5KEc_cpio(self): + def test_mips64el_malta_5kec_cpio(self): kernel_path =3D self.ASSET_KERNEL_3_19_3.fetch() initrd_path =3D self.uncompress(self.ASSET_CPIO_R1) =20 @@ -134,8 +133,8 @@ def do_test_i6400_framebuffer_logo(self, cpu_cores_coun= t): Boot Linux kernel and check Tux logo is displayed on the framebuff= er. """ =20 - import numpy as np - import cv2 + import numpy as np # pylint: disable=3Dimport-outside-toplevel + import cv2 # pylint: disable=3Dimport-outside-toplevel =20 screendump_path =3D self.scratch_file('screendump.pbm') =20 @@ -149,7 +148,7 @@ def do_test_i6400_framebuffer_logo(self, cpu_cores_coun= t): 'clocksource=3DGIC console=3Dtty0 console= =3DttyS0') self.vm.add_args('-kernel', kernel_path, '-cpu', 'I6400', - '-smp', '%u' % cpu_cores_count, + '-smp', str(cpu_cores_count), '-vga', 'std', '-append', kernel_command_line) self.vm.launch() @@ -157,7 +156,7 @@ def do_test_i6400_framebuffer_logo(self, cpu_cores_coun= t): self.wait_for_console_pattern(framebuffer_ready) self.vm.cmd('human-monitor-command', command_line=3D'stop') res =3D self.vm.cmd('human-monitor-command', - command_line=3D'screendump %s' % screendump_path) + command_line=3Df'screendump {screendump_path}') if 'unknown command' in res: self.skipTest('screendump not available') =20 @@ -191,6 +190,8 @@ def test_mips_malta_i6400_framebuffer_logo_8cores(self): self.do_test_i6400_framebuffer_logo(8) =20 =20 +# Add the tests from the 32-bit mipsel file here, too. +# pylint: disable=3Dunused-import,wrong-import-position from mipsel.test_malta import MaltaMachineYAMON =20 if __name__ =3D=3D '__main__': diff --git a/tests/functional/mips64el/test_replay.py b/tests/functional/mi= ps64el/test_replay.py index e9318448fa7..9a432be5ce0 100755 --- a/tests/functional/mips64el/test_replay.py +++ b/tests/functional/mips64el/test_replay.py @@ -23,7 +23,7 @@ def test_replay_mips64el_malta(self): kernel_path =3D self.archive_extract(self.ASSET_KERNEL_2_63_2, member=3D'boot/vmlinux-2.6.32-5-5kc-ma= lta') kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3DttyS0' - console_pattern =3D 'Kernel command line: %s' % kernel_command_line + console_pattern =3D f'Kernel command line: {kernel_command_line}' self.run_rr(kernel_path, kernel_command_line, console_pattern, shi= ft=3D5) =20 =20 @@ -41,7 +41,7 @@ def test_replay_mips64el_malta(self): =20 @skipUntrustedTest() @skipFlakyTest("https://gitlab.com/qemu-project/qemu/-/issues/2013") - def test_replay_mips64el_malta_5KEc_cpio(self): + def test_replay_mips64el_malta_5kec_cpio(self): self.set_machine('malta') self.cpu =3D '5KEc' kernel_path =3D self.ASSET_KERNEL_3_19_3.fetch() --=20 2.51.1 From nobody Sun Feb 8 13:36:23 2026 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; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1762856595; cv=none; d=zohomail.com; s=zohoarc; b=SC+FUoN9UUNk+gCGcTk0d3Xl5TrzVU30YUOnV/sj0ZyCAgBwb9/0hlG8xVfPObWkBE7jm+Zs3oaZNzP2jCq4moWg0HTp5zC/MOwhecb2y95B3LfAL/+BE9rMZVIev5u6/CqtOIcQHeK1+JCj6L7m6OinSTHu4mXem3t25BNoDN4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1762856595; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ldr/4XpoJFVrmRFARbNYB+3M+77Mw6pb8E04l9L7Zms=; b=U/IsxVRgM0N1wQt4VtO30ozKQXAEtHOramafjXUh1mHKMCPOU44h7jkbjCaf0m6nWdp2DE2E5Vt3VFgSedmUuycV95kDzCJHK1YSilwwLYtR9txJlz/ud08zixJlH0G/9wfHOKVl9iFxoYa1RJdvfG9HUw9WTapjzX2VDHICO0E= ARC-Authentication-Results: i=1; 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; 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 1762856595475975.2995040703264; Tue, 11 Nov 2025 02:23:15 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vIlWC-00011C-SF; Tue, 11 Nov 2025 05:22:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vIlVt-0000gg-4S for qemu-devel@nongnu.org; Tue, 11 Nov 2025 05:22:13 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vIlVr-0007Z8-QU for qemu-devel@nongnu.org; Tue, 11 Nov 2025 05:22:12 -0500 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-547-RihMbcPsP6iIxDE4Pqxr1g-1; Tue, 11 Nov 2025 05:22:09 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B3F2C180034F; Tue, 11 Nov 2025 10:22:08 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.33.97]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8B25930044E0; Tue, 11 Nov 2025 10:22:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1762856531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ldr/4XpoJFVrmRFARbNYB+3M+77Mw6pb8E04l9L7Zms=; b=VoFtPWgvbpQroedctxv1hgzg/iIzA3QjMtLBELbCG7ZJQnOMJmRDn5kwms88cRYndb502p pJlkCwHek23SzTEI7pKiE68lGbl7Mb/D7MHjrjYsRyassWaduPfUggC8V/utSNm4TJ/vwk 7AXLdEMr/dwXSPxCxESHLMts6Yq21tE= X-MC-Unique: RihMbcPsP6iIxDE4Pqxr1g-1 X-Mimecast-MFC-AGG-ID: RihMbcPsP6iIxDE4Pqxr1g_1762856529 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 4/4] tests/functional/m68k/test_nextcube: Fix issues reported by pylint Date: Tue, 11 Nov 2025 11:21:58 +0100 Message-ID: <20251111102158.92091-5-thuth@redhat.com> In-Reply-To: <20251111102158.92091-1-thuth@redhat.com> References: <20251111102158.92091-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1762856597136158500 From: Thomas Huth Fix the indentation in one line, and while we're at it, use an f-string instead of old-school formatting in another spot. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Thomas Huth Message-ID: <20251110104837.52077-1-thuth@redhat.com> --- tests/functional/m68k/test_nextcube.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/functional/m68k/test_nextcube.py b/tests/functional/m68k= /test_nextcube.py index e5e1c69dcbd..71c160d0262 100755 --- a/tests/functional/m68k/test_nextcube.py +++ b/tests/functional/m68k/test_nextcube.py @@ -40,7 +40,7 @@ def check_bootrom_framebuffer(self, screenshot_path): time.sleep(0.1) =20 res =3D self.vm.cmd('human-monitor-command', - command_line=3D'screendump %s' % screenshot_path) + command_line=3Df"screendump {screenshot_path}") if 'unknown command' in res: self.skipTest('screendump not available') =20 @@ -52,7 +52,7 @@ def test_bootrom_framebuffer_size(self): =20 from PIL import Image with Image.open(screenshot_path) as image: - width, height =3D image.size + width, height =3D image.size self.assertEqual(width, 1120) self.assertEqual(height, 832) =20 --=20 2.51.1