[patch] New test for set backtrace related functionality
Paul Gilliam
pgilliam@us.ibm.com
Mon Oct 25 16:32:00 GMT 2004
Michael,
On Friday 22 October 2004 14:48, Michael Chastain wrote:
> The design is good, but there are simple implementation nits,
> and one implementation problem that I haven't got to the bottom
> of yet.
>
> In setbacktrace.c, add a line "#include <stdlib.h>" to get the
> declaration of atoi. gcc HEAD does not warn about it today
> but it might eventually. :-/
>
> When you name the tests, don't use "(...)" as part of the test name:
>
> set test "set backtrace"
> set test "full backtrace"
> set test "full backtrace (exact)"
> set test "partial backtrace"
> set test "partial backtrace (using limit)"
>
> Test names that differ only in that way are hard to talk about.
> Similarly, it's bad when one name is a prefix of another name.
>
> How about:
>
> set test "set backtrace"
> set test "full backtrace, ignore extra"
> set test "full backtrace, exact"
> set test "partial backtrace, with argument"
> set test "partial backtrace, with limit"
Looks good to me.
>
> There's a problem with the "partial backtrace (using limit)" test:
>
> set extra_frames [lrange $expected_frames 0 [expr $subr_depth + 2]]
>
> $expected_frames has 22 elements in it, and this call to lrange
> asks for elements 0 to 22, which is 23 elements.
>
> Here's the tough problem. I'm getting a weird random timeout on the
> "partial backtrace (using limit)" test. In a group of 12
> configurations, I saw 2 PASS and 12 FAIL/timeout. I suspect some ".*"
> or "[^foo]*" that is too greedy and eating more than it should, leaving
> the later bits of the expect_list out to dry. gdb_expect_list is
> matching them one at a time so there is no backtracking if an early r.e.
> mistakenly eats too much. Specifically, it might be a problem with the
> definition of $leadin.
I'll take a close look at this. As a dejagnu/expect tyro, the 'greedy RE'
problem has been a tough one. I hate getting timeouts because they make the
testsuite run so s-l-o-w.
>
> Michael
>
> ===
>
> 2004-10-14 Paul Gilliam <pgilliam@us.ibm.com>
>
> * gdb.base/setbacktrace.c gdb.base/setbacktrace.exp: New files.
Thanks for your review/input: I'll try to turn this around today.
-=# Paul #=-
More information about the Gdb-patches
mailing list