RunCommandProxy with Interupt Signal

Spaeth, Alexander aspaeth at christ-es.de
Tue Jun 27 08:47:54 CEST 2023


Dear tbot community,

I was programming with tbot's RunCommandProxy and found interesting behavior surrounding the command sendintr() and terminate().


  1.  Code (Reference code.png)

  *   Start the SSH Connection with the run() command
  *   Send Password
  *   IF Password Prompt shows up again --> Wrong Password
     *   Send CTRL-C
  *   IF Password Prompt doesn't show up --> Right Password
     *   Send "exit"


  1.  Test Setup
     *   Setup LocalLab

     *   LocalHost is also LabHost
     *   DUT is connected to LocalHost/LabHost

     *   Setup RemoteLab

     *   LocalHost is separate from LabHost
     *   LocalHost connects with SSH to LabHost
     *   DUT is connected to LabHost


  1.  Findings
     *   LocalLab (Reference local_Lab.png)

     *   When Test is performed on LocalLab no problems arrise

     *   RemoteLab (Reference remote_lab.png)

     *   When Test is performed on RemoteLab it gets stuck


  1.  Debugging
     *   LocalLab (Reference debug_local_lab.png)

     *   The CTRL-C gets correctly translated to \x03
     *   The Channel sends '\r\n' back
     *   terminate() cleanly closes the RunCommandProxy

     *   RemoteLab (Reference debug_remote_lab.png)

     *   The CTRL-C gets correctly translated to \x03
     *   The Channel sends nothing back
     *   terminat() gets stuck on the line 204 in tbot/machine/linux/util.py: next(self._cmd_context)

After analyzing the behavior I have to ask the question, what am I doing wrong?
I would be happy about any help or tips you can provide.

Best Regards

aspaeth



Christ Electronic Systems GmbH
http://www.christ-es.de/

Gesch?ftsf?hrer: Franz Reichle
Hauptsitz: Alpenstra?e 34, 87700 Memmingen
Amtsgericht Memmingen HRB 9102

Diese E-Mail enth?lt vertrauliche und/oder rechtlich gesch?tzte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrt?mlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: code.png
Type: image/png
Size: 52775 bytes
Desc: code.png
URL: <https://lists.denx.de/pipermail/tbot/attachments/20230627/fd8f4245/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debug_local_lab.png
Type: image/png
Size: 43559 bytes
Desc: debug_local_lab.png
URL: <https://lists.denx.de/pipermail/tbot/attachments/20230627/fd8f4245/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debug_remote_lab.png
Type: image/png
Size: 34810 bytes
Desc: debug_remote_lab.png
URL: <https://lists.denx.de/pipermail/tbot/attachments/20230627/fd8f4245/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: local_Lab.png
Type: image/png
Size: 83188 bytes
Desc: local_Lab.png
URL: <https://lists.denx.de/pipermail/tbot/attachments/20230627/fd8f4245/attachment-0008.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: remote_lab.png
Type: image/png
Size: 108539 bytes
Desc: remote_lab.png
URL: <https://lists.denx.de/pipermail/tbot/attachments/20230627/fd8f4245/attachment-0009.png>


More information about the tbot mailing list