This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA]: Fix for pending breakpoints in manually loaded/unloaded shlibs


Michael Chastain wrote:
The test script is not quite okay.

The test script should match the output from the last released gdb,
gdb 6.2, as well as the current gdb.


The test should behave the same because the gdb code that generates the message it is checking hasn't been committed yet. On retrospect, perhaps I should not have committed the testcase in with this particular check in place (the test itself is a valid one regardless). There has been some questions regarding whether I should be using an observer or not. Knowing that, do I still need to do the following or can I check the change I attached in once I get final approval on the code and most importantly, the message to be issued?


When I compare gdb 6.2 with gdb HEAD, or with gdb 6.2.91 (when it
comes out), I use the same current test suite with both the old
and new gdb's.  I can't compare:

(gdb 6.2, suite 6.2)
(gdb 6.2.91, suite 6.2.91)
... because there are thousands of new tests and test name changes.
So I have to compare:


  (gdb 6.2, suite 6.2.91)
  (gdb 6.2.91, suite 6.2.91)

So it helps me if the test suite continues to match
the messages from the last released gdb.

If you're curious, you can see some of these comparison tables here:

http://www.shout.net/~mec/sunday/2004-08-18/Compare-by-gdb-branch-HEAD.html

===

You can do this either by fuzzing the pattern up with some wild cards,
or with the "(...|...)" construct, or by using a gdb_test_multiple
with one arm for the old output and one arm for the new.
Personally I would go for gdb_test_multiple:

  set name "continuing to end of program"
  gdb_test_multiple "continue" $name {
    -re "Continuing.*y is 7.*warning: ... disabling unloaded shared library breakpoints ....*$gdb_prompt $" {
      # old gdb 6.2
      pass $name
    }
    -re "Continuing.*y is 7.*warning: ... disabling breakpoints for.*unloadshr.sl.* ... $gdb_prompt $" {
      # new gdb HEAD 2004-08-23
      pass $name
    }
  }

Also, what system did you test on?

===

2004-08-23 Jeff Johnston <jjohnstn@redhat.com>

	* gdb.base/unload.exp: Fix expected warning message to match
	latest format.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]