@@ -13,10 +13,11 @@
import stat
import time
-from qemu_test import QemuSystemTest
-from qemu_test import exec_command, exec_command_and_wait_for_pattern
-from qemu_test import wait_for_console_pattern
-from qemu_test import has_cmd, run_cmd, get_qemu_img
+from qemu_test import (QemuSystemTest, exec_command,
+ exec_command_and_wait_for_pattern,
+ wait_for_console_pattern,
+ has_cmd, run_cmd, get_qemu_img)
+
class TuxRunBaselineTest(QemuSystemTest):
@@ -7,8 +7,8 @@
import os
-from qemu_test import LinuxKernelTest, Asset
-from qemu_test import exec_command_and_wait_for_pattern
+from qemu_test import (LinuxKernelTest, Asset,
+ exec_command_and_wait_for_pattern)
from qemu_test.utils import gzip_uncompress
@@ -10,9 +10,8 @@
import os
-from qemu_test import QemuSystemTest, Asset
-from qemu_test import wait_for_console_pattern
-from qemu_test import interrupt_interactive_console_until_pattern
+from qemu_test import (QemuSystemTest, Asset, wait_for_console_pattern,
+ interrupt_interactive_console_until_pattern)
from qemu_test.utils import lzma_uncompress
def fetch_firmware(test):
@@ -10,9 +10,8 @@
import os
-from qemu_test import QemuSystemTest, Asset
-from qemu_test import wait_for_console_pattern
-from qemu_test import interrupt_interactive_console_until_pattern
+from qemu_test import (QemuSystemTest, Asset, wait_for_console_pattern,
+ interrupt_interactive_console_until_pattern)
from unittest import skipUnless
from test_aarch64_sbsaref import fetch_firmware
@@ -10,9 +10,8 @@
import os
-from qemu_test import QemuSystemTest, Asset
-from qemu_test import wait_for_console_pattern
-from qemu_test import interrupt_interactive_console_until_pattern
+from qemu_test import (QemuSystemTest, Asset, wait_for_console_pattern,
+ interrupt_interactive_console_until_pattern)
from unittest import skipUnless
from test_aarch64_sbsaref import fetch_firmware
@@ -14,10 +14,8 @@
import os
import logging
-from qemu_test import BUILD_DIR
-from qemu_test import QemuSystemTest, Asset
-from qemu_test import exec_command, wait_for_console_pattern
-from qemu_test import get_qemu_img, run_cmd
+from qemu_test import (BUILD_DIR, QemuSystemTest, Asset, exec_command,
+ wait_for_console_pattern, get_qemu_img, run_cmd)
class Aarch64VirtMachine(QemuSystemTest):
@@ -11,10 +11,9 @@
import subprocess
import tempfile
-from qemu_test import LinuxKernelTest, Asset
-from qemu_test import exec_command_and_wait_for_pattern
-from qemu_test import interrupt_interactive_console_until_pattern
-from qemu_test import has_cmd
+from qemu_test import (LinuxKernelTest, Asset,
+ exec_command_and_wait_for_pattern,
+ interrupt_interactive_console_until_pattern, has_cmd)
from qemu_test.utils import archive_extract
from zipfile import ZipFile
from unittest import skipUnless
@@ -9,8 +9,7 @@
import os
import bz2
-from qemu_test import QemuUserTest, Asset
-from qemu_test import has_cmd
+from qemu_test import QemuUserTest, Asset, has_cmd
from qemu_test.utils import cpio_extract
from unittest import skipUnless
@@ -7,10 +7,10 @@
import os
-from qemu_test import LinuxKernelTest, exec_command_and_wait_for_pattern
-from qemu_test import Asset, interrupt_interactive_console_until_pattern
-from qemu_test.utils import archive_extract, gzip_uncompress, lzma_uncompress
-from qemu_test.utils import image_pow2ceil_expand
+from qemu_test import (LinuxKernelTest, exec_command_and_wait_for_pattern,
+ Asset, interrupt_interactive_console_until_pattern)
+from qemu_test.utils import (archive_extract, gzip_uncompress, lzma_uncompress,
+ image_pow2ceil_expand)
from unittest import skipUnless
class BananaPiMachine(LinuxKernelTest):
@@ -10,8 +10,7 @@
# This work is licensed under the terms of the GNU GPL, version 2 or
# later. See the COPYING file in the top-level directory.
-from qemu_test import QemuSystemTest, Asset
-from qemu_test import wait_for_console_pattern
+from qemu_test import QemuSystemTest, Asset, wait_for_console_pattern
from qemu_test.utils import archive_extract
class CanonA1100Machine(QemuSystemTest):
@@ -15,8 +15,7 @@
import os
import logging
-from qemu_test import QemuSystemTest, Asset
-from qemu_test import wait_for_console_pattern
+from qemu_test import QemuSystemTest, Asset, wait_for_console_pattern
from unittest import skipUnless
@@ -8,11 +8,11 @@
import os
import shutil
-from qemu_test import LinuxKernelTest, exec_command_and_wait_for_pattern
-from qemu_test import Asset, interrupt_interactive_console_until_pattern
-from qemu_test import wait_for_console_pattern
-from qemu_test.utils import archive_extract, gzip_uncompress, lzma_uncompress
-from qemu_test.utils import image_pow2ceil_expand
+from qemu_test import (LinuxKernelTest, exec_command_and_wait_for_pattern,
+ Asset, interrupt_interactive_console_until_pattern,
+ wait_for_console_pattern)
+from qemu_test.utils import (archive_extract, gzip_uncompress, lzma_uncompress,
+ image_pow2ceil_expand)
from unittest import skipUnless
class BananaPiMachine(LinuxKernelTest):
@@ -9,8 +9,8 @@
import os
-from qemu_test import LinuxKernelTest, Asset
-from qemu_test import exec_command_and_wait_for_pattern
+from qemu_test import (LinuxKernelTest, Asset,
+ exec_command_and_wait_for_pattern)
from qemu_test.utils import gzip_uncompress
@@ -7,9 +7,9 @@
# Copyright (c) 2023 Loongson Technology Corporation Limited
#
-from qemu_test import QemuSystemTest, Asset
-from qemu_test import exec_command_and_wait_for_pattern
-from qemu_test import wait_for_console_pattern
+from qemu_test import (QemuSystemTest, Asset,
+ exec_command_and_wait_for_pattern,
+ wait_for_console_pattern)
class LoongArchMachine(QemuSystemTest):
KERNEL_COMMON_COMMAND_LINE = 'printk.time=0 '
@@ -7,9 +7,8 @@
# This work is licensed under the terms of the GNU GPL, version 2 or
# later. See the COPYING file in the top-level directory.
-from qemu_test import exec_command, exec_command_and_wait_for_pattern
-from qemu_test import QemuSystemTest, Asset
-from qemu_test import wait_for_console_pattern
+from qemu_test import (exec_command, exec_command_and_wait_for_pattern,
+ QemuSystemTest, Asset, wait_for_console_pattern)
from qemu_test.utils import archive_extract
class MicroblazeMachine(QemuSystemTest):
@@ -8,9 +8,8 @@
# later. See the COPYING file in the top-level directory.
import time
-from qemu_test import exec_command, exec_command_and_wait_for_pattern
-from qemu_test import QemuSystemTest, Asset
-from qemu_test import wait_for_console_pattern
+from qemu_test import (exec_command, exec_command_and_wait_for_pattern,
+ QemuSystemTest, Asset, wait_for_console_pattern)
from qemu_test.utils import archive_extract
class MicroblazeelMachine(QemuSystemTest):
@@ -12,10 +12,11 @@
import os
import subprocess
-from qemu_test import LinuxKernelTest, Asset
-from qemu_test import wait_for_console_pattern
+from qemu_test import (LinuxKernelTest, Asset, wait_for_console_pattern,
+ skipUntrustedTest)
from unittest import skipUnless
+
class MipsFuloong2e(LinuxKernelTest):
timeout = 60
@@ -39,7 +40,7 @@ def test_linux_kernel_3_16(self):
console_pattern = 'Kernel command line: %s' % kernel_command_line
self.wait_for_console_pattern(console_pattern)
- @skipUnless(os.getenv('QEMU_TEST_ALLOW_UNTRUSTED_CODE'), 'untrusted code')
+ @skipUntrustedTest()
@skipUnless(os.getenv('RESCUE_YL_PATH'), 'RESCUE_YL_PATH not available')
def test_linux_kernel_2_6_27_isa_serial(self):
# Recovery system for the Yeeloong laptop
@@ -12,8 +12,7 @@
import os
from unittest import skipUnless
-from qemu_test import QemuSystemTest, Asset
-from qemu_test import wait_for_console_pattern
+from qemu_test import QemuSystemTest, Asset, wait_for_console_pattern
class MipsLoongson3v(QemuSystemTest):
timeout = 60
@@ -12,8 +12,8 @@
import os
import logging
-from qemu_test import LinuxKernelTest, Asset
-from qemu_test import exec_command_and_wait_for_pattern
+from qemu_test import (LinuxKernelTest, Asset,
+ exec_command_and_wait_for_pattern)
from qemu_test.utils import gzip_uncompress
from unittest import skipUnless
@@ -11,9 +11,9 @@
import os
-from qemu_test import QemuSystemTest, LinuxKernelTest, Asset
-from qemu_test import interrupt_interactive_console_until_pattern
-from qemu_test import wait_for_console_pattern
+from qemu_test import (QemuSystemTest, LinuxKernelTest, Asset,
+ interrupt_interactive_console_until_pattern,
+ wait_for_console_pattern)
from qemu_test.utils import lzma_uncompress
from zipfile import ZipFile
@@ -9,8 +9,8 @@
import os
import socket
-from qemu_test import QemuSystemTest, Asset, wait_for_console_pattern
-from qemu_test import exec_command, exec_command_and_wait_for_pattern
+from qemu_test import (QemuSystemTest, Asset, wait_for_console_pattern,
+ exec_command, exec_command_and_wait_for_pattern)
class Multiprocess(QemuSystemTest):
@@ -8,8 +8,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
from unittest import skip
-from qemu_test import QemuSystemTest, Asset
-from qemu_test import wait_for_console_pattern
+from qemu_test import QemuSystemTest, Asset, wait_for_console_pattern
class NetDevEthtool(QemuSystemTest):
@@ -10,8 +10,8 @@
# later. See the COPYING file in the top-level directory.
from unittest import skipIf, skipUnless
-from qemu_test import QemuSystemTest, Asset
-from qemu_test import wait_for_console_pattern, exec_command
+from qemu_test import (QemuSystemTest, Asset, wait_for_console_pattern,
+ exec_command)
import os
import time
import subprocess
@@ -7,8 +7,7 @@
# This work is licensed under the terms of the GNU GPL, version 2 or
# later. See the COPYING file in the top-level directory.
-from qemu_test import LinuxKernelTest, Asset
-from qemu_test import wait_for_console_pattern
+from qemu_test import LinuxKernelTest, Asset, wait_for_console_pattern
class powernvMachine(LinuxKernelTest):
@@ -7,8 +7,7 @@
# This work is licensed under the terms of the GNU GPL, version 2 or
# later. See the COPYING file in the top-level directory.
-from qemu_test import QemuSystemTest, Asset
-from qemu_test import wait_for_console_pattern
+from qemu_test import QemuSystemTest, Asset, wait_for_console_pattern
class pseriesMachine(QemuSystemTest):
@@ -7,9 +7,9 @@
# This work is licensed under the terms of the GNU GPL, version 2 or
# later. See the COPYING file in the top-level directory.
-from qemu_test import QemuSystemTest, Asset
-from qemu_test import wait_for_console_pattern
-from qemu_test import exec_command_and_wait_for_pattern
+from qemu_test import (QemuSystemTest, Asset, wait_for_console_pattern,
+ exec_command_and_wait_for_pattern)
+
class Ppc405Machine(QemuSystemTest):
@@ -10,8 +10,7 @@
import os
from unittest import skipUnless
-from qemu_test import QemuSystemTest, Asset
-from qemu_test import wait_for_console_pattern
+from qemu_test import QemuSystemTest, Asset, wait_for_console_pattern
class IbmPrep40pMachine(QemuSystemTest):
@@ -7,8 +7,7 @@
# This work is licensed under the terms of the GNU GPL, version 2 or
# later. See the COPYING file in the top-level directory.
-from qemu_test import QemuSystemTest
-from qemu_test import wait_for_console_pattern
+from qemu_test import QemuSystemTest, wait_for_console_pattern
class ppc74xxCpu(QemuSystemTest):
@@ -9,8 +9,7 @@
import subprocess
-from qemu_test import QemuSystemTest, Asset
-from qemu_test import wait_for_console_pattern, run_cmd
+from qemu_test import QemuSystemTest, Asset, wait_for_console_pattern, run_cmd
from zipfile import ZipFile
class AmigaOneMachine(QemuSystemTest):
@@ -8,9 +8,9 @@
# later. See the COPYING file in the top-level directory.
from qemu_test.utils import archive_extract
-from qemu_test import QemuSystemTest, Asset
-from qemu_test import wait_for_console_pattern
-from qemu_test import exec_command_and_wait_for_pattern
+from qemu_test import (QemuSystemTest, Asset, wait_for_console_pattern,
+ exec_command_and_wait_for_pattern)
+
class BambooMachine(QemuSystemTest):
@@ -8,8 +8,7 @@
# later. See the COPYING file in the top-level directory.
from qemu_test.utils import archive_extract
-from qemu_test import QemuSystemTest, Asset
-from qemu_test import wait_for_console_pattern
+from qemu_test import QemuSystemTest, Asset, wait_for_console_pattern
class Mpc8544dsMachine(QemuSystemTest):
@@ -8,8 +8,7 @@
# later. See the COPYING file in the top-level directory.
from qemu_test.utils import archive_extract
-from qemu_test import QemuSystemTest, Asset
-from qemu_test import wait_for_console_pattern
+from qemu_test import QemuSystemTest, Asset, wait_for_console_pattern
class VirtexMl507Machine(QemuSystemTest):
@@ -7,8 +7,8 @@
# This work is licensed under the terms of the GNU GPL, version 2 or
# later. See the COPYING file in the top-level directory.
-from qemu_test import QemuSystemTest
-from qemu_test import wait_for_console_pattern
+from qemu_test import QemuSystemTest, wait_for_console_pattern
+
class RiscvOpenSBI(QemuSystemTest):
@@ -13,9 +13,9 @@
import os
from unittest import skipUnless
-from qemu_test import QemuSystemTest, Asset
-from qemu_test import exec_command_and_wait_for_pattern
-from qemu_test import wait_for_console_pattern
+from qemu_test import (QemuSystemTest, Asset,
+ exec_command_and_wait_for_pattern,
+ wait_for_console_pattern)
from qemu_test.utils import gzip_uncompress
@@ -14,9 +14,9 @@
import os
import tempfile
-from qemu_test import QemuSystemTest, Asset
-from qemu_test import exec_command_and_wait_for_pattern
-from qemu_test import wait_for_console_pattern
+from qemu_test import (QemuSystemTest, Asset,
+ exec_command_and_wait_for_pattern,
+ wait_for_console_pattern)
from qemu_test.utils import lzma_uncompress
class S390CCWVirtioMachine(QemuSystemTest):
@@ -12,10 +12,9 @@
import os
-from qemu_test import QemuSystemTest, Asset
-from qemu_test import exec_command
-from qemu_test import exec_command_and_wait_for_pattern
-from qemu_test import wait_for_console_pattern
+from qemu_test import (QemuSystemTest, Asset, exec_command,
+ exec_command_and_wait_for_pattern,
+ wait_for_console_pattern)
from qemu_test.utils import lzma_uncompress
@@ -7,8 +7,8 @@
import os
import shutil
-from qemu_test import LinuxKernelTest, Asset
-from qemu_test import exec_command_and_wait_for_pattern
+from qemu_test import (LinuxKernelTest, Asset,
+ exec_command_and_wait_for_pattern)
from qemu_test.utils import archive_extract
class R2dEBTest(LinuxKernelTest):
@@ -12,8 +12,7 @@
import os
-from qemu_test import QemuSystemTest, Asset
-from qemu_test import wait_for_console_pattern
+from qemu_test import QemuSystemTest, Asset, wait_for_console_pattern
from qemu_test.utils import archive_extract
class Sun4uMachine(QemuSystemTest):
@@ -6,12 +6,10 @@
# later. See the COPYING file in the top-level directory.
-from qemu_test import BUILD_DIR
-from qemu_test import QemuSystemTest, Asset
-from qemu_test import wait_for_console_pattern
-from qemu_test import exec_command_and_wait_for_pattern
-from qemu_test import is_readable_executable_file
-
+from qemu_test import (BUILD_DIR, QemuSystemTest, Asset,
+ wait_for_console_pattern,
+ exec_command_and_wait_for_pattern,
+ is_readable_executable_file)
from qemu.utils import kvm_available
import os
Group all imports that originate in the 'qemu_test' package into one statement. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> --- tests/functional/qemu_test/tuxruntest.py | 9 +++++---- tests/functional/test_aarch64_raspi4.py | 4 ++-- tests/functional/test_aarch64_sbsaref.py | 5 ++--- tests/functional/test_aarch64_sbsaref_alpine.py | 5 ++--- tests/functional/test_aarch64_sbsaref_freebsd.py | 5 ++--- tests/functional/test_aarch64_virt.py | 6 ++---- tests/functional/test_arm_aspeed.py | 7 +++---- tests/functional/test_arm_bflt.py | 3 +-- tests/functional/test_arm_bpim2u.py | 8 ++++---- tests/functional/test_arm_canona1100.py | 3 +-- tests/functional/test_arm_integratorcp.py | 3 +-- tests/functional/test_arm_orangepi.py | 10 +++++----- tests/functional/test_arm_raspi2.py | 4 ++-- tests/functional/test_loongarch64_virt.py | 6 +++--- tests/functional/test_microblaze_s3adsp1800.py | 5 ++--- tests/functional/test_microblazeel_s3adsp1800.py | 5 ++--- tests/functional/test_mips64el_fuloong2e.py | 7 ++++--- tests/functional/test_mips64el_loongson3v.py | 3 +-- tests/functional/test_mips64el_malta.py | 4 ++-- tests/functional/test_mipsel_malta.py | 6 +++--- tests/functional/test_multiprocess.py | 4 ++-- tests/functional/test_netdev_ethtool.py | 3 +-- tests/functional/test_ppc64_hv.py | 4 ++-- tests/functional/test_ppc64_powernv.py | 3 +-- tests/functional/test_ppc64_pseries.py | 3 +-- tests/functional/test_ppc_405.py | 6 +++--- tests/functional/test_ppc_40p.py | 3 +-- tests/functional/test_ppc_74xx.py | 3 +-- tests/functional/test_ppc_amiga.py | 3 +-- tests/functional/test_ppc_bamboo.py | 6 +++--- tests/functional/test_ppc_mpc8544ds.py | 3 +-- tests/functional/test_ppc_virtex_ml507.py | 3 +-- tests/functional/test_riscv_opensbi.py | 4 ++-- tests/functional/test_rx_gdbsim.py | 6 +++--- tests/functional/test_s390x_ccw_virtio.py | 6 +++--- tests/functional/test_s390x_topology.py | 7 +++---- tests/functional/test_sh4eb_r2d.py | 4 ++-- tests/functional/test_sparc64_sun4u.py | 3 +-- tests/functional/test_virtio_gpu.py | 10 ++++------ 39 files changed, 85 insertions(+), 107 deletions(-)