From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22267 invoked by alias); 20 Mar 2009 18:39:40 -0000 Received: (qmail 22258 invoked by uid 22791); 20 Mar 2009 18:39:38 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 20 Mar 2009 18:39:26 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n2KIchIm012973; Fri, 20 Mar 2009 14:38:43 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n2KIcecE015082; Fri, 20 Mar 2009 14:38:40 -0400 Received: from host0.dyn.jankratochvil.net (sebastian-int.corp.redhat.com [172.16.52.221]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n2KIcfW1011720; Fri, 20 Mar 2009 14:38:42 -0400 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.3/8.14.3) with ESMTP id n2KIcdhh009976; Fri, 20 Mar 2009 19:38:40 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.3/8.14.2/Submit) id n2KIccuw009967; Fri, 20 Mar 2009 19:38:38 +0100 Date: Fri, 20 Mar 2009 18:51:00 -0000 From: Jan Kratochvil To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: [patch] Racy FAIL: gdb.base/auxv.exp + gdb.base/callfuncs.exp [Re: [patch/rfc] Recognize non-DW_AT_location symbols] Message-ID: <20090320183838.GA8318@host0.dyn.jankratochvil.net> References: <20090316202040.GA27070@host0.dyn.jankratochvil.net> <20090320150248.GA12530@adacore.com> <20090320182215.GC12530@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090320182215.GC12530@adacore.com> User-Agent: Mutt/1.5.18 (2008-05-17) 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-03/txt/msg00412.txt.bz2 On Fri, 20 Mar 2009 19:22:15 +0100, Joel Brobecker wrote: > That fixes the C++ problem, and I was fairly confident about it Thanks for the analysis, going to check more the pros/cons of your patch. > but a testcase run seems to indicate the following regressions: > > +------------+------------+----------------------------------------------------+ > | PASS | FAIL | callfuncs.exp: gdb function calls preserve reg ... | > | | | ... ister contents | > | PASS | FAIL | callfuncs.exp: continue after stop in call dum ... | > | | | ... my preserves register contents | > | PASS | FAIL | callfuncs.exp: finish after stop in call dummy ... | > | | | ... preserves register contents | > | PASS | FAIL | callfuncs.exp: return after stop in call dummy ... | > | | | ... preserves register contents | > | PASS | FAIL | callfuncs.exp: nested call dummies preserve re ... | > | | | ... gister contents | > +------------+------------+----------------------------------------------------+ Is the attached testsuite fix from http://cvs.fedora.redhat.com/viewvc/rpms/gdb/devel/gdb-6.7-testsuite-stable-results.patch?revision=1.6 OK to check-in? Thanks, Jan gdb/testsuite/ 2009-03-20 Jan Kratochvil Fix a racy FAIL. * gdb.base/auxv.exp (fetch_auxv): Fix trailing newlines consumption. * gdb.base/callfuncs.exp (fetch_all_registers): Likewise. --- ./gdb/testsuite/gdb.base/auxv.exp 2009-02-11 00:54:54.000000000 +0100 +++ ./gdb/testsuite/gdb.base/auxv.exp 2009-02-11 00:51:30.000000000 +0100 @@ -78,8 +78,10 @@ proc fetch_auxv {test} { set auxv_lines {} set bad -1 + # Former trailing `\[\r\n\]+' may eat just \r leaving \n in the buffer + # corrupting the next matches. if {[gdb_test_multiple "info auxv" $test { - -re "info auxv\[\r\n\]+" { + -re "info auxv\r\n" { exp_continue } -ex "The program has no auxiliary information now" { @@ -94,20 +96,20 @@ proc fetch_auxv {test} { set bad 1 exp_continue } - -re "^\[0-9\]+\[ \t\]+(AT_\[^ \t\]+)\[^\r\n\]+\[\r\n\]+" { + -re "^\[0-9\]+\[ \t\]+(AT_\[^ \t\]+)\[^\r\n\]+\r\n" { lappend auxv_lines $expect_out(0,string) exp_continue } - -re "^\[0-9\]+\[ \t\]+\\?\\?\\?\[^\r\n\]+\[\r\n\]+" { + -re "^\[0-9\]+\[ \t\]+\\?\\?\\?\[^\r\n\]+\r\n" { warning "Unrecognized tag value: $expect_out(0,string)" set bad 1 lappend auxv_lines $expect_out(0,string) exp_continue } - -re ".*$gdb_prompt $" { + -re "$gdb_prompt $" { incr bad } - -re "^\[^\r\n\]+\[\r\n\]+" { + -re "^\[^\r\n\]+\r\n" { if {!$bad} { warning "Unrecognized output: $expect_out(0,string)" set bad 1 --- ./gdb/testsuite/gdb.base/callfuncs.exp 2009-01-03 06:58:03.000000000 +0100 +++ ./gdb/testsuite/gdb.base/callfuncs.exp 2009-02-11 00:51:42.000000000 +0100 @@ -249,15 +249,17 @@ proc fetch_all_registers {test} { set all_registers_lines {} set bad -1 + # Former trailing `\[\r\n\]+' may eat just \r leaving \n in the buffer + # corrupting the next matches. if {[gdb_test_multiple "info all-registers" $test { - -re "info all-registers\[\r\n\]+" { + -re "info all-registers\r\n" { exp_continue } -ex "The program has no registers now" { set bad 1 exp_continue } - -re "^bspstore\[ \t\]+\[^\r\n\]+\[\r\n\]+" { + -re "^bspstore\[ \t\]+\[^\r\n\]+\r\n" { if [istarget "ia64-*-*"] { # Filter out bspstore which is specially tied to bsp, # giving spurious differences. @@ -266,14 +268,14 @@ proc fetch_all_registers {test} { } exp_continue } - -re "^\[^ \t\]+\[ \t\]+\[^\r\n\]+\[\r\n\]+" { + -re "^\[^ \t\]+\[ \t\]+\[^\r\n\]+\r\n" { lappend all_registers_lines $expect_out(0,string) exp_continue } - -re ".*$gdb_prompt $" { + -re "$gdb_prompt $" { incr bad } - -re "^\[^\r\n\]+\[\r\n\]+" { + -re "^\[^\r\n\]+\r\n" { if {!$bad} { warning "Unrecognized output: $expect_out(0,string)" set bad 1