aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCleber Rosa <crosa@redhat.com>2024-08-30 15:37:56 +0200
committerThomas Huth <thuth@redhat.com>2024-09-04 10:51:27 +0200
commit8dceb48e23159eda9428fc678511716c64e2da33 (patch)
tree1461fb3964fc7990070daaea951852b1c7a5ce31
parent7e3dca5bca68046c9ccd14c0c91f22fa256817c4 (diff)
downloadqemu-8dceb48e23159eda9428fc678511716c64e2da33.zip
qemu-8dceb48e23159eda9428fc678511716c64e2da33.tar.gz
qemu-8dceb48e23159eda9428fc678511716c64e2da33.tar.bz2
tests/avocado/boot_xen.py: fetch kernel during test setUp()
The kernel is a common blob used in all tests. By moving it to the setUp() method, the "fetch asset" plugin will recognize the kernel and attempt to fetch it and cache it before the tests are started. Signed-off-by: Cleber Rosa <crosa@redhat.com> Message-ID: <20240806173119.582857-7-crosa@redhat.com> Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com> Tested-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> Message-ID: <20240830133841.142644-3-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
-rw-r--r--tests/avocado/boot_xen.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/avocado/boot_xen.py b/tests/avocado/boot_xen.py
index f29bc58..490a127 100644
--- a/tests/avocado/boot_xen.py
+++ b/tests/avocado/boot_xen.py
@@ -30,23 +30,22 @@ class BootXen(LinuxKernelTest):
timeout = 90
XEN_COMMON_COMMAND_LINE = 'dom0_mem=128M loglvl=all guest_loglvl=all'
- def fetch_guest_kernel(self):
+ def setUp(self):
+ super(BootXen, self).setUp()
+
# Using my own built kernel - which works
kernel_url = ('https://fileserver.linaro.org/'
's/JSsewXGZ6mqxPr5/download?path=%2F&files='
'linux-5.9.9-arm64-ajb')
kernel_sha1 = '4f92bc4b9f88d5ab792fa7a43a68555d344e1b83'
- kernel_path = self.fetch_asset(kernel_url,
- asset_hash=kernel_sha1)
-
- return kernel_path
+ self.kernel_path = self.fetch_asset(kernel_url,
+ asset_hash=kernel_sha1)
def launch_xen(self, xen_path):
"""
Launch Xen with a dom0 guest kernel
"""
self.log.info("launch with xen_path: %s", xen_path)
- kernel_path = self.fetch_guest_kernel()
self.vm.set_console()
@@ -56,7 +55,7 @@ class BootXen(LinuxKernelTest):
'-append', self.XEN_COMMON_COMMAND_LINE,
'-device',
'guest-loader,addr=0x47000000,kernel=%s,bootargs=console=hvc0'
- % (kernel_path))
+ % (self.kernel_path))
self.vm.launch()