Skip to content
This repository has been archived by the owner on Mar 22, 2021. It is now read-only.

Serial Login: Expected Logging+Behaviour #102

Closed
erikbgithub opened this issue Feb 28, 2014 · 1 comment
Closed

Serial Login: Expected Logging+Behaviour #102

erikbgithub opened this issue Feb 28, 2014 · 1 comment

Comments

@erikbgithub
Copy link
Contributor

Situation

While debugging the serial connection some improvements were made that might not make it into MONK via other issues. For the connection and login process the following behaviour is expected (including logging behaviour).

When target device deactivated:

>>> c.disconnect(); c.connect(); c.login();
INFO:monk_tf.conn:SerialConnection:logging out...
DEBUG:monk_tf.conn:SerialConnection:execute event 'DISCONNECT' in state 'Disconnected'
WARNING:monk_tf.conn:SerialConnection: tried to disconnect but is already disconnected
DEBUG:monk_tf.conn:SerialConnection:current state 'Disconnected'
INFO:monk_tf.conn:SerialConnection:connecting...
DEBUG:monk_tf.conn:SerialConnection:execute event 'CONNECT' in state 'Disconnected'
INFO:monk_tf.conn:SerialConnection:requesting new prompt
ERROR:monk_tf.conn:SerialConnection:
Traceback (most recent call last):
  File "/home/erikb85/coding/monk/monk_tf/conn.py", line 507, in connect
    connection._prompt()
  File "/home/erikb85/coding/monk/monk_tf/conn.py", line 292, in _prompt
    return self._cmd("",returncode=False) + os.linesep + self.last_prompt
  File "/home/erikb85/coding/monk/monk_tf/conn.py", line 420, in _cmd
    raise EmptyResponseException()
EmptyResponseException
DEBUG:monk_tf.conn:SerialConnection:current state 'Disconnected'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/erikb85/coding/monk/monk_tf/conn.py", line 215, in connect
    out = self.current_state.connect(self)
  File "/home/erikb85/coding/monk/monk_tf/conn.py", line 512, in connect
    raise CantConnectException("Target device running?")
monk_tf.conn.CantConnectException: Target device running?

When doing the same call while activating the device the following behaviour is expected:

>>> c.disconnect(); c.connect(); c.login();
INFO:monk_tf.conn:SerialConnection:logging out...
DEBUG:monk_tf.conn:SerialConnection:execute event 'DISCONNECT' in state 'Disconnected'
WARNING:monk_tf.conn:SerialConnection: tried to disconnect but is already disconnected
DEBUG:monk_tf.conn:SerialConnection:current state 'Disconnected'
INFO:monk_tf.conn:SerialConnection:connecting...
DEBUG:monk_tf.conn:SerialConnection:execute event 'CONNECT' in state 'Disconnected'
INFO:monk_tf.conn:SerialConnection:requesting new prompt
ERROR:monk_tf.conn:SerialConnection:
Traceback (most recent call last):
  File "/home/erikb85/coding/monk/monk_tf/conn.py", line 507, in connect
    connection._prompt()
  File "/home/erikb85/coding/monk/monk_tf/conn.py", line 292, in _prompt
    return self._cmd("",returncode=False) + os.linesep + self.last_prompt
  File "/home/erikb85/coding/monk/monk_tf/conn.py", line 420, in _cmd
    raise EmptyResponseException()
EmptyResponseException
DEBUG:monk_tf.conn:SerialConnection:current state 'Disconnected'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/erikb85/coding/monk/monk_tf/conn.py", line 215, in connect
    out = self.current_state.connect(self)
  File "/home/erikb85/coding/monk/monk_tf/conn.py", line 512, in connect
    raise CantConnectException("Target device running?")
monk_tf.conn.CantConnectException: Target device running?

Task

  • develop integration tests to check for this behaviour
  • verify how the current monk behaviour is different from the expected
  • create issues to change the behaviour
  • implement changes in the other issues
  • close this one when result matches

Notes

.

@erikbgithub erikbgithub added this to the v0.1.6 - Docs milestone Feb 28, 2014
@erikbgithub erikbgithub modified the milestones: v0.1.7 - Docs, v0.1.6 - Debug Release Mar 6, 2014
@erikbgithub erikbgithub modified the milestone: v0.1.7 - Docs Dec 22, 2014
@erikbgithub
Copy link
Contributor Author

Since rewriting the connection layer using pexpect it works differently.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant