]> xenbits.xensource.com Git - people/aperard/qemu-dm.git/commitdiff
tests/functional: Remove unnecessary import statements
authorThomas Huth <thuth@redhat.com>
Mon, 14 Apr 2025 14:54:57 +0000 (16:54 +0200)
committerThomas Huth <thuth@redhat.com>
Wed, 23 Apr 2025 05:51:25 +0000 (07:51 +0200)
pylint complains about these unnecessary import statements,
so let's remove them.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250414145457.261734-1-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
20 files changed:
tests/functional/qemu_test/ports.py
tests/functional/qemu_test/tuxruntest.py
tests/functional/qemu_test/uncompress.py
tests/functional/test_aarch64_rme_sbsaref.py
tests/functional/test_aarch64_rme_virt.py
tests/functional/test_aarch64_sbsaref_alpine.py
tests/functional/test_aarch64_sbsaref_freebsd.py
tests/functional/test_aarch64_tcg_plugins.py
tests/functional/test_aarch64_virt.py
tests/functional/test_arm_aspeed_ast2500.py
tests/functional/test_arm_cubieboard.py
tests/functional/test_arm_quanta_gsj.py
tests/functional/test_arm_smdkc210.py
tests/functional/test_migration.py
tests/functional/test_mips64el_replay.py
tests/functional/test_mips_replay.py
tests/functional/test_mipsel_replay.py
tests/functional/test_ppc64_hv.py
tests/functional/test_vnc.py
tests/functional/test_x86_64_kvm_xen.py

index cc39939d4818ca577ac1873ef2d56e716490fdeb..631b77abf6bc29b7fdacfda1b818e360e7b81ed5 100644 (file)
 import fcntl
 import os
 import socket
-import sys
-import tempfile
 
 from .config import BUILD_DIR
 from typing import List
 
+
 class Ports():
 
     PORTS_ADDR = '127.0.0.1'
index c2bd5baaae9314de00332c9c00661cc014d511f1..6c442ff0dc43eeaff0dcdfc4e999d10613c12b00 100644 (file)
@@ -10,8 +10,6 @@
 # SPDX-License-Identifier: GPL-2.0-or-later
 
 import os
-import stat
-from subprocess import check_call, DEVNULL
 
 from qemu_test import QemuSystemTest
 from qemu_test import exec_command_and_wait_for_pattern
index ce79da1b6860009332e709c849f1ce6f2d52b4c0..b7ef8f759b783177dd688e4af37fe9ac67da18f0 100644 (file)
@@ -13,7 +13,7 @@ import os
 import stat
 import shutil
 from urllib.parse import urlparse
-from subprocess import run, CalledProcessError, DEVNULL
+from subprocess import run, CalledProcessError
 
 from .asset import Asset
 
index 0f4f6103a1e59560941b3ce48c08eca8f28e5e6c..746770e776df95e98c3e1b6a4976ef7090ae7893 100755 (executable)
@@ -9,15 +9,13 @@
 #
 # SPDX-License-Identifier: GPL-2.0-or-later
 
-import time
 import os
-import logging
 
-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
 
+
 class Aarch64RMESbsaRefMachine(QemuSystemTest):
 
     # Stack is built with OP-TEE build environment from those instructions:
index a1abf584f0e394f9d10de1c4d9cc90b15b195ee7..8452d27928fbd52d8029b0666277504b7f007d82 100755 (executable)
@@ -9,9 +9,7 @@
 #
 # SPDX-License-Identifier: GPL-2.0-or-later
 
-import time
 import os
-import logging
 
 from qemu_test import QemuSystemTest, Asset
 from qemu_test import exec_command, wait_for_console_pattern
index c660cc7a406e81fc2adb13fc57f474a4eefb69e8..6108ec65a54de2c691f99bcd168cdebcd6cd5929 100755 (executable)
 #
 # SPDX-License-Identifier: GPL-2.0-or-later
 
-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
 
 
index bd6728dc70557b401e0cc829855043e5eec88fbb..26dfc5878bb5443602e8f62bab2755aa58d0dcbf 100755 (executable)
@@ -10,8 +10,6 @@
 #
 # SPDX-License-Identifier: GPL-2.0-or-later
 
-import os
-
 from qemu_test import QemuSystemTest, Asset, skipSlowTest
 from qemu_test import wait_for_console_pattern
 from test_aarch64_sbsaref import fetch_firmware
index 4ea71f5f882e878f0611da86666e643db96ba14b..cb7e9298fb879c7292aea638a1ea2c1313e5b358 100755 (executable)
@@ -13,7 +13,6 @@
 
 import tempfile
 import mmap
-import os
 import re
 
 from qemu.machine.machine import VMLaunchFailure
index 884aad7af61f93ca85fc3dabca619a11b0b82bee..4d0ad90ff8928420f1a8eee32ab4bfbb9205517d 100755 (executable)
 import logging
 from subprocess import check_call, DEVNULL
 
-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_pattern
+from qemu_test import wait_for_console_pattern, get_qemu_img
 
 
 class Aarch64VirtMachine(QemuSystemTest):
index ddc6459f710c92ca6119bf9f608a32312d44214d..a3b44572fcf6af3c54d2c1f25df62394419dc155 100755 (executable)
@@ -4,9 +4,8 @@
 #
 # SPDX-License-Identifier: GPL-2.0-or-later
 
-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
 
 
 class AST2500Machine(AspeedTest):
index 1eaca0272bb7d0357baa0eead10ef3fe6b7f34e4..b536c2f77a0b355ba05e94a2baefd981a62215bc 100755 (executable)
@@ -4,8 +4,6 @@
 #
 # SPDX-License-Identifier: GPL-2.0-or-later
 
-import os
-
 from qemu_test import LinuxKernelTest, Asset, exec_command_and_wait_for_pattern
 from qemu_test import interrupt_interactive_console_until_pattern
 from qemu_test import skipBigDataTest
index da60aeb6595ff4de6683608959dfc4755054a189..cb0545f7bfabe720c5588edee5870645da033ea2 100755 (executable)
@@ -4,8 +4,6 @@
 #
 # SPDX-License-Identifier: GPL-2.0-or-later
 
-import os
-
 from qemu_test import LinuxKernelTest, Asset, exec_command_and_wait_for_pattern
 from qemu_test import interrupt_interactive_console_until_pattern, skipSlowTest
 
index 0fda45c63a84a2919f62e87e1c3fca433f0bbfcc..3154e7f73228c4aaa8ee9dfa05fe8e2f14c8bfaa 100755 (executable)
@@ -4,8 +4,6 @@
 #
 # SPDX-License-Identifier: GPL-2.0-or-later
 
-import os
-
 from qemu_test import LinuxKernelTest, Asset
 
 
index 181223a69e38f74ec4c5f0da1104294e8e5242b6..c4393c35434692c97314ed469e111c00b4a1449e 100755 (executable)
 # This work is licensed under the terms of the GNU GPL, version 2 or
 # later.  See the COPYING file in the top-level directory.
 
-
 import tempfile
-import os
 import time
 
 from qemu_test import QemuSystemTest, skipIfMissingCommands
 from qemu_test.ports import Ports
 
+
 class MigrationTest(QemuSystemTest):
 
     timeout = 10
index 4f63d7fb3405fa8f1cfff517a6fb024ef9899153..26a6ccff3f79f8e62fd37076e08552920112a200 100755 (executable)
@@ -4,11 +4,7 @@
 #
 # SPDX-License-Identifier: GPL-2.0-or-later
 
-import os
-import logging
-
-from qemu_test import Asset, exec_command_and_wait_for_pattern
-from qemu_test import skipIfMissingImports, skipFlakyTest, skipUntrustedTest
+from qemu_test import Asset, skipUntrustedTest
 from replay_kernel import ReplayKernelBase
 
 
index eda031ccadd722c03785de424dd7ea900e4a0a61..4327481e35bbb0fc201baa47e8a92ee3c87e2bc5 100755 (executable)
@@ -4,7 +4,7 @@
 #
 # SPDX-License-Identifier: GPL-2.0-or-later
 
-from qemu_test import Asset, skipSlowTest, exec_command_and_wait_for_pattern
+from qemu_test import Asset, skipSlowTest
 from replay_kernel import ReplayKernelBase
 
 
index 0a330de43f8f9dd0671d18e4d301ea5b0790be6a..5f4796cf8991dae0a46ccc241f011efb16c66749 100644 (file)
@@ -4,7 +4,7 @@
 #
 # SPDX-License-Identifier: GPL-2.0-or-later
 
-from qemu_test import Asset, wait_for_console_pattern, skipSlowTest
+from qemu_test import Asset, skipSlowTest
 from replay_kernel import ReplayKernelBase
 
 
index 1920e91f18b828570419fcc63edbf6218fe0cd3b..d87f440fa798480d13c307f1b7a9b89e1e43f410 100755 (executable)
@@ -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.
 
+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
 
 # 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,
index d4e9dd0279eabf52aab4e28fadd5eb03edc5ed24..5c0ee5f92721dd36856389f6a9b27215aa28aa71 100755 (executable)
 # later.  See the COPYING file in the top-level directory.
 
 import socket
-from typing import List
-from qemu.machine.machine import VMLaunchFailure
 
+from qemu.machine.machine import VMLaunchFailure
 from qemu_test import QemuSystemTest
 from qemu_test.ports import Ports
 
+
 VNC_ADDR = '127.0.0.1'
 
 def check_connect(port: int) -> bool:
index c6abf6bba3bdb006aca2d6f6118be350a607da93..a5d445023c9d86d9ae3e008b4496d1556f124fa6 100755 (executable)
@@ -11,8 +11,6 @@
 #
 # SPDX-License-Identifier: GPL-2.0-or-later
 
-import os
-
 from qemu.machine import machine
 
 from qemu_test import QemuSystemTest, Asset, exec_command_and_wait_for_pattern