The cause of the problem is the maximum string length hard coded
in /usr/share/dejagnu/remote.exp:
# Wait for either $timeout seconds to elapse, or for the program to
# exit.
expect {
-i $spawn_id -timeout $timeout -re ".+" {
append output $expect_out(buffer)
if { [string length $output] < 512000 } {
exp_continue -continue_timer
}
}
timeout {
warning "program timed out."
}
eof {
set got_eof 1
}
}
Any bytes past the initial 512000 bytes seem to be discarded. I
can fix my immediate problem by increasing this value. Maybe this
should be configurable on the command line? This limit is
probably there for a reason, though. With a small expect buffer
or a very high limit the loop generating the output string may
take a lot of time (O(n^2)). Maybe the chunks of data could be
stored in an array of strings during the loop and be copied and
concatenated into preallocated memory in a single pass at the end
of a loop?
Ciao
Dominik ^_^ ^_^
--
Dominik Vogt
IBM Germany
_______________________________________________
DejaGnu mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/dejagnu