Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Michael Chastain <mec.gnu@mindspring.com>
To: manjo@austin.ibm.com
Cc: gdb@sources.redhat.com
Subject: Re: [RFC] GDB testsuite patch.
Date: Wed, 25 Aug 2004 13:44:00 -0000	[thread overview]
Message-ID: <412C97B4.nailUU1X1SDW@mindspring.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0408242319060.7065@lazy>

Good morning Manoj,

This design is okay but the implementation needs some more work.
Here's a whole bunch of comments.  Please re-work your patch and
re-submit it.

Don't let the length of this email intimidate you.  This is mostly
procedural stuff that everybody runs into when they start working on FSF
projects.

Michael

-- Anchor the tail of the pattern.

   Your pattern says:

      -re "Reading symbols from.*no debugging symbols found.* $"

   This works as long as gdb output arrives in one big packet.
   However, sometimes the gdb output gets broken up and arrives
   in several packets.  When that happens, the ".* $" at the end
   of your pattern will succeed prematurely before all of the
   packets arrive, leaving some unmatched characters in the stream.

   So you have to write:

      -re "Reading symbols from.*no debugging symbols found.*$gdb_prompt $"

   That forces the pattern to keep scanning gdb output until it
   gets to the final "(gdb) ".

-- ChangeLog entry.  When you submit a patch, please submit a ChangeLog
   entry to go with it.  In general, the right ChangeLog file is the
   ChangeLog file nearest to the file that you are patching.  In this
   case, it's gdb/testsuite/ChangeLog.

   And you format the ChangeLog paragraph as a little block of
   text in front of the "diff", rather than including
   "diff ChangeLog" with the diff.  That's the Gnu style;
   it makes it easier to merge patches.
   
   See the gdb-patches mailing list archive for examples.

-- Test with current gdb.  I noticed your test was with gdb 6.1.
   You should at least be testing with gdb 6.2; preferably with
   the CVS version of gdb.

-- Run the whole test suite.

   A change in lib/gdb.exp affects the execution of every test script.
   It's great to show that gdb.gdb/complaints.exp improved.  But you
   also have to check that other tests didn't get broken.

   The procedure is:
   
      check out the CVS version of gdb
      run the whole test suite
      save the gdb.sum and gdb.log files
      apply your patch
      run the whole test suite again
      diff the first gdb.sum against the new gdb.sum
      if there are differences, check out what changed in gdb.log

   Unfortunately, there are about six test scripts that are unstable
   and give different results from run to run.  So you have to use
   your judgement with these, which generally means "ignore them":

      gdb.cp/annota2.exp
      gdb.cp/annota3.exp
      gdb.threads/manythreads.exp
      gdb.threads/print-threads.exp
      gdb.threads/schedlock.exp
      gdb.threads/watchthreads.exp

   If you're not sure whether a change in gdb.sum results came
   from your patch or from run-to-run instability, you can
   check the gdb-testers@ archive and see if I've mentioned that
   particular test in my results.  Or you can ask me or ask one
   of the lists.  Or you can submit the patch anyways and say
   "I saw a regression in gdb.foo/bar.exp but I'm not sure if
   my patch caused it or not".

   Getting back to the "whole test suite" ... there is at least
   one test script, gdb.base/nodebug.exp, which explicitly tests
   how gdb works when the target program has no debugging symbols.
   Your patch might interfere with that.  So you have to run the
   whole test suite before-and-after, to find any interference
   like that.

-- Last, patch submissions for gdb go to the gdb-patches@ mailing
   list, not the gdb@ mailing list.


      parent reply	other threads:[~2004-08-25 13:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-19 18:10 gdb.gdb/ testcase issues Manoj Iyer
2004-08-19 21:23 ` Michael Chastain
2004-08-19 22:16   ` Manoj Iyer
2004-08-20  8:51     ` Michael Chastain
2004-08-25  5:03       ` [RFC] GDB testsuite patch Manoj Iyer
2004-08-25 12:49         ` Daniel Jacobowitz
2004-08-25 13:48           ` Michael Chastain
2004-08-25 13:44         ` Michael Chastain [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=412C97B4.nailUU1X1SDW@mindspring.com \
    --to=mec.gnu@mindspring.com \
    --cc=gdb@sources.redhat.com \
    --cc=manjo@austin.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