From nobody Sun Dec 14 12:15:20 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1764749001539598.9288421047103; Wed, 3 Dec 2025 00:03:21 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vQhnY-0001SN-2L; Wed, 03 Dec 2025 03:01:16 -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 1vQhnV-0001KY-UC; Wed, 03 Dec 2025 03:01:14 -0500 Received: from isrv.corpit.ru ([212.248.84.144]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vQhnS-00071H-TR; Wed, 03 Dec 2025 03:01:13 -0500 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 45B81170771; Wed, 03 Dec 2025 10:59:23 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id 1397B32B498; Wed, 03 Dec 2025 10:59:41 +0300 (MSK) From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Michael Tokarev Subject: [Stable-10.0.7 100/116] tests/functional: Remove unnecessary import statements Date: Wed, 3 Dec 2025 10:59:20 +0300 Message-ID: <20251203075939.2366131-19-mjt@tls.msk.ru> X-Mailer: git-send-email 2.47.3 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=212.248.84.144; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=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-ZM-MESSAGEID: 1764749003056019200 From: Thomas Huth pylint complains about these unnecessary import statements, so let's remove them. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20250414145457.261734-1-thuth@redhat.com> Signed-off-by: Thomas Huth (cherry picked from commit 99fb9256b761c3cec4a82d2e9597b6cf24ae1285) Signed-off-by: Michael Tokarev diff --git a/tests/functional/qemu_test/ports.py b/tests/functional/qemu_te= st/ports.py index cc39939d48..631b77abf6 100644 --- a/tests/functional/qemu_test/ports.py +++ b/tests/functional/qemu_test/ports.py @@ -10,12 +10,11 @@ import fcntl import os import socket -import sys -import tempfile =20 from .config import BUILD_DIR from typing import List =20 + class Ports(): =20 PORTS_ADDR =3D '127.0.0.1' diff --git a/tests/functional/qemu_test/tuxruntest.py b/tests/functional/qe= mu_test/tuxruntest.py index c2bd5baaae..6c442ff0dc 100644 --- a/tests/functional/qemu_test/tuxruntest.py +++ b/tests/functional/qemu_test/tuxruntest.py @@ -10,8 +10,6 @@ # SPDX-License-Identifier: GPL-2.0-or-later =20 import os -import stat -from subprocess import check_call, DEVNULL =20 from qemu_test import QemuSystemTest from qemu_test import exec_command_and_wait_for_pattern diff --git a/tests/functional/qemu_test/uncompress.py b/tests/functional/qe= mu_test/uncompress.py index ce79da1b68..b7ef8f759b 100644 --- a/tests/functional/qemu_test/uncompress.py +++ b/tests/functional/qemu_test/uncompress.py @@ -13,7 +13,7 @@ import stat import shutil from urllib.parse import urlparse -from subprocess import run, CalledProcessError, DEVNULL +from subprocess import run, CalledProcessError =20 from .asset import Asset =20 diff --git a/tests/functional/test_aarch64_rme_sbsaref.py b/tests/functiona= l/test_aarch64_rme_sbsaref.py index 0f4f6103a1..746770e776 100755 --- a/tests/functional/test_aarch64_rme_sbsaref.py +++ b/tests/functional/test_aarch64_rme_sbsaref.py @@ -9,15 +9,13 @@ # # SPDX-License-Identifier: GPL-2.0-or-later =20 -import time import os -import logging =20 -from qemu_test import QemuSystemTest, Asset -from qemu_test import exec_command, wait_for_console_pattern +from qemu_test import QemuSystemTest, Asset, wait_for_console_pattern from qemu_test import exec_command_and_wait_for_pattern from test_aarch64_rme_virt import test_realms_guest =20 + class Aarch64RMESbsaRefMachine(QemuSystemTest): =20 # Stack is built with OP-TEE build environment from those instructions: diff --git a/tests/functional/test_aarch64_rme_virt.py b/tests/functional/t= est_aarch64_rme_virt.py index a1abf584f0..8452d27928 100755 --- a/tests/functional/test_aarch64_rme_virt.py +++ b/tests/functional/test_aarch64_rme_virt.py @@ -9,9 +9,7 @@ # # SPDX-License-Identifier: GPL-2.0-or-later =20 -import time import os -import logging =20 from qemu_test import QemuSystemTest, Asset from qemu_test import exec_command, wait_for_console_pattern diff --git a/tests/functional/test_aarch64_sbsaref_alpine.py b/tests/functi= onal/test_aarch64_sbsaref_alpine.py index c660cc7a40..6108ec65a5 100755 --- a/tests/functional/test_aarch64_sbsaref_alpine.py +++ b/tests/functional/test_aarch64_sbsaref_alpine.py @@ -10,11 +10,8 @@ # # SPDX-License-Identifier: GPL-2.0-or-later =20 -import os - from qemu_test import QemuSystemTest, Asset, skipSlowTest from qemu_test import wait_for_console_pattern -from unittest import skipUnless from test_aarch64_sbsaref import fetch_firmware =20 =20 diff --git a/tests/functional/test_aarch64_sbsaref_freebsd.py b/tests/funct= ional/test_aarch64_sbsaref_freebsd.py index 2a26281d25..92ebc69c9b 100755 --- a/tests/functional/test_aarch64_sbsaref_freebsd.py +++ b/tests/functional/test_aarch64_sbsaref_freebsd.py @@ -10,8 +10,6 @@ # # SPDX-License-Identifier: GPL-2.0-or-later =20 -import os - from qemu_test import QemuSystemTest, Asset, skipSlowTest from qemu_test import wait_for_console_pattern from test_aarch64_sbsaref import fetch_firmware diff --git a/tests/functional/test_aarch64_tcg_plugins.py b/tests/functiona= l/test_aarch64_tcg_plugins.py index 4ea71f5f88..cb7e9298fb 100755 --- a/tests/functional/test_aarch64_tcg_plugins.py +++ b/tests/functional/test_aarch64_tcg_plugins.py @@ -13,7 +13,6 @@ =20 import tempfile import mmap -import os import re =20 from qemu.machine.machine import VMLaunchFailure diff --git a/tests/functional/test_aarch64_virt.py b/tests/functional/test_= aarch64_virt.py index 249f22d978..7a6297f75c 100755 --- a/tests/functional/test_aarch64_virt.py +++ b/tests/functional/test_aarch64_virt.py @@ -13,12 +13,8 @@ import logging from subprocess import check_call, DEVNULL =20 -from qemu.machine.machine import VMLaunchFailure - -from qemu_test import QemuSystemTest, Asset -from qemu_test import exec_command, exec_command_and_wait_for_pattern -from qemu_test import wait_for_console_pattern -from qemu_test import skipIfMissingCommands, get_qemu_img +from qemu_test import QemuSystemTest, Asset, exec_command_and_wait_for_pat= tern +from qemu_test import wait_for_console_pattern, get_qemu_img =20 =20 class Aarch64VirtMachine(QemuSystemTest): diff --git a/tests/functional/test_arm_aspeed_ast2500.py b/tests/functional= /test_arm_aspeed_ast2500.py index ddc6459f71..a3b44572fc 100755 --- a/tests/functional/test_arm_aspeed_ast2500.py +++ b/tests/functional/test_arm_aspeed_ast2500.py @@ -4,9 +4,8 @@ # # SPDX-License-Identifier: GPL-2.0-or-later =20 -from qemu_test import Asset +from qemu_test import Asset, exec_command_and_wait_for_pattern from aspeed import AspeedTest -from qemu_test import exec_command_and_wait_for_pattern =20 =20 class AST2500Machine(AspeedTest): diff --git a/tests/functional/test_arm_cubieboard.py b/tests/functional/tes= t_arm_cubieboard.py index 1eaca0272b..b536c2f77a 100755 --- a/tests/functional/test_arm_cubieboard.py +++ b/tests/functional/test_arm_cubieboard.py @@ -4,8 +4,6 @@ # # SPDX-License-Identifier: GPL-2.0-or-later =20 -import os - from qemu_test import LinuxKernelTest, Asset, exec_command_and_wait_for_pa= ttern from qemu_test import interrupt_interactive_console_until_pattern from qemu_test import skipBigDataTest diff --git a/tests/functional/test_arm_quanta_gsj.py b/tests/functional/tes= t_arm_quanta_gsj.py index da60aeb659..cb0545f7bf 100755 --- a/tests/functional/test_arm_quanta_gsj.py +++ b/tests/functional/test_arm_quanta_gsj.py @@ -4,8 +4,6 @@ # # SPDX-License-Identifier: GPL-2.0-or-later =20 -import os - from qemu_test import LinuxKernelTest, Asset, exec_command_and_wait_for_pa= ttern from qemu_test import interrupt_interactive_console_until_pattern, skipSlo= wTest =20 diff --git a/tests/functional/test_arm_smdkc210.py b/tests/functional/test_= arm_smdkc210.py index 0fda45c63a..3154e7f732 100755 --- a/tests/functional/test_arm_smdkc210.py +++ b/tests/functional/test_arm_smdkc210.py @@ -4,8 +4,6 @@ # # SPDX-License-Identifier: GPL-2.0-or-later =20 -import os - from qemu_test import LinuxKernelTest, Asset =20 =20 diff --git a/tests/functional/test_migration.py b/tests/functional/test_mig= ration.py index 181223a69e..c4393c3543 100755 --- a/tests/functional/test_migration.py +++ b/tests/functional/test_migration.py @@ -11,14 +11,13 @@ # This work is licensed under the terms of the GNU GPL, version 2 or # later. See the COPYING file in the top-level directory. =20 - import tempfile -import os import time =20 from qemu_test import QemuSystemTest, skipIfMissingCommands from qemu_test.ports import Ports =20 + class MigrationTest(QemuSystemTest): =20 timeout =3D 10 diff --git a/tests/functional/test_mips64el_replay.py b/tests/functional/te= st_mips64el_replay.py index 4f63d7fb34..26a6ccff3f 100755 --- a/tests/functional/test_mips64el_replay.py +++ b/tests/functional/test_mips64el_replay.py @@ -4,11 +4,7 @@ # # SPDX-License-Identifier: GPL-2.0-or-later =20 -import os -import logging - -from qemu_test import Asset, exec_command_and_wait_for_pattern -from qemu_test import skipIfMissingImports, skipFlakyTest, skipUntrustedTe= st +from qemu_test import Asset, skipUntrustedTest from replay_kernel import ReplayKernelBase =20 =20 diff --git a/tests/functional/test_mips_replay.py b/tests/functional/test_m= ips_replay.py index eda031ccad..4327481e35 100755 --- a/tests/functional/test_mips_replay.py +++ b/tests/functional/test_mips_replay.py @@ -4,7 +4,7 @@ # # SPDX-License-Identifier: GPL-2.0-or-later =20 -from qemu_test import Asset, skipSlowTest, exec_command_and_wait_for_patte= rn +from qemu_test import Asset, skipSlowTest from replay_kernel import ReplayKernelBase =20 =20 diff --git a/tests/functional/test_mipsel_replay.py b/tests/functional/test= _mipsel_replay.py index 0a330de43f..5f4796cf89 100644 --- a/tests/functional/test_mipsel_replay.py +++ b/tests/functional/test_mipsel_replay.py @@ -4,7 +4,7 @@ # # SPDX-License-Identifier: GPL-2.0-or-later =20 -from qemu_test import Asset, wait_for_console_pattern, skipSlowTest +from qemu_test import Asset, skipSlowTest from replay_kernel import ReplayKernelBase =20 =20 diff --git a/tests/functional/test_ppc64_hv.py b/tests/functional/test_ppc6= 4_hv.py index 1920e91f18..d87f440fa7 100755 --- a/tests/functional/test_ppc64_hv.py +++ b/tests/functional/test_ppc64_hv.py @@ -9,14 +9,14 @@ # This work is licensed under the terms of the GNU GPL, version 2 or # later. See the COPYING file in the top-level directory. =20 +import os +import subprocess + +from datetime import datetime from qemu_test import QemuSystemTest, Asset from qemu_test import wait_for_console_pattern, exec_command from qemu_test import skipIfMissingCommands, skipBigDataTest from qemu_test import exec_command_and_wait_for_pattern -import os -import time -import subprocess -from datetime import datetime =20 # Alpine is a light weight distro that supports QEMU. These tests boot # that on the machine then run a QEMU guest inside it in KVM mode, diff --git a/tests/functional/test_vnc.py b/tests/functional/test_vnc.py index d4e9dd0279..5c0ee5f927 100755 --- a/tests/functional/test_vnc.py +++ b/tests/functional/test_vnc.py @@ -11,12 +11,12 @@ # later. See the COPYING file in the top-level directory. =20 import socket -from typing import List -from qemu.machine.machine import VMLaunchFailure =20 +from qemu.machine.machine import VMLaunchFailure from qemu_test import QemuSystemTest from qemu_test.ports import Ports =20 + VNC_ADDR =3D '127.0.0.1' =20 def check_connect(port: int) -> bool: diff --git a/tests/functional/test_x86_64_kvm_xen.py b/tests/functional/tes= t_x86_64_kvm_xen.py index 0f1f5d8f0b..424d4b2001 100755 --- a/tests/functional/test_x86_64_kvm_xen.py +++ b/tests/functional/test_x86_64_kvm_xen.py @@ -11,8 +11,6 @@ # # SPDX-License-Identifier: GPL-2.0-or-later =20 -import os - from qemu.machine import machine =20 from qemu_test import QemuSystemTest, Asset, exec_command_and_wait_for_pat= tern --=20 2.47.3