This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 43310 - expect in tcltk-8.3.1-53 doesn't work right.
expect in tcltk-8.3.1-53 doesn't work right.
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: tcltk (Show other bugs)
7.3
All Linux
high Severity high
: ---
: ---
Assigned To: Jens Petersen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-06-02 20:20 EDT by hjl
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-08-05 00:34:37 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
expect.test used to show the bug. (3.85 KB, text/plain)
2001-06-02 20:21 EDT, hjl
no flags Details
A patch to fix expect (5.28 KB, patch)
2001-06-03 22:30 EDT, hjl
no flags Details | Diff
An updated patch (6.22 KB, patch)
2001-06-04 12:15 EDT, hjl
no flags Details | Diff
Update comments (6.19 KB, patch)
2001-06-04 12:27 EDT, hjl
no flags Details | Diff
An updated patch. (6.19 KB, patch)
2001-10-23 02:40 EDT, hjl
no flags Details | Diff
A updated patch. (6.34 KB, patch)
2001-11-15 19:09 EST, hjl
no flags Details | Diff
A new patch. (6.60 KB, patch)
2001-11-29 15:59 EST, hjl
no flags Details | Diff

  None (edit)
Description hjl 2001-06-02 20:20:31 EDT
expect in tcltk-8.3.1-53 doesn't work right. The
problem is spawn won't print out all output.

# expect
expect1.1> spawn cat expect.test
spawn cat expect.test
23928
expect1.2> expect
 1: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
 2: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
 3: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
 4: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
 5: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
 6: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
 7: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
 8: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
 9: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
10: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
11: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
12: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
13: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
14: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
15: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
16: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
17: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
18: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
19: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
20: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
21: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
22: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
23: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
24: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
25: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
26: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
27: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
28: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
29: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
30: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
31: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
32: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
33: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
34: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
35: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
36: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
37: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
38: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
39: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
40: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
41: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
42: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
43: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
44: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
45: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
46: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
47: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
48: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
49: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
50: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
51: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
52: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
53: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
54: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
55: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
56: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
57: 0123456789abdecf0123456789abdecf0123456789abdecf0123456789abdecf
expect1.3> 

The problem is the last line

58: 012345

is missing. The problem depends on the size of the file.
Comment 1 hjl 2001-06-02 20:21:25 EDT
Created attachment 20150 [details]
expect.test used to show the bug.
Comment 2 hjl 2001-06-03 22:29:53 EDT
The problem is expect is line-oriented. It is designed for
interactive programs. But if the program is not interactive,
it won't work right at all. I will submit a patch with
lots of comments. It works for me.
Comment 3 hjl 2001-06-03 22:30:52 EDT
Created attachment 20198 [details]
A patch to fix expect
Comment 4 hjl 2001-06-04 12:15:42 EDT
Created attachment 20213 [details]
An updated patch
Comment 5 hjl 2001-06-04 12:27:29 EDT
Created attachment 20214 [details]
Update comments
Comment 6 Eido Inoue 2001-07-10 15:49:30 EDT
Thanks for the patch. I tested it with expect 5.32 and the bug (and this fix)
seems to apply to that as well.

Have you submitted this upstream?
Comment 7 hjl 2001-07-10 16:17:08 EDT
I am not totally convinced my patch is 100% correct. It does fix
that problem. But I have seen one case that expect reads in some
junks beyond the end of the input. It seems that the input buffer
expansion doesn't work quite right.. Those junks beyond the end
of the input really confuses expect and puts it in an endless loop.
But it only happens at random. I can't duplicate it reliably
myself. It happens when I cross compile binutils to Linux/hppa
and do "make check" on it.  expect chokes in gas sometimes.

Comment 8 hjl 2001-10-23 02:39:52 EDT
I spotted a few problems. I will upload a
new patch.
Comment 9 hjl 2001-10-23 02:40:49 EDT
Created attachment 34683 [details]
An updated patch.
Comment 10 hjl 2001-11-15 19:07:26 EST
Here is a new patch. I hope I really get it right this time :-).
Comment 11 hjl 2001-11-15 19:09:20 EST
Created attachment 37702 [details]
A updated patch.
Comment 12 hjl 2001-11-29 15:58:57 EST
I have a new patch. I think I got it right time :-).
Comment 13 hjl 2001-11-29 15:59:46 EST
Created attachment 39087 [details]
A new patch.
Comment 14 hjl 2002-06-10 11:57:33 EDT
7.3 has the old patch. Please use the latest one I
uploaded at 2001-11-29 03:59:45.
Comment 15 Jens Petersen 2002-08-14 02:34:35 EDT
Thanks for the updates.  I updated to the latest patch in expect-5.38.0-73.

Note You need to log in before you can comment on or make changes to this bug.