This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA/testsuite] Workaround timeout in default.exp
> > It seemed to be slowing down on the evaluation of one specific regexp:
> >
> > ".*\(gdb\) $"? no
>
> So, it sounds like that's the problem. I don't know why expect would
> behave this terribly, but I do know something else: the regular
> expression is not front-anchored. So the leading .* does nothing. You
> may as well try removing it. I bet that will also fix the speed
> problem.
>
> [I think there should be a \r\n in front of the "$gdb_prompt $" anyway,
> don't you? Wouldn't that fix the related problem? Please try
> replacing that pattern with "\r\n$gdb_prompt $".]
You are going to be happy: With "\r\n$gdb_prompt $" it only takes 30secs
to run the entire default.exp testcases. Down from 18mins in the best
of case, several hours worth of timeouts with nothing changed. :-).
I am about to test this change against the entire testsuite, to make
sure all is well...
> '#' doesn't do what you think it does.
>
> First of all, it is not an element of TCL syntax. It's just a command
> which does nothing. Secondly, as a consequence, you can't use it where
> you aren't expecting commands. So what you did was match "#" {action
> body is "-re"},
Argh! I think that's the second time I get caught by this. And since
my editor (vim) colored it in the usual comment color, I dind't pay
attention to this.
> and then ".*\(gdb\) $" {note that there's no leading
> -re now, so it is treated as an exact match instead of a regular
> expression!}.
Which, if I understand correctly, tells me that the speedup I observed
was accidental :-).
--
Joel