Skip to content

Commit

Permalink
OpTestInbandIPMI: be more flexible with dcmi results
Browse files Browse the repository at this point in the history
This makes dcmi pass on SuperMicro systems (notably p9dsu)

Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
stewartsmith committed Sep 21, 2017
1 parent ba39496 commit 5efe1a3
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions testcases/OpTestInbandIPMI.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,13 +452,25 @@ def sensor_byid(self, i_sensor=BMC_CONST.SENSOR_HOST_STATUS):
def test_dcmi(self):
print "Inband IPMI[OPEN]: dcmi tests"
c = self.set_up()
self.run_ipmi_cmds(c, [self.ipmi_method + BMC_CONST.IPMI_DCMI_DISCOVER,
self.ipmi_method + BMC_CONST.IPMI_DCMI_POWER_READING,
#self.ipmi_method + BMC_CONST.IPMI_DCMI_POWER_GET_LIMIT,
self.ipmi_method + BMC_CONST.IPMI_DCMI_GET_MC_ID_STRING,
self.ipmi_method + BMC_CONST.IPMI_DCMI_GET_TEMP_READING,
self.ipmi_method + BMC_CONST.IPMI_DCMI_GET_CONF_PARAM,
self.ipmi_method + BMC_CONST.IPMI_DCMI_SENSORS])
cmds = [self.ipmi_method + BMC_CONST.IPMI_DCMI_DISCOVER,
self.ipmi_method + BMC_CONST.IPMI_DCMI_POWER_READING,
#self.ipmi_method + BMC_CONST.IPMI_DCMI_POWER_GET_LIMIT,
self.ipmi_method + BMC_CONST.IPMI_DCMI_GET_MC_ID_STRING,
self.ipmi_method + BMC_CONST.IPMI_DCMI_GET_TEMP_READING,
self.ipmi_method + BMC_CONST.IPMI_DCMI_GET_CONF_PARAM,
self.ipmi_method + BMC_CONST.IPMI_DCMI_SENSORS]
for cmd in cmds:
try:
self.run_ipmi_cmds(c, [cmd])
except CommandFailed as cf:
if 'Command not supported in present state' in ''.join(cf.output):
pass
elif 'Invalid command' in ''.join(cf.output):
pass
elif 'Requested sensor, data, or record not found' in ''.join(cf.output):

This comment has been minimized.

Copy link
@pridhiviraj

pridhiviraj Sep 22, 2017

Contributor

@stewart-ibm We have raised bugs for this, they are in the process of fixing those dcmi bugs. We need to remove this and make command fail if it is really failing. It helped me to raise 3 to 4 dcmi bugs. Otherwise we will miss those failures.

pass
else:
self.fail(str(cf))


##
Expand Down

0 comments on commit 5efe1a3

Please sign in to comment.