Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Matt Rice <ratmice@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: gdb.objc/objcdecode.exp test error..
Date: Thu, 24 Sep 2009 16:52:00 -0000	[thread overview]
Message-ID: <20090924165234.GB2112@adacore.com> (raw)
In-Reply-To: <8ba6bed40909232348j47027093of7a2bafb8120e5ce@mail.gmail.com>

> np, this is also duplicated in the 2 .exp files,
> i should figure out if i can somehow include it from the gdb.objc?

I'd say nah, let's keep it kiss for now.

> well, theres a lot of tests that pass that just involve various setup
> for the tests which fail, i think ideally, these would not be tests,
> but e.g. if i just do send_gdb I seem to run into lots of timing
> issues, i just kfailed the ones that do fail.

It's fine for them to be tests, even if they are very simple minded
and are not directly related to the issue we're trying to test. They
are still part of the scenario, and if something goes wrong, then we
get a FAIL. send_gdb should never ever be used in a testcase except
under peculiar conditions that gdb_test_multiple does not handle
already.  The send_gdb thing is not all that evil, it's just that
people tend to follow it up with an expect_gdb, which is usually
incomplete, and always a maintenance issue.

We can handle the change to lib/gdb.exp independently of the rest.

@@ -474,6 +474,11 @@ proc gdb_continue_to_breakpoint {name {location_pattern .*}} {
 	-re ".*$gdb_prompt $" {
 	    fail $full_name
 	}
+        -re ".*A problem internal to GDB has been detected" {
+             fail "$full_name (GDB internal error)"
+             gdb_internal_error_resync
+	}
+
 	timeout { 
 	    fail "$full_name (timeout)"
 	}

This is a perfect example of why send_gdb/expect_gdb is usually
a bad idea. This should be replaced by gdb_test_multiple. The whole
implementation can then be replaced by:

    gdb_test_mutiple "continue" $full_name {
        -re "Breakpoint .* (at|in) $location_pattern\r\n$gdb_prompt $" {
            pass $full_name
        }
    }

It could also possibly be replaced by a simple call to gdb_test, but
I think that gdb_test has a side-effect of appending a wildcard match
at the end of the given regexp. So it would transform $location_pattern
into $location_pattern followed by ".*".

-- 
Joel


      parent reply	other threads:[~2009-09-24 16:52 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-06  1:31 Matt Rice
2009-03-06 17:33 ` Joel Brobecker
2009-03-06 19:13   ` Pedro Alves
2009-03-07 12:07     ` Matt Rice
2009-03-08 14:16       ` Matt Rice
2009-03-09  2:10         ` Matt Rice
2009-09-11 11:43           ` Matt Rice
2009-09-24  0:53             ` Joel Brobecker
2009-09-24  8:24               ` Matt Rice
2009-09-24 18:28                 ` Tom Tromey
2009-09-24 22:07                   ` Matt Rice
2009-09-24 22:29                 ` Matt Rice
2009-09-24 22:51                   ` Matt Rice
2009-09-25  4:03               ` Matt Rice
2009-10-13  0:44               ` Tom Tromey
2009-10-14  1:59                 ` Joel Brobecker
2009-09-23 23:13         ` Joel Brobecker
2009-09-24  6:48           ` Matt Rice
2009-09-24 16:41             ` Joel Brobecker
2009-09-24 17:31               ` Joel Brobecker
2009-09-24 17:41               ` Joel Brobecker
2009-09-24 16:52             ` Joel Brobecker [this message]

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=20090924165234.GB2112@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=ratmice@gmail.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