Skip to content

Commit

Permalink
SLOF:Add package info of SLOF for ppc
Browse files Browse the repository at this point in the history
Signed-off-by: Miriam Deng <[email protected]>
  • Loading branch information
MiriamDeng committed Oct 24, 2023
1 parent d5d01be commit 415c0fc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
12 changes: 12 additions & 0 deletions virttest/env_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -1250,6 +1250,18 @@ def preprocess(test, params, env):
test.cancel("Got host qemu version:%s, which is not in %s" %
(host_qemu, required_qemu))

# Get the SLOF version for power pc
slof_ver_cmd = params.get("slof_ver_cmd", "rpm -qa|grep SLOF")
if arch.ARCH in ('ppc64', 'ppc64le'):
if slof_ver_cmd:
try:
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)
except a_process.CmdError:
slof_version = "Unkown"

# Get the Libvirt version
if vm_type == "libvirt":
libvirt_ver_cmd = params.get("libvirt_ver_cmd", "libvirtd -V|awk -F' ' '{print $3}'")
Expand Down
4 changes: 3 additions & 1 deletion virttest/shared/cfg/base.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,9 @@ netdev_peer_re = "\s{2,}(.*?): .*?\\\s(.*?):"
# is a convenient example for RHEL and Fedora.
#kvm_ver_cmd = "modinfo kvm | grep vermagic | awk '{print $2}'"
#kvm_userspace_ver_cmd = "grep -q el5 /proc/version && rpm -q kvm || rpm -q qemu-kvm"

# You can set command for checking SLOF on Power PC
# slof_ver_cmd = "rpm -qa|grep SLOF"
#
image_clone_command = 'cp --reflink=auto %s %s'
image_remove_command = 'rm -rf %s'

Expand Down

0 comments on commit 415c0fc

Please sign in to comment.