From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4435 invoked by alias); 5 May 2005 16:23:26 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 3750 invoked from network); 5 May 2005 16:22:44 -0000 Received: from unknown (HELO e35.co.us.ibm.com) (32.97.110.133) by sourceware.org with SMTP; 5 May 2005 16:22:44 -0000 Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.17.195.11]) by e35.co.us.ibm.com (8.12.10/8.12.9) with ESMTP id j45GLkT9006858 for ; Thu, 5 May 2005 12:21:46 -0400 Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j45GLjUA361388 for ; Thu, 5 May 2005 10:21:45 -0600 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.12.11/8.13.3) with ESMTP id j45GLW27010400 for ; Thu, 5 May 2005 10:21:32 -0600 Received: from austin.ibm.com (netmail2.austin.ibm.com [9.41.248.176]) by d03av03.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id j45GLWvQ010379 for ; Thu, 5 May 2005 10:21:32 -0600 Received: from lazy.austin.ibm.com (lazy.austin.ibm.com [9.53.94.97]) by austin.ibm.com (8.12.10/8.12.10) with ESMTP id j45GLVVi047660 for ; Thu, 5 May 2005 11:21:31 -0500 Date: Thu, 05 May 2005 16:23:00 -0000 From: Manoj Iyer X-X-Sender: manjo@lazy To: gdb-patches@sources.redhat.com Subject: Re: [RFC] new GDB server testcase In-Reply-To: <20050504220703.GB4822@nevyn.them.org> Message-ID: References: <20050504144044.GA14120@nevyn.them.org> <20050504184620.GA19639@nevyn.them.org> <20050504220703.GB4822@nevyn.them.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2005-05/txt/msg00165.txt.bz2 When I have an output in a test as this: (gdb) step function4 () at gdb.server/server.c:24 24 int x = 1; (gdb) What should I test for in the gdb_test command? gdb_test "step" "function4 \(\) at .*$srcfile:\[0-9\]+." or gdb_test "step" ".*.\[0-9\].*int x \= 1\; Its not working for me in either case currently, unless I use a ".*" at the end, which I am trying to avoid (as per daniel's suggestion). ----- manjo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Cogito ergo sum + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ On Wed, 4 May 2005, Daniel Jacobowitz wrote: > On Wed, May 04, 2005 at 04:57:02PM -0500, Manoj Iyer wrote: > > Daniel, > > > > > > > > +gdb_test "step" "function4.*at .*$srcfile:\[0-9\]+.*" > > > > + > > > > +gdb_test "step 3" ".*${decimal}.*y = x.* y;.*" > > > > > > That's a lot of wildcards. Can't you put a marker comment on the lines > > > you want to reach? > > > > > > > I want to test vanilla step and step with value separately, this is why I > > did what I did. Also, I referred some of the existing testcases and > > followed the style of doing things there. Anyways here is the patch with > > most of the mods. > > ".*${decimal}.*y = x.* y;.*" is line noise. I would prefer something like: > > gdb_test "step 3" "/\* marker for second step \*/\[\r\n\]+" > > A trailing .* is to be avoided when possible; it means that warnings or > error messages could appear after the step and still pass. They can > already appear before the step, which is an unfortunate problem with > the way GDB's tests are written. > > > > > 2005-05-05 Manoj Iyer > > > > * gdb.server/server-run.exp: Added new testcases > > * gdb.server/server.c: Added nested function call for backtrace > > testing. > > > > Common subdirectories: ./new/src/gdb/testsuite/gdb.server/CVS and ./old/src/gdb/testsuite/gdb.server/CVS > > diff ./new/src/gdb/testsuite/gdb.server/server-run.exp ./old/src/gdb/testsuite/gdb.server/server-run.exp > > 41d40 > > < # test setting a breakpoint > > 43,65c42 > > < > > Bad diff, please do read diffs before you mail them. > > > -- > Daniel Jacobowitz > CodeSourcery, LLC >