Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sourceware.org
Subject: why do we set prms_id/bug_id in GDB testcases?
Date: Mon, 26 Apr 2010 17:01:00 -0000	[thread overview]
Message-ID: <20100426170109.GE2732@adacore.com> (raw)

Hello,

It's a question that has been nagging at me problably since I decided
that I was going to understand how to write testing with only stuff
that is actually useful, and following the recommended style...

We often start testcases with the following statements:

    set prms_id 0
    set bug_id 0

On rare occcasions, we'll even set an actual PR number, which I assume
is the Mozilla PR number. Does this actually do anything?  The dejagnu
documentation only says that we can use these variables with
conventional meaning:

  prms_id is the PR number in the "official" tracking system;
  bug_id is a bug identification from another organization

If it is useful to set the prms_id (and bug_id), I think we can
automatically default them to 0/0 by doing it in gdb_init.  Since
this function is called at the start of every testcase.  Then a testcase
that wants to set it to something specific can override it.

But for now, I don't seem to be able to find them being used anywhere:

    % find . -type f -print | grep -v ChangeLog | xargs grep prms_id | grep -v 'set prms_id 0$'
    ./gdb.base/hashline3.exp:set prms_id 2360
    ./gdb.base/hashline1.exp:set prms_id 2360
    ./gdb.base/hashline2.exp:set prms_id 2360
    ./gdb.base/reread.exp:set prms_id 13484
    ./gdb.base/structs2.exp:set prms_id 13536
    ./gdb.base/echo.exp:#   ex: set prms_id 643
    ./gdb.cp/classes.exp:    global prms_id
    ./gdb.cp/inherit.exp:    global prms_id
    ./gdb.cp/demangle.exp:    global prms_id
    ./gdb.cp/virtfunc.exp:    global prms_id
    ./gdb.cp/misc.exp:    global prms_id
    ./gdb.cp/cplusfuncs.exp:    global prms_id
    ./gdb.cp/templates.exp:    global prms_id
    ./gdb.cp/gdb2384.exp:set prms_id 2384
    ./gdb.cp/gdb2495.exp:set prms_id 2495
    ./gdb.objc/nondebug.exp:    global prms_id
    ./gdb.objc/objcdecode.exp:    global prms_id
    ./gdb.objc/basicclass.exp:    global prms_id
    ./gdb.threads/step.exp:    global prms_id

Maybe it's used internally by dejagnu? (I couldn't find evidence of that
in the dejagnu manual)

Thoughts?

-- 
Joel


             reply	other threads:[~2010-04-26 17:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-26 17:01 Joel Brobecker [this message]
2010-04-26 19:00 ` Tom Tromey
2010-04-26 19:09 ` Stan Shebs
2010-04-26 22:11   ` Joel Brobecker
2010-05-05 18:14     ` Joel Brobecker

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=20100426170109.GE2732@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /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