From b22bf37dffe47993d37f2809cc16b7f4e99c619e Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Fri, 8 Dec 2023 14:09:09 -0500 Subject: tests/avocado/boot_xen.py: merge base classes While it's a good practice to have reusable base classes, in this specific case there's no other user of the BootXenBase class. By unifying the class used in this test, we can improve readability and have the opportunity to add some future improvements in a clearer fashion. Signed-off-by: Cleber Rosa Message-ID: <20231208190911.102879-9-crosa@redhat.com> Signed-off-by: Thomas Huth --- tests/avocado/boot_xen.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'tests/avocado/boot_xen.py') diff --git a/tests/avocado/boot_xen.py b/tests/avocado/boot_xen.py index fc2faeedb5..f80cbcb8fb 100644 --- a/tests/avocado/boot_xen.py +++ b/tests/avocado/boot_xen.py @@ -17,7 +17,7 @@ from avocado_qemu import wait_for_console_pattern from boot_linux_console import LinuxKernelTest -class BootXenBase(LinuxKernelTest): +class BootXen(LinuxKernelTest): """ Boots a Xen hypervisor with a Linux DomU kernel. """ @@ -59,9 +59,6 @@ class BootXenBase(LinuxKernelTest): console_pattern = 'VFS: Cannot open root device' wait_for_console_pattern(self, console_pattern, "Panic on CPU 0:") - -class BootXen(BootXenBase): - def test_arm64_xen_411_and_dom0(self): """ :avocado: tags=arch:aarch64 -- cgit 1.4.1 From 9e6e7d814c941d167621797f6c50aca3628913e2 Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Fri, 8 Dec 2023 14:09:10 -0500 Subject: tests/avocado/boot_xen.py: unify tags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Because all tests share the same tags, it's possible to have all of them at the class level. Signed-off-by: Cleber Rosa Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20231208190911.102879-10-crosa@redhat.com> Signed-off-by: Thomas Huth --- tests/avocado/boot_xen.py | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) (limited to 'tests/avocado/boot_xen.py') diff --git a/tests/avocado/boot_xen.py b/tests/avocado/boot_xen.py index f80cbcb8fb..f4b63c1ef2 100644 --- a/tests/avocado/boot_xen.py +++ b/tests/avocado/boot_xen.py @@ -20,6 +20,11 @@ from boot_linux_console import LinuxKernelTest class BootXen(LinuxKernelTest): """ Boots a Xen hypervisor with a Linux DomU kernel. + + :avocado: tags=arch:aarch64 + :avocado: tags=accel:tcg + :avocado: tags=cpu:cortex-a57 + :avocado: tags=machine:virt """ timeout = 90 @@ -60,13 +65,6 @@ class BootXen(LinuxKernelTest): wait_for_console_pattern(self, console_pattern, "Panic on CPU 0:") def test_arm64_xen_411_and_dom0(self): - """ - :avocado: tags=arch:aarch64 - :avocado: tags=accel:tcg - :avocado: tags=cpu:cortex-a57 - :avocado: tags=machine:virt - """ - # archive of file from https://deb.debian.org/debian/pool/main/x/xen/ xen_url = ('https://fileserver.linaro.org/s/JSsewXGZ6mqxPr5/' 'download?path=%2F&files=' @@ -78,13 +76,6 @@ class BootXen(LinuxKernelTest): self.launch_xen(xen_path) def test_arm64_xen_414_and_dom0(self): - """ - :avocado: tags=arch:aarch64 - :avocado: tags=accel:tcg - :avocado: tags=cpu:cortex-a57 - :avocado: tags=machine:virt - """ - # archive of file from https://deb.debian.org/debian/pool/main/x/xen/ xen_url = ('https://fileserver.linaro.org/s/JSsewXGZ6mqxPr5/' 'download?path=%2F&files=' @@ -96,13 +87,6 @@ class BootXen(LinuxKernelTest): self.launch_xen(xen_path) def test_arm64_xen_415_and_dom0(self): - """ - :avocado: tags=arch:aarch64 - :avocado: tags=accel:tcg - :avocado: tags=cpu:cortex-a57 - :avocado: tags=machine:virt - """ - xen_url = ('https://fileserver.linaro.org/' 's/JSsewXGZ6mqxPr5/download' '?path=%2F&files=xen-upstream-4.15-unstable.deb') -- cgit 1.4.1 From 1b88da0af11f15bf8ebb7d933b458533f72899a5 Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Fri, 8 Dec 2023 14:09:11 -0500 Subject: tests/avocado/boot_xen.py: use class attribute MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rather than defining a single use variable, let's just use the class attribute directly. Signed-off-by: Cleber Rosa Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20231208190911.102879-11-crosa@redhat.com> Signed-off-by: Thomas Huth --- tests/avocado/boot_xen.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tests/avocado/boot_xen.py') diff --git a/tests/avocado/boot_xen.py b/tests/avocado/boot_xen.py index f4b63c1ef2..f29bc58b9e 100644 --- a/tests/avocado/boot_xen.py +++ b/tests/avocado/boot_xen.py @@ -50,11 +50,10 @@ class BootXen(LinuxKernelTest): self.vm.set_console() - xen_command_line = self.XEN_COMMON_COMMAND_LINE self.vm.add_args('-machine', 'virtualization=on', '-m', '768', '-kernel', xen_path, - '-append', xen_command_line, + '-append', self.XEN_COMMON_COMMAND_LINE, '-device', 'guest-loader,addr=0x47000000,kernel=%s,bootargs=console=hvc0' % (kernel_path)) -- cgit 1.4.1