From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14927 invoked by alias); 7 Aug 2012 11:39:57 -0000 Received: (qmail 14916 invoked by uid 22791); 7 Aug 2012 11:39:56 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,TW_VG,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 07 Aug 2012 11:39:38 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q77Bdb2C026427 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 7 Aug 2012 07:39:37 -0400 Received: from host2.jankratochvil.net (ovpn-116-27.ams2.redhat.com [10.36.116.27]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q77BdXZb002720 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 7 Aug 2012 07:39:36 -0400 Date: Tue, 07 Aug 2012 11:39:00 -0000 From: Jan Kratochvil To: Doug Evans Cc: gdb-patches@sourceware.org Subject: [patchv2] gdb.base/valgrind-infcall.exp compat. with Ubuntu 10.04.4 Message-ID: <20120807113932.GA14482@host2.jankratochvil.net> References: <20120807064303.GA4739@host2.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120807064303.GA4739@host2.jankratochvil.net> User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2012-08/txt/msg00223.txt.bz2 Hi Doug, added there also some unrealted new protection against infinite loop which I got in today's nightly run, to make it a single commit to the same code. BTW I do not see how it could happen (it is not reproducible for me): (gdb) target remote | /usr/lib/valgrind/../../bin/vgdb --pid=20165 Remote debugging using | /usr/lib/valgrind/../../bin/vgdb --pid=20165 relaying data between gdb and process 20165 Unknown remote qXfer reply: PacketSize=3fff;QStartNoAckMode+;QPassSignals+;qXfer:auxv:read+;qXfer:features:read+ (gdb) FAIL: gdb.base/valgrind-infcall.exp: target remote for vgdb Jan On Tue, 07 Aug 2012 08:43:03 +0200, Jan Kratochvil wrote: Hi Doug, according to freenode #gdb (2012-08-07 00:02:56 GMT) xdje: jankratochvil: I'm seeing valgrind-infcall.exp failing. While the docs for gdb_test_multiple claim the action is performed in the caller's context, that doesn't appear to be the case ... (2012-08-07 00:03:29 GMT) xdje: ... and the "break" for finding "Invalid free" is a nop, and we take the "Remote connection closed" exit. It works on Fedora systems and also on Ubuntu 12.04. On reported Ubuntu 10.04.4 the testcase quits early as UNSUPPORTED because valgrind is too old there. So I do not see how to test it, except for building custom valgrind there. Does it work for you this way? Thanks, Jan gdb/testsuite/ 2012-08-07 Jan Kratochvil * gdb.base/valgrind-infcall.exp (continue #$continue_count): Use global variable loop, not a 'break'. Add loop count limit to 100. Add new fail case for terminated vgdb. diff --git a/gdb/testsuite/gdb.base/valgrind-infcall.exp b/gdb/testsuite/gdb.base/valgrind-infcall.exp index 3224e9c..84d6819 100644 --- a/gdb/testsuite/gdb.base/valgrind-infcall.exp +++ b/gdb/testsuite/gdb.base/valgrind-infcall.exp @@ -90,17 +90,23 @@ gdb_test "$vgdbcmd" " in \\.?_start .*" "target remote for vgdb" gdb_test "monitor v.set gdb_output" "valgrind output will go to gdb.*" set continue_count 1 -while 1 { +set loop 1 +while {$loop && $continue_count < 100} { set test "continue #$continue_count" gdb_test_multiple "continue" "" { -re "Invalid free\\(\\).*: main .*\r\n$gdb_prompt $" { pass $test - break + # In Ubuntu 10.04.4 environments 'break' does not work here. + set loop 0 } -re "Remote connection closed.*\r\n$gdb_prompt $" { fail "$test (remote connection closed)" return -1 } + -re "The program is not being run\\.\r\n$gdb_prompt $" { + fail "$test (valgrind vgdb has terminated)" + return -1 + } -re "\r\n$gdb_prompt $" { pass "$test (false warning)" }