From 2f8dbb05a8e3daadceb03eb4787693626042a3db Mon Sep 17 00:00:00 2001 From: Praveen K Pandey Date: Mon, 15 Jul 2024 16:22:28 +0530 Subject: [PATCH] patch fix issue on parsing while fetching memory mode without patch : 16:10:07 [console-expect]#tail /proc/cpuinfo | grep MMU 16:10:07 MMU : Radix 16:10:07 [console-expect]#echo $? 16:10:07 echo $? 16:10:07 0 16:10:07 [console-expect]#ERROR 16:10:09 16:10:09 ====================================================================== 16:10:09 ERROR: runTest (testcases.MachineConfig.MachineConfig) 16:10:09 ---------------------------------------------------------------------- 16:10:09 Traceback (most recent call last): 16:10:09 File "/var/lib/jenkins/workspace/ProfileSetup2/op-test/testcases/MachineConfig.py", line 117, in runTest 16:10:09 self.callConfig(key, lpar) 16:10:09 File "/var/lib/jenkins/workspace/ProfileSetup2/op-test/testcases/MachineConfig.py", line 189, in callConfig 16:10:09 status = OsConfig(self.cv_HMC, self.system_name, 16:10:09 File "/var/lib/jenkins/workspace/ProfileSetup2/op-test/testcases/MachineConfig.py", line 558, in __init__ 16:10:09 self.mmu = str(self.mmulist[0]).split(':')[1].strip() 16:10:09 IndexError: list index out of range Signed-off-by: Praveen K Pandey --- testcases/MachineConfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcases/MachineConfig.py b/testcases/MachineConfig.py index 37db5da6..362f9baa 100755 --- a/testcases/MachineConfig.py +++ b/testcases/MachineConfig.py @@ -555,7 +555,7 @@ def __init__(self, cv_HMC=None, system_name=None, self.c = self.cv_HMC.get_host_console() self.hmc_con = self.cv_HMC.ssh self.mmulist = self.c.run_command("tail /proc/cpuinfo | grep MMU") - self.mmu = str(self.mmulist[0]).split(':')[1].strip() + self.mmu = str(self.mmulist).split(':')[1].strip() self.cmdline = self.c.run_command("cat /proc/cmdline") self.obj = OpTestInstallUtil.InstallUtil() self.os_level = self.cv_HOST.host_get_OS_Level()