This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] gdb/testsuite/gdb.c++/ovldbreak.exp
- To: Michael Elizabeth Chastain <chastain at cygnus dot com>
- Subject: Re: [RFA] gdb/testsuite/gdb.c++/ovldbreak.exp
- From: Fernando Nasser <fnasser at redhat dot com>
- Date: Sun, 28 Jan 2001 14:19:53 -0500
- CC: gdb-patches at sourceware dot cygnus dot com
- Organization: Red Hat Canada
- References: <200101281906.LAA00359@bosch.cygnus.com>
Michael Elizabeth Chastain wrote:
>
> This patch fixes these problems in gdb.c++/ovldbreak.exp:
>
> - Reduces run time from 8405 seconds (!!) to 4 seconds.
> - Fixes all 41 test failures.
> - Disambiguates duplicate messages.
>
> When a user sets a breakpoint on an overloaded function, GDB offers the
> user a submenu to choose the correct function. The existing ovldbreak.exp
> loses synchronization if one of its tests fails. It ends up trapped in
> the submenu, issuing fruitless commands and taking dozens of timeouts.
> That's why ovldbreak.exp takes 8405 seconds to execute.
>
Argh!
> This new ovldbreak.exp breaks out of the submenu whenever necessary,
> so that even when tests fail, it stays synchronized with the GDB prompt.
> It has an execution time of 4 seconds.
>
Thank you!
> I fixed all 41 test failures. g++ has changed some of its type encoding,
> such as "unsigned int" versus "unsigned" and "void" versus "". My test
> accommodates all the forms that the old test accommodates, plus the
> forms that I see with sourceware gcc.
>
Perfect. In the future, when the old gcc's become history we could
tighten up
the patterns again. But I don't think it matters, because the idea of
the test
is not get the exact output format but rather if the right options were
given
to the user.
> I changed the test messages to emit the same messages for PASS and FAIL,
You got the spirit! Thanks!
> and I disambiguated some duplicate test messages.
>
Yes, yes yes!
> I modularized the file with more procedures, and I documented the procedures.
> I removed excessive calls to "info break". The old file was 583 lines long;
> the new file is 349 lines long.
>
Nice.
> I tested this on:
>
> Red Hat Linux 6.2, native, with native gcc (egcs-2.91.66)
> Red Hat Linux 6.2, native, with sourceware cvs gcc
> Red Hat Linux 7, native, with native gcc (gcc 2.96)
> Red Hat Linux 7, native, with sourceware cvs gcc
>
> OK to commit?
>
Yes, please.
And thank you for doing this.
P.S: It was quite hard to review your patch due to the size, patterns
etc.
As far as I can tell it looks just perfect. Also, this should not be
platform
dependent so I guess your tests are enough (despite being just Linux
native).
IMO, in these cases there is nothing much we can do but to check it in
and keep
a close watch on it.
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9