From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26179 invoked by alias); 26 Apr 2010 17:01:24 -0000 Received: (qmail 26051 invoked by uid 22791); 26 Apr 2010 17:01:18 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 26 Apr 2010 17:01:14 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id A8E5D2BAB01 for ; Mon, 26 Apr 2010 13:01:12 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id otwR1uCOOuYQ for ; Mon, 26 Apr 2010 13:01:12 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 688DC2BAAFE for ; Mon, 26 Apr 2010 13:01:11 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 62EADF5896; Mon, 26 Apr 2010 13:01:09 -0400 (EDT) Date: Mon, 26 Apr 2010 17:01:00 -0000 From: Joel Brobecker To: gdb-patches@sourceware.org Subject: why do we set prms_id/bug_id in GDB testcases? Message-ID: <20100426170109.GE2732@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-04/txt/msg00882.txt.bz2 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