Skip to content

Commit

Permalink
guest_os_booting: disable test cases on s390x
Browse files Browse the repository at this point in the history
SMBIOS, ACPI, the fw_cfg device are not available on s390x.
USB is not available on s390x.

Don't enable bootmenu as it will not timeout automatically.
Use scsi target bus for now, not sure at this point if virtio-blk
is covered, too.

Don't configure firmware on s390x, just return the first VM.

<boot dev.../> is not supported on s390x, disable tests.

For direct kernel boot, don't use hard coded kernel filename.
In our setup we'll use kernel.img, so just use the filename
from the download url.

Don't use ttyS0, it's the line mode console which is not useful.
Using no specific setting works well.

Signed-off-by: Sebastian Mitterle <[email protected]>
  • Loading branch information
smitterl committed Nov 11, 2024
1 parent 9e94e76 commit 42c5da4
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
os_dict = {'boots': ['%s', '%s'], 'bootmenu_enable': 'yes'}
cdrom_dict = {'source': {'attrs': {'file': '%s'}}, 'type_name': 'file', 'device': 'cdrom', 'driver': {'name': 'qemu', 'type': 'raw'}, 'target': {'dev': 'sda', 'bus': '${target_bus}'}}
check_prompt = ["begin the installation process|Install Red Hat Enterprise"]
no s390-virtio
variants first_dev:
- hd:
variants second_dev:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
aarch64:
os_dict = {'bootmenu_enable': 'yes'}
target_bus = 'scsi'
s390-virtio:
os_dict = {'bootmenu_enable': 'no'}
target_bus = 'scsi'
cdrom_dict = {'source': {'attrs': {'file': '%s'}}, 'type_name': 'file', 'device': 'cdrom', 'driver': {'name': 'qemu', 'type': 'raw'}, 'target': {'dev': 'sda', 'bus': '${target_bus}'}}
check_prompt = ["begin the installation process|Install Red Hat Enterprise"]
check_prompt = ["begin the installation process|Install Red Hat Enterprise|Starting installer"]
variants first_dev:
- hd:
disk_order = {'boot': '1'}
Expand All @@ -22,7 +25,7 @@
variants bootable_device:
- hd_bootable:
- network_bootable:
check_prompt = ["iPXE initialising devices|Start PXE over IPv4"]
check_prompt = ["iPXE initialising devices|Start PXE over IPv4|Trying pxelinux.cfg files"]
- cdrom:
cdrom_order = {'boot': '1'}
variants second_dev:
Expand All @@ -36,7 +39,7 @@
variants bootable_device:
- cdrom_bootable:
- network_bootable:
check_prompt = ["iPXE initialising devices|Start PXE over IPv4"]
check_prompt = ["iPXE initialising devices|Start PXE over IPv4|Trying pxelinux.cfg files"]
- network:
network_order = {'boot': '1'}
variants second_dev:
Expand All @@ -45,10 +48,10 @@
variants bootable_device:
- hd_bootable:
- network_bootable:
check_prompt = ["iPXE initialising devices|Start PXE over IPv4"]
check_prompt = ["iPXE initialising devices|Start PXE over IPv4|Trying pxelinux.cfg files"]
- cdrom:
cdrom_order = {'boot': '2'}
variants bootable_device:
- cdrom_bootable:
- network_bootable:
check_prompt = ["iPXE initialising devices|Start PXE over IPv4"]
check_prompt = ["iPXE initialising devices|Start PXE over IPv4|Trying pxelinux.cfg files"]
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
bus_type = "usb"
target_disk = "sda"
device_dict = {"type_name":"file", "target":{"dev": "${target_disk}", "bus": "${bus_type}"}, 'boot': '2'}
s390-virtio:
expected_error = unsupported configuration: This QEMU doesn't support
- filesystem_device:
target_dir = "mount_tag"
source_dir = "/tmp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
initrd_url = "${repo_url}/images/pxeboot/initrd.img"
vmlinuz_url = "${repo_url}/images/pxeboot/vmlinuz"
direct_kernel_dict = {'cmdline': 'console=ttyS0 inst.repo=${repo_url}', 'initrd': '%s', 'kernel': '%s'}
s390-virtio:
direct_kernel_dict = {'cmdline': 'inst.repo=${repo_url}', 'initrd': '%s', 'kernel': '%s'}
variants:
- start_guest:
check_prompt = "Starting installer"
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
acpi_url = "EXAMPLE_ACPI_URL"
acpi_file = "slic.dat"
acpi_dict = {'acpi': {'table_type': 'slic', 'table': '%s'}}
no aarch64
no aarch64, s390-virtio
variants:
- start_guest:
cmd_in_guest = "acpidump"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
- guest_os_booting.smbios_mode:
type = smbios_mode
start_vm = no
no s390-virtio
variants:
- positive_test:
variants smbios_mode:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
type = sysinfo_fwcfg
start_vm = no
entry_value = "example value"
no s390-virtio
variants:
- positive_test:
variants:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
virsh_migrate_connect_uri = "qemu:///system"
variants:
- os_dev:
no s390-virtio
os_attrs_boots = ['hd', 'cdrom', 'network']
- boot_order:
disk_boot_idx = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ def run(test, params, env):
bkxml = vmxml.copy()

try:
boot_initrd = os.path.join(data_dir.get_data_dir(), "initrd.img")
boot_vmlinuz = os.path.join(data_dir.get_data_dir(), "vmlinuz")
boot_initrd = os.path.join(data_dir.get_data_dir(), initrd_url.split("/")[-1])
boot_vmlinuz = os.path.join(data_dir.get_data_dir(), vmlinuz_url.split("/")[-1])
url_download(initrd_url, boot_initrd)
url_download(vmlinuz_url, boot_vmlinuz)
direct_kernel_dict = eval(params.get("direct_kernel_dict")
Expand Down
3 changes: 2 additions & 1 deletion provider/guest_os_booting/guest_os_booting_base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import logging
import platform

from avocado.core import exceptions
from avocado.utils import distro
Expand Down Expand Up @@ -38,7 +39,7 @@ def get_vm(params):
LOG.debug(f"VMS: {os_type_dict}")
if not firmware_type:
LOG.debug("Get default vm")
if detected_distro.name == 'rhel':
if detected_distro.name == 'rhel' and platform.machine() != "s390x":
if int(detected_distro.version) < 9:
firmware_type = 'seabios'
else:
Expand Down

0 comments on commit 42c5da4

Please sign in to comment.