Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* why do we set prms_id/bug_id in GDB testcases?
@ 2010-04-26 17:01 Joel Brobecker
  2010-04-26 19:00 ` Tom Tromey
  2010-04-26 19:09 ` Stan Shebs
  0 siblings, 2 replies; 5+ messages in thread
From: Joel Brobecker @ 2010-04-26 17:01 UTC (permalink / raw)
  To: gdb-patches

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-05-05 18:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-26 17:01 why do we set prms_id/bug_id in GDB testcases? Joel Brobecker
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox