File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,23 +76,19 @@ def runTest(self):
7676 self .cv_SYSTEM .host_console_login ()
7777
7878 # To check opal-prd daemon is running or not
79- l_cmd = "ps -ef | grep opal-prd | head -1 | awk '{ print $2 }'"
80- l_res = self .cv_HOST .host_run_command (l_cmd )
79+ l_res = self .cv_HOST .host_run_command ("pidof opal-prd" )
8180
8281 # To kill the opal-prd daemon using its PID
8382 l_cmd = "kill -9 %d" % int (l_res [0 ])
8483 l_res = self .cv_HOST .host_run_command (l_cmd )
8584
8685 # To check if opal-prd daemon is spawned again even after killing
87- l_cmd = "ps -ef | grep opal-prd | head -1 | awk '{ print $2 }'"
88- l_res = commands .getstatusoutput (l_cmd )
89- print l_res
90-
9186 try :
92- if int (l_res [0 ]) == 0 :
93- print "opal-prd daemon is always running"
87+ l_res = self .cv_HOST .host_run_command (l_cmd )
9488 except CommandFailed as c :
9589 self .assertEqual (c .exitcode , 0 , "opal-prd daemon is not running always:Need to raise a bug: %s" % str (c ))
9690
91+ print "opal-prd daemon is always running"
92+
9793 return BMC_CONST .FW_SUCCESS
9894
You can’t perform that action at this time.
0 commit comments