From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 996 invoked by alias); 11 Jul 2009 23:29:32 -0000 Received: (qmail 985 invoked by uid 22791); 11 Jul 2009 23:29:31 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 11 Jul 2009 23:29:24 +0000 Received: from mailhost3.vmware.com (mailhost3.vmware.com [10.16.27.45]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id B011A5200A; Sat, 11 Jul 2009 16:29:22 -0700 (PDT) Received: from [10.20.94.141] (msnyder-server.eng.vmware.com [10.20.94.141]) by mailhost3.vmware.com (Postfix) with ESMTP id A53F4CD91D; Sat, 11 Jul 2009 16:29:22 -0700 (PDT) Message-ID: <4A591F54.3030207@vmware.com> Date: Sun, 12 Jul 2009 11:12:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20080411) MIME-Version: 1.0 To: paawan oza CC: "gdb-patches@sourceware.org" , Pedro Alves , "teawater@gmail.com" Subject: Re: i386.record.floating.point.patch : with more testing and assurity References: <736794.15455.qm@web112516.mail.gq1.yahoo.com> In-Reply-To: <736794.15455.qm@web112516.mail.gq1.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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: 2009-07/txt/msg00341.txt.bz2 paawan oza wrote: > Hi, > As I am submitting the patch for the first time, I am not much aware of gdb test suite. > would you please guide me about how I can put the things in the testsuite ? > is it the testsuite which comes along with the gdb source ? > gdb\testsuite\gdb.base ?? > Regards, > Oza. Hi Oza, Yes, we are talking about the automated regression testsuite that comes with the gdb source tree, at src/gdb/testsuite. You'll need to be familiar with it, both to use it and to write tests. All tests for the GNU tools are written in (are you ready for this) * dejagnu, which is a layer written on top of * expect, which is a language written on top of * tcl. There are many many tests already in the testsuite. Each consists of 1) one 'expect' script, such as src/gdb/testsuite/gdb.base/break-always.exp 2) one or more source files, such as src/gdb/testsuite/gdb.base/break-always.c I chose that one as a relatively simple example for you to look at. Each script * compiles the corresponding source file, * starts gdb, and * runs a set of gdb commands. The output of the commands is automatically compared to a set of expected outputs (hence the name 'expect'), and if the output matches the expected output the script will output "PASS". Otherwise it will output "FAIL". We use these test scripts regularly, both to validate new patches, and to make sure that new changes haven't broken any old changes. To run the gdb tests, you need to have installed * dejagnu version 1.4.4 * expect version 5.42.1 * tcl at least version 8.4 With those installed, you should be able to do the following in your build tree, with these results: then we'll talk about writing tests. ;-) bash-3.00$ cd gdb/testsuite bash-3.00$ make check RUNTESTFLAGS=break-always.exp [some noise] === gdb tests === Schedule of variations: unix Running target unix Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. Using /usr/share/dejagnu/config/unix.exp as generic interface file for target. Using /data/home/msnyder/cvs/localhost/oza/gdb/testsuite/config/unix.exp as tool-and-target-specific interface file. Running /data/home/msnyder/cvs/localhost/oza/gdb/testsuite/gdb.base/break-always.exp ... === gdb Summary === # of expected passes 4 /data/home/msnyder/builds/native/oza/gdb/testsuite/../../gdb/gdb version 6.8.50.20090711-cvs -nw -nx