-
Notifications
You must be signed in to change notification settings - Fork 243
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
VM_bootloader:provide bootloader's version for each arch #3786
Conversation
Test results [stdlog] 2023-10-23 04:19:11,094 avocado.utils.process INFO | Command 'rpm -qa|grep SLOF' finished with 0 after 1.331755701s |
virttest/env_process.py
Outdated
@@ -1227,6 +1227,17 @@ def preprocess(test, params, env): | |||
LOG.debug("KVM userspace version(qemu): %s", kvm_userspace_version) | |||
version_info["qemu_version"] = str(kvm_userspace_version) | |||
|
|||
#Get the SLOF version for power pc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For what I want is to let it be configurable, I have 2 ideas:
- Get the firmware version for each platform:
- ovmf, aarch64: check edk2 version
- PC machine: check seabios
- PPC: check SLOF
- s390x: I don't know which one
- Make all collection versions can be customizable, qemu/kvm/libvirt/swtpm/firmware...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi all,
I listed the build info for all arches and feel free to let me know if there's any missing.
1.
aarch64: edk2
x86_64: both seabios and edk2
s390x: need to confirm with bfu
2.
swtpm for all arches.
virttest/env_process.py
Outdated
try: | ||
slof_version = a_process.run( | ||
slof_ver_cmd, shell=True).stdout_text.strip() | ||
LOG.debug("SLOF version: %s", slof_version) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Save to version_info["firmware_version"]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated, thanks.
99244b5
to
415c0fc
Compare
LGTM for power side. |
virttest/env_process.py
Outdated
slof_version = a_process.run( | ||
slof_ver_cmd, shell=True).stdout_text.strip() | ||
LOG.debug("SLOF version: %s", slof_version) | ||
version_info["firmware_version"] = str(slof_version) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is not a good way to classify them as firmware_version
since the firmware concept is a bit general.
As we know, the firmware includes lots kinds of devices, like GPU, sound card, RAID controller card, and so on. It's hard to represent all the kinds of firmware with the firmware_version
which looks general.
I would like to add the keyword slof
, like firmware_slof_version
or just slof_version
.
Please let me know your opinions. @PaulYuuu @MiriamDeng
Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer firmware_version
to be an entry. And introduce a parameter to choose which firmware needs to be checked. But as I mentioned above, if we support custom components, we don't need a common name, can use the component name directly.
components_ver_check = qemu libvirt
qemu_ver_cmd =
libvirt_ver_cmd =
ppc64le:
components_ver_check += " slof"
slof_ver_cmd =
aarch64, q35:
components_ver_check += " edk2"
edk2_ver_cmd =
for component in params.objects('components_ver_check'):
cmd = params.get(f'{component}_ver_cmd')
ver_info = process.getoutput(cmd)
LOG.debug(f"{component} version: {ver_info}")
version_info[f"{component}_version"] = ver_info
After a short offline discussion with @YongxueHong, we think can only collect the boot firmware for each platform on this PR. A possible name may be In short, in py file, log and save qemu_bios_version, in cfg:
What do you think @luckyh @MiriamDeng ? |
Hi @PaulYuuu |
415c0fc
to
c455695
Compare
Test result (without internal cfg) |
virttest/shared/cfg/base.cfg
Outdated
# | ||
#Notes: please make sure the corresponding firmware before you set this value! | ||
#eg. for x86_64 | ||
#bootloader = "rpm -qa|grep ^sea" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vm_bootloader_ver_cmd = xxx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, updated.
LOG.debug("vm_bootloader_version: %s", vm_bootloader_ver) | ||
version_info["vm_bootloader_ver"] = str(vm_bootloader_ver) | ||
except a_process.CmdError: | ||
vm_bootloader_ver = "Unkown" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, updated
c455695
to
26a5bcb
Compare
Also created new patch for internal cfg( id:1241) in gitlab. |
virttest/env_process.py
Outdated
@@ -1241,6 +1241,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_cmd = params.get("vm_bootloader", "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vm_bootloader_cmd = params.get("vm_bootloader", "") | |
vm_bootloader_cmd = params.get("vm_bootloader_ver_cmd", "") |
virttest/env_process.py
Outdated
except a_process.CmdError: | ||
vm_bootloader_ver = "Unkown" | ||
version_info["vm_bootloader_ver"] = str(vm_bootloader_ver) | ||
LOG.debug("vm_bootloader_version: %s", vm_bootloader_ver) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOG.debug("vm_bootloader_version: %s", vm_bootloader_ver) | |
LOG.debug("VM bootloader version: %s", vm_bootloader_ver) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated,thanks !
26a5bcb
to
945efe8
Compare
virttest/env_process.py
Outdated
vm_bootloader_cmd, shell=True).stdout_text.strip() | ||
except a_process.CmdError: | ||
vm_bootloader_ver = "Unkown" | ||
version_info["vm_bootloader_ver"] = str(vm_bootloader_ver) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vm_bootloader_version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated, thanks
945efe8
to
dbd175e
Compare
Test results without internal cfg |
virttest/env_process.py
Outdated
@@ -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_cmd = params.get("vm_bootloader_ver_cmd", "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vm_bootloader_cmd = params.get("vm_bootloader_ver_cmd", "") | |
vm_bootloader_ver_cmd = params.get("vm_bootloader_ver_cmd", "") |
x86_64: seabios and edk2 ppc64, ppc64le: SLOF aarch64: edk2 Signed-off-by: Miriam Deng <[email protected]>
dbd175e
to
936fb66
Compare
ID:1456