[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 15/23] tests/acceptance: Let the framework handle "cpu:VALUE" tagg
From: |
Cleber Rosa |
Subject: |
[PULL 15/23] tests/acceptance: Let the framework handle "cpu:VALUE" tagged tests |
Date: |
Tue, 13 Jul 2021 17:19:15 -0400 |
From: Wainer dos Santos Moschetta <wainersm@redhat.com>
The tests that are already tagged with "cpu:VALUE" don't need to add
"-cpu VALUE" to the list of arguments of the vm object because the avocado_qemu
framework is able to handle it automatically.
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Tested-by: Cleber Rosa <crosa@redhat.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Message-Id: <20210430133414.39905-4-wainersm@redhat.com>
Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
tests/acceptance/boot_linux.py | 3 ---
tests/acceptance/boot_xen.py | 1 -
tests/acceptance/machine_mips_malta.py | 1 -
tests/acceptance/replay_kernel.py | 8 +++-----
tests/acceptance/reverse_debugging.py | 2 +-
tests/acceptance/tcg_plugins.py | 9 ++++-----
6 files changed, 8 insertions(+), 16 deletions(-)
diff --git a/tests/acceptance/boot_linux.py b/tests/acceptance/boot_linux.py
index 34c4366366..ab19146d1e 100644
--- a/tests/acceptance/boot_linux.py
+++ b/tests/acceptance/boot_linux.py
@@ -79,7 +79,6 @@ def test_virt_tcg_gicv2(self):
"""
self.require_accelerator("tcg")
self.vm.add_args("-accel", "tcg")
- self.vm.add_args("-cpu", "max")
self.vm.add_args("-machine", "virt,gic-version=2")
self.add_common_args()
self.launch_and_wait(set_up_ssh_connection=False)
@@ -92,7 +91,6 @@ def test_virt_tcg_gicv3(self):
"""
self.require_accelerator("tcg")
self.vm.add_args("-accel", "tcg")
- self.vm.add_args("-cpu", "max")
self.vm.add_args("-machine", "virt,gic-version=3")
self.add_common_args()
self.launch_and_wait(set_up_ssh_connection=False)
@@ -104,7 +102,6 @@ def test_virt_kvm(self):
"""
self.require_accelerator("kvm")
self.vm.add_args("-accel", "kvm")
- self.vm.add_args("-cpu", "host")
self.vm.add_args("-machine", "virt,gic-version=host")
self.add_common_args()
self.launch_and_wait(set_up_ssh_connection=False)
diff --git a/tests/acceptance/boot_xen.py b/tests/acceptance/boot_xen.py
index 75c2d44492..3479b5233b 100644
--- a/tests/acceptance/boot_xen.py
+++ b/tests/acceptance/boot_xen.py
@@ -48,7 +48,6 @@ def launch_xen(self, xen_path):
xen_command_line = self.XEN_COMMON_COMMAND_LINE
self.vm.add_args('-machine', 'virtualization=on',
- '-cpu', 'cortex-a57',
'-m', '768',
'-kernel', xen_path,
'-append', xen_command_line,
diff --git a/tests/acceptance/machine_mips_malta.py
b/tests/acceptance/machine_mips_malta.py
index b1fd075f51..b67d8cb141 100644
--- a/tests/acceptance/machine_mips_malta.py
+++ b/tests/acceptance/machine_mips_malta.py
@@ -62,7 +62,6 @@ def do_test_i6400_framebuffer_logo(self, cpu_cores_count):
kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
'clocksource=GIC console=tty0 console=ttyS0')
self.vm.add_args('-kernel', kernel_path,
- '-cpu', 'I6400',
'-smp', '%u' % cpu_cores_count,
'-vga', 'std',
'-append', kernel_command_line)
diff --git a/tests/acceptance/replay_kernel.py
b/tests/acceptance/replay_kernel.py
index 71facdaa75..75f80506c1 100644
--- a/tests/acceptance/replay_kernel.py
+++ b/tests/acceptance/replay_kernel.py
@@ -156,8 +156,7 @@ def test_aarch64_virt(self):
'console=ttyAMA0')
console_pattern = 'VFS: Cannot open root device'
- self.run_rr(kernel_path, kernel_command_line, console_pattern,
- args=('-cpu', 'cortex-a53'))
+ self.run_rr(kernel_path, kernel_command_line, console_pattern)
def test_arm_virt(self):
"""
@@ -301,7 +300,7 @@ def test_ppc64_e500(self):
tar_url = ('https://www.qemu-advent-calendar.org'
'/2018/download/day19.tar.xz')
file_path = self.fetch_asset(tar_url, asset_hash=tar_hash)
- self.do_test_advcal_2018(file_path, 'uImage', ('-cpu', 'e5500'))
+ self.do_test_advcal_2018(file_path, 'uImage')
def test_ppc_g3beige(self):
"""
@@ -348,8 +347,7 @@ def test_xtensa_lx60(self):
tar_url = ('https://www.qemu-advent-calendar.org'
'/2018/download/day02.tar.xz')
file_path = self.fetch_asset(tar_url, asset_hash=tar_hash)
- self.do_test_advcal_2018(file_path, 'santas-sleigh-ride.elf',
- args=('-cpu', 'dc233c'))
+ self.do_test_advcal_2018(file_path, 'santas-sleigh-ride.elf')
@skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout')
class ReplayKernelSlow(ReplayKernelBase):
diff --git a/tests/acceptance/reverse_debugging.py
b/tests/acceptance/reverse_debugging.py
index be01aca217..d2921e70c3 100644
--- a/tests/acceptance/reverse_debugging.py
+++ b/tests/acceptance/reverse_debugging.py
@@ -207,4 +207,4 @@ def test_aarch64_virt(self):
kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
self.reverse_debugging(
- args=('-kernel', kernel_path, '-cpu', 'cortex-a53'))
+ args=('-kernel', kernel_path))
diff --git a/tests/acceptance/tcg_plugins.py b/tests/acceptance/tcg_plugins.py
index aa6e18b62d..9ca1515c3b 100644
--- a/tests/acceptance/tcg_plugins.py
+++ b/tests/acceptance/tcg_plugins.py
@@ -25,7 +25,7 @@ class PluginKernelBase(LinuxKernelTest):
KERNEL_COMMON_COMMAND_LINE = 'printk.time=1 panic=-1 '
def run_vm(self, kernel_path, kernel_command_line,
- plugin, plugin_log, console_pattern, args):
+ plugin, plugin_log, console_pattern, args=None):
vm = self.get_vm()
vm.set_console()
@@ -80,8 +80,7 @@ def test_aarch64_virt_insn(self):
self.run_vm(kernel_path, kernel_command_line,
"tests/plugin/libinsn.so", plugin_log.name,
- console_pattern,
- args=('-cpu', 'cortex-a53'))
+ console_pattern)
with plugin_log as lf, \
mmap.mmap(lf.fileno(), 0, access=mmap.ACCESS_READ) as s:
@@ -108,7 +107,7 @@ def test_aarch64_virt_insn_icount(self):
self.run_vm(kernel_path, kernel_command_line,
"tests/plugin/libinsn.so", plugin_log.name,
console_pattern,
- args=('-cpu', 'cortex-a53', '-icount', 'shift=1'))
+ args=('-icount', 'shift=1'))
with plugin_log as lf, \
mmap.mmap(lf.fileno(), 0, access=mmap.ACCESS_READ) as s:
@@ -134,7 +133,7 @@ def test_aarch64_virt_mem_icount(self):
self.run_vm(kernel_path, kernel_command_line,
"tests/plugin/libmem.so,arg=both", plugin_log.name,
console_pattern,
- args=('-cpu', 'cortex-a53', '-icount', 'shift=1'))
+ args=('-icount', 'shift=1'))
with plugin_log as lf, \
mmap.mmap(lf.fileno(), 0, access=mmap.ACCESS_READ) as s:
--
2.31.1
- [PULL 06/23] Acceptance Tests: support choosing specific distro and version, (continued)
- [PULL 06/23] Acceptance Tests: support choosing specific distro and version, Cleber Rosa, 2021/07/13
- [PULL 07/23] tests/acceptance: Ignore binary data sent on serial console, Cleber Rosa, 2021/07/13
- [PULL 09/23] Acceptance Tests: Add default kernel params and pxeboot url to the KNOWN_DISTROS collection, Cleber Rosa, 2021/07/13
- [PULL 08/23] avocado_qemu: Fix KNOWN_DISTROS map into the LinuxDistro class, Cleber Rosa, 2021/07/13
- [PULL 10/23] avocado_qemu: Add SMMUv3 tests, Cleber Rosa, 2021/07/13
- [PULL 11/23] avocado_qemu: Add Intel iommu tests, Cleber Rosa, 2021/07/13
- [PULL 12/23] tests/acceptance: Tag NetBSD tests as 'os:netbsd', Cleber Rosa, 2021/07/13
- [PULL 13/23] tests/acceptance: Automatic set -cpu to the test vm, Cleber Rosa, 2021/07/13
- [PULL 14/23] tests/acceptance: Fix mismatch on cpu tagged tests, Cleber Rosa, 2021/07/13
- [PULL 16/23] tests/acceptance: Tagging tests with "cpu:VALUE", Cleber Rosa, 2021/07/13
- [PULL 15/23] tests/acceptance: Let the framework handle "cpu:VALUE" tagged tests,
Cleber Rosa <=
- [PULL 17/23] python/qemu: Add args property to the QEMUMachine class, Cleber Rosa, 2021/07/13
- [PULL 19/23] tests/acceptance: Handle cpu tag on x86_cpu_model_versions tests, Cleber Rosa, 2021/07/13
- [PULL 18/23] tests/acceptance: Add set_vm_arg() to the Test class, Cleber Rosa, 2021/07/13
- [PULL 20/23] python: Configure tox to skip missing interpreters, Cleber Rosa, 2021/07/13
- [PULL 21/23] Acceptance tests: do not try to reuse packages from the system, Cleber Rosa, 2021/07/13
- [PULL 23/23] tests/acceptance/cpu_queries.py: use the proper logging channels, Cleber Rosa, 2021/07/13
- [PULL 22/23] tests/acceptance/linux_ssh_mips_malta.py: drop identical setUp, Cleber Rosa, 2021/07/13
- Re: [PULL 00/23] Python and Acceptance Tests, Peter Maydell, 2021/07/14