Bug 10826 - issue with the telnet output ,when telnet commands are executed pexpect module
Summary: issue with the telnet output ,when telnet commands are executed pexpect module
Status: NEW
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.27.x
Hardware: PC Linux
: P5 major
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-01 09:13 UTC by Rajesh Dasari
Modified: 2018-03-04 22:30 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rajesh Dasari 2018-03-01 09:13:45 UTC
we are using busybox v1.27.2 version.

I am executing the telnet command from pexpect spawned object. 

telnet_obj=pexpect.spawn('telnet NODE')

telnet_obj.sendline("mycommand")
telnet_obj.expect('NODE#', timeout = 30)

actual command flow is like below
NODE#mycommand 

-some output-
NODE#

when i execute "mycommand" ,o/p will be printed and then NODE# will be seen after the output.

what we expect to be present in the pexpect buffers, when the command is executed is like below

-some output-
NODE#
 but what we see in the pexpect buffers is 

NODE#mycommand
-some output-
NODE#

we are noticing the prompt and "mycommand" in the pexpect output buffers, with the busybox telnet.

I tested with the telnet binary from inetutils with the same NODE and pexpect versions, this worked as expected i.e we didn't see NODE#mycommand in the buffers.

Please let me know what is the cause for this behaviour and how to fix this .
Comment 1 Denys Vlasenko 2018-03-04 22:30:30 UTC
I don't know what pexpect is.

"o/p will be printed" - what is "o/p"?

stracing both telnets will show the difference.