From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21308 invoked by alias); 23 Jun 2003 03:52:41 -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 3485 invoked from network); 23 Jun 2003 03:44:16 -0000 Received: from unknown (HELO crack.them.org) (146.82.138.56) by sources.redhat.com with SMTP; 23 Jun 2003 03:44:16 -0000 Received: from dsl093-172-017.pit1.dsl.speakeasy.net ([66.93.172.17] helo=nevyn.them.org ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 19UIGP-0003SK-00; Sun, 22 Jun 2003 22:45:05 -0500 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 19UIFV-0004wR-00; Sun, 22 Jun 2003 23:44:09 -0400 Date: Mon, 23 Jun 2003 03:52:00 -0000 From: Daniel Jacobowitz To: Michael Elizabeth Chastain Cc: gdb-patches@sources.redhat.com Subject: Re: [rfa/testsuite] selftest.exp: bump up initial line count Message-ID: <20030623034409.GA18557@nevyn.them.org> Mail-Followup-To: Michael Elizabeth Chastain , gdb-patches@sources.redhat.com References: <200306230301.h5N31cv0012495@duracef.shout.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200306230301.h5N31cv0012495@duracef.shout.net> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-06/txt/msg00722.txt.bz2 On Sun, Jun 22, 2003 at 11:01:38PM -0400, Michael Elizabeth Chastain wrote: > This patch fixes one FAIL in gdb.base/selftest.exp. > > The procedure 'do_steps_and_nexts' walks through the first few lines of > 'captured_main' until it reaches the initialization of 'dirarg', or > walks through 26 lines, whichever comes first. Unfortunately 26 lines > is no longer enough! This patch simply bumps the limit up to 32. > > I tested this on native i686-pc-linux-gnu, red-hat-8.0, > with gcc v2 and v3, -gdwarf-2 and -gstabs+. > > Okay to apply? Hmm, I am not sure - that doesn't fix the failure here :( Because the beginning of the xmalloc call (pushing 4 onto the stack) gets scheduled earlier than the preceding two lines. So the test fails anyway. Could you try this more comprehensive patch? -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer 2003-06-22 Michael Chastain Daniel Jacobowitz * gdb.base/selftest.exp (do_steps_and_nexts): Increase maximum initial line count of 'captured_main' from 26 to 32. (test_with_self): Allow xmalloc call to be interleaved with the preceding two lines. Index: gdb.base/selftest.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/selftest.exp,v retrieving revision 1.8 diff -u -p -r1.8 selftest.exp --- gdb.base/selftest.exp 2 Jun 2003 16:02:59 -0000 1.8 +++ gdb.base/selftest.exp 23 Jun 2003 03:42:03 -0000 @@ -1,4 +1,4 @@ -# Copyright 1988, 1990, 1991, 1992, 1994, 1997, 1999, 2000, 2002 +# Copyright 1988, 1990, 1991, 1992, 1994, 1997, 1999, 2000, 2002, 2003 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify @@ -52,7 +52,7 @@ proc do_steps_and_nexts {} { gdb_reinitialize_dir $srcdir/.. - for {set count 0} {$count < 26} {incr count} { + for {set count 0} {$count < 32} {incr count} { send_gdb "list\n" # NOTE: carlton/2002-12-11: The "initial brace" and # "current_directory initialization" possibilities happen to @@ -327,10 +327,31 @@ proc test_with_self { executable } { # If we don't actually enter the xmalloc call when we give a # step command that seems like a genuine bug. It seems to happen # on most RISC processors. + # NOTE drow/2003-06-22: However, if we step back to the preceding two + # lines, just keep stepping until we enter. + set stepped_back 0 setup_xfail "alpha-*-*" "mips-*-*" set description "step into xmalloc call" send_gdb "step\n" gdb_expect { + -re "ncmd = 0;.*$gdb_prompt $" { + set stepped_back 1 + send_gdb "step\n" + exp_continue + } + -re "dirsize = 1;.*$gdb_prompt $" { + set stepped_back 1 + send_gdb "step\n" + exp_continue + } + -re ".*dirarg = .* xmalloc.*$gdb_prompt $" { + if { $stepped_back == 1 } { + send_gdb "step\n" + exp_continue + } else { + fail "$description" + } + } -re "xmalloc.*size=.*at.*utils.c.*$gdb_prompt $" { pass "$description" }