dejagnu
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Only ~50 error messages get processed


From: Dominik Vogt
Subject: Re: Only ~50 error messages get processed
Date: Wed, 11 Mar 2015 13:27:14 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]