Skip to content

Commit e4e3859

Browse files
authored
Merge pull request #431 from debmc/ipmi
OpTestIPMI: Aide PTY tracing
2 parents 04fd4e0 + ee81bb6 commit e4e3859

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: common/OpTestIPMI.py

+3
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ def close(self):
227227
self.pty.send("\r")
228228
self.pty.send('~.')
229229
close_rc = self.pty.expect(['[terminated ipmitool]', pexpect.TIMEOUT, pexpect.EOF], timeout=10)
230+
log.debug("CLOSE Expect Buffer ID={}".format(hex(id(self.pty))))
230231
rc_child = self.pty.close()
231232
self.state = IPMIConsoleState.DISCONNECTED
232233
exitCode = signalstatus = None
@@ -275,10 +276,12 @@ def connect(self, logger=None):
275276
if self.delaybeforesend:
276277
self.pty.delaybeforesend = self.delaybeforesend
277278
rc = self.pty.expect_exact(['[SOL Session operational. Use ~? for help]', pexpect.TIMEOUT, pexpect.EOF], timeout=10)
279+
log.debug("rc={}".format(rc))
278280
if rc == 0:
279281
if self.system.SUDO_set != 1 or self.system.LOGIN_set != 1 or self.system.PS1_set !=1:
280282
self.util.setup_term(self.system, self.pty, None, self.system.block_setup_term)
281283
time.sleep(0.2)
284+
log.debug("CONNECT starts Expect Buffer ID={}".format(hex(id(self.pty))))
282285
return self.pty
283286
if rc == 1:
284287
self.pty.close()

0 commit comments

Comments
 (0)