Skip to content

Commit f962945

Browse files
pridhivirajstewartsmith
authored andcommitted
Update state machine for ssh connection when system goes to off.
Currently when system goes to off state, we are not updating ssh connection to disconnected state. Due to which if any tests are having multiple IPL's then ssh API won't work once system comes back. This patch fixes this issue, by properly updating ssh connection to SSHConnectionState.DISCONNECTED state when ever system reaches standby state in state machine. Signed-off-by: Pridhiviraj Paidipeddi <[email protected]> Signed-off-by: Stewart Smith <[email protected]>
1 parent 15051ed commit f962945

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

common/OpTestSystem.py

+3
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
from OpTestError import OpTestError
4242
from OpTestHost import OpTestHost
4343
from OpTestUtil import OpTestUtil
44+
from OpTestHost import SSHConnectionState
45+
4446

4547
class OpSystemState():
4648
UNKNOWN = 0
@@ -217,6 +219,7 @@ def run_OS(self, state):
217219
def run_POWERING_OFF(self, state):
218220
if int(self.sys_wait_for_standby_state(BMC_CONST.SYSTEM_STANDBY_STATE_DELAY)) == 0:
219221
print "System is in standby/Soft-off state"
222+
self.cv_HOST.ssh.state = SSHConnectionState.DISCONNECTED
220223
return OpSystemState.OFF
221224
else:
222225
l_msg = "System failed to reach standby/Soft-off state"

testcases/fspTODCorruption.py

-2
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,8 @@ def runTest(self):
112112
self.tearDown()
113113
self.cv_SYSTEM.goto_state(OpSystemState.OFF)
114114
self.cv_SYSTEM.goto_state(OpSystemState.OS)
115-
self.cv_HOST.ssh.state = SSHConnectionState.DISCONNECTED
116115
self.check_hwclock()
117116
self.cv_SYSTEM.goto_state(OpSystemState.OFF)
118-
self.cv_HOST.ssh.state = SSHConnectionState.DISCONNECTED
119117
self.set_tod()
120118
self.cv_SYSTEM.goto_state(OpSystemState.OS)
121119
self.check_hwclock()

0 commit comments

Comments
 (0)