Skip to content

Commit

Permalink
Added support in Machine config as perf collection data can be set vi…
Browse files Browse the repository at this point in the history
…a dynamic profile

Added support in Machine config as perf collection data can be set via dynamic profile

Signed-off-by: Praveen K Pandey <praveen@linux.vnet.ibm.com>
  • Loading branch information
PraveenPenguin committed May 3, 2024
1 parent 0f24a24 commit 920aea8
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions testcases/MachineConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@ def callConfig(self, key):
class LparConfig():

'''
pass machine_config in config file indicating proc mode, vtpm and vpmem.
pass machine_config in config file indicating proc mode, vtpm vpmem and perf.
valid values: cpu=shared or cpu=dedicated
vtpm=1 or vtpm=0
vpmem=0 or vpmem=1
Ex: machine_config="cpu=dedicated,vtpm=1,vpmem=1"
Ex: machine_config="cpu=dedicated,vtpm=1,vpmem=1,perf=1"
'''
def __init__(self, cv_HMC=None, system_name= None,
lpar_name=None, lpar_prof=None, machin_config =None, sb_enable=None):
Expand Down Expand Up @@ -325,6 +325,18 @@ def LparSetup(self):
ioslot_drc_names = ",".join(ioslot_drc_names[:ioslot_drc_names.index("=")].split(",")[:-1]) \
if "=" in ioslot_drc_names else ioslot_drc_names
self.cv_HMC.add_ioslot(ioslot_drc_names)

if "perf=1" in self.machine_config:
conf = OpTestConfiguration.conf
if self.cv_HMC.is_perfcollection_enabled():
log.info("System is already booted with perf collection profile enabled")
else:
self.cv_HMC.hmc_perfcollect_configure()
if self.cv_HMC.is_perfcollection_enabled:
log.info("System is already booted with perf collection profile enabled")
else:
return "Failed to enable Performance Information collection"


if self.sb_enable is not None :
self.cv_HMC.hmc_secureboot_on_off(self.sb_enable)
Expand Down

0 comments on commit 920aea8

Please sign in to comment.