This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
why do we set prms_id/bug_id in GDB testcases?
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 26 Apr 2010 13:01:09 -0400
- Subject: why do we set prms_id/bug_id in GDB testcases?
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