Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Chastain <mec.gnu@mindspring.com>
To: pgilliam@us.ibm.com, gdb-patches@sources.redhat.com
Subject: Re: [patch] New test for set backtrace related functionality
Date: Fri, 22 Oct 2004 21:48:00 -0000	[thread overview]
Message-ID: <41798044.nailDG51QLXJD@mindspring.com> (raw)
In-Reply-To: <200410220957.46790.pgilliam@us.ibm.com>

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"

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.

Michael

===

2004-10-14  Paul Gilliam  <pgilliam@us.ibm.com>

	* gdb.base/setbacktrace.c gdb.base/setbacktrace.exp: New files.


  reply	other threads:[~2004-10-22 21:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-14 22:41 Paul Gilliam
2004-10-14 22:47 ` Paul Gilliam
2004-10-21 16:57   ` Paul Gilliam
2004-10-22 15:59     ` Michael Chastain
2004-10-22 17:00       ` Paul Gilliam
2004-10-22 21:48         ` Michael Chastain [this message]
2004-10-25 16:32           ` Paul Gilliam
2004-10-26 18:54           ` Paul Gilliam
2004-11-08 21:01             ` Paul Gilliam
2004-11-17 22:01           ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41798044.nailDG51QLXJD@mindspring.com \
    --to=mec.gnu@mindspring.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=pgilliam@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox