Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VM_bootloader:provide bootloader's version for each arch #3786

Merged
merged 1 commit into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions virttest/env_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -1244,6 +1244,17 @@ def preprocess(test, params, env):
test.cancel("Got host qemu version:%s, which is not in %s" %
(host_qemu, required_qemu))

# Get the version of bootloader
vm_bootloader_ver_cmd = params.get("vm_bootloader_ver_cmd", "")
if vm_bootloader_ver_cmd:
try:
vm_bootloader_ver = a_process.run(
vm_bootloader_ver_cmd, shell=True).stdout_text.strip()
except a_process.CmdError:
vm_bootloader_ver = "Unkown"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if the version is "Unknown", it can also be saved in the version_info, like qemu/libvirt doing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, updated

version_info["vm_bootloader_version"] = str(vm_bootloader_ver)
LOG.debug("vm bootloader version: %s", vm_bootloader_ver)

# Get the Libvirt version
if vm_type == "libvirt":
libvirt_ver_cmd = params.get("libvirt_ver_cmd", "libvirtd -V|awk -F' ' '{print $3}'")
Expand Down
7 changes: 7 additions & 0 deletions virttest/shared/cfg/base.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -1087,3 +1087,10 @@ uuid_dimm = ""

# Set image_extent_size_hint, displayed in qemu-img info extend_size_hint field.
#image_extent_size_hint = 1G #To set extent_size_hint to 1G

#
#VM bootloader params
#
#Notes: please make sure the corresponding firmware before you set this value!
#eg. for x86_64
#vm_bootloader_ver_cmd = "rpm -qa|grep ^sea"
Loading