[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 22/32] tests/functional: bail aarch64_virt tests early if missing
From: |
Alex Bennée |
Subject: |
[PULL 22/32] tests/functional: bail aarch64_virt tests early if missing TCG |
Date: |
Fri, 10 Jan 2025 13:17:44 +0000 |
The set_machine and require_accelerator steps can bail early so move
those to the front of the test functions. While we are at it also
clean up some long lines when adding the vm arguments.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20250108121054.1126164-23-alex.bennee@linaro.org>
diff --git a/tests/functional/test_aarch64_virt.py
b/tests/functional/test_aarch64_virt.py
index b3d3b0ee51..201c5ed023 100755
--- a/tests/functional/test_aarch64_virt.py
+++ b/tests/functional/test_aarch64_virt.py
@@ -40,9 +40,9 @@ def test_alpine_virt_tcg_gic_max(self):
iso_path = self.ASSET_ALPINE_ISO.fetch()
self.set_machine('virt')
- self.vm.set_console()
self.require_accelerator("tcg")
+ self.vm.set_console()
self.vm.add_args("-accel", "tcg")
self.vm.add_args("-cpu", "max,pauth-impdef=on")
self.vm.add_args("-machine",
@@ -71,15 +71,16 @@ def common_aarch64_virt(self, machine):
Common code to launch basic virt machine with kernel+initrd
and a scratch disk.
"""
+ self.set_machine('virt')
+ self.require_accelerator("tcg")
+
logger = logging.getLogger('aarch64_virt')
kernel_path = self.ASSET_KERNEL.fetch()
- self.set_machine('virt')
self.vm.set_console()
kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
'console=ttyAMA0')
- self.require_accelerator("tcg")
self.vm.add_args('-cpu', 'max,pauth-impdef=on',
'-machine', machine,
'-accel', 'tcg',
@@ -100,7 +101,9 @@ def common_aarch64_virt(self, machine):
# Add the device
self.vm.add_args('-blockdev',
-
f"driver=qcow2,file.driver=file,file.filename={image_path},node-name=scratch")
+ "driver=qcow2,"
+ "file.driver=file,"
+ f"file.filename={image_path},node-name=scratch")
self.vm.add_args('-device',
'virtio-blk-device,drive=scratch')
--
2.39.5
- [PULL 25/32] tests/docker: move riscv64 cross container from sid to trixie, (continued)
- [PULL 25/32] tests/docker: move riscv64 cross container from sid to trixie, Alex Bennée, 2025/01/10
- [PULL 23/32] tests/functional: extend test_aarch64_virt with vulkan test, Alex Bennée, 2025/01/10
- [PULL 32/32] MAINTAINERS: Remove myself from reviewers, Alex Bennée, 2025/01/10
- [PULL 16/32] tests/qtest: remove clock_steps from virtio tests, Alex Bennée, 2025/01/10
- [PULL 20/32] tests/functional: update tuxruntest to use uncompress utility, Alex Bennée, 2025/01/10
- [PULL 19/32] tests/functional: add zstd support to uncompress utility, Alex Bennée, 2025/01/10
- [PULL 17/32] system/qtest: properly feedback results of clock_[step|set], Alex Bennée, 2025/01/10
- [PULL 26/32] tests/lcitool: remove temp workaround for debian mips64el, Alex Bennée, 2025/01/10
- [PULL 21/32] tests/functional: remove unused kernel_command_line, Alex Bennée, 2025/01/10
- [PULL 29/32] tests/vm: allow interactive login as root, Alex Bennée, 2025/01/10
- [PULL 22/32] tests/functional: bail aarch64_virt tests early if missing TCG,
Alex Bennée <=
- [PULL 28/32] tests/vm: partially un-tabify help output, Alex Bennée, 2025/01/10
- [PULL 30/32] pc-bios: ensure keymaps dependencies set vnc tests, Alex Bennée, 2025/01/10
- Re: [PULL 00/32] testing updates for 10.0 (tuxrun, libvirt, dockerfiles, misc), Stefan Hajnoczi, 2025/01/10