From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joel Brobecker To: gdb-patches@sources.redhat.com Subject: Re: [RFA/testsuite] Workaround timeout in default.exp Date: Fri, 21 May 2004 01:43:00 -0000 Message-id: <20040521014335.GI10684@gnat.com> References: <20040518210147.GQ10684@gnat.com> <20040518214255.GC4036@nevyn.them.org> <20040520014811.GR10684@gnat.com> <20040520022747.GA451@nevyn.them.org> <20040521011443.GG10684@gnat.com> <20040521013147.GA19027@nevyn.them.org> X-SW-Source: 2004-05/msg00626.html > > 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