From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12751 invoked by alias); 25 Oct 2013 12:36:22 -0000 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 Received: (qmail 12739 invoked by uid 89); 25 Oct 2013 12:36:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 25 Oct 2013 12:36:20 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r9PCaI1E027999 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 25 Oct 2013 08:36:18 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r9PCaGGG005687; Fri, 25 Oct 2013 08:36:17 -0400 Message-ID: <526A65C0.2050102@redhat.com> Date: Fri, 25 Oct 2013 12:36:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Anton Kolesov CC: "gdb-patches@sourceware.org" , "Jeremy.bennett@embecosm.com" Subject: Re: [PATCH] testsuite: Fix gdb.base/bang.exp for remote stubs without exit References: <1381309094-24410-1-git-send-email-Anton.Kolesov@synopsys.com> <52553DEE.5090009@redhat.com> <39A54937CC95F24AA2F794E2D2B66B1356BDC197@de02wembxa.internal.synopsys.com> <526A628A.7060805@redhat.com> In-Reply-To: <526A628A.7060805@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-10/txt/msg00796.txt.bz2 On 10/25/2013 01:22 PM, Pedro Alves wrote: > On 10/25/2013 11:04 AM, Anton Kolesov wrote: >>> -----Original Message----- >>> From: Pedro Alves [mailto:palves@redhat.com] >>> Sent: 09 October 2013 15:29 >>> To: Anton Kolesov >>> Cc: gdb-patches@sourceware.org; Jeremy.bennett@embecosm.com >>> Subject: Re: [PATCH] testsuite: Fix gdb.base/bang.exp for remote stubs >>> without exit >>> >>> On 10/09/2013 09:58 AM, Anton Kolesov wrote: >>> >>>> 2013-10-08 Anton Kolesov >>>> >>>> * gdb.base/bang.exp: Use gdb_continue_to_end to properly >>> support >>>> remote stubs where exit() behaviour is unreliable. >>> >>> OK, thanks. >> >> I don't have a write access to GDB repository. And I don't think I have a required approval. Can someone please submit this patch, since it has already been approved? > > I'm not sure I've asked this before (apologies if I have), > Do you know the status of your copyright assignment? > I notice now that unfortunately, Synopsys doesn't seem to have a > copyright assignment in place. I see there used to be one, but it > has expired already, and in any case it only assigned changes done > by someone else. > > I'll push this patch in, as it's small and trivial enough to > go in without assignment, but that's as far as we're allowed to go. > We'll need to sort out the copyright assignment to put in any > other patch from now on. Done, as below. Thanks for the patch. Note I fixed a spurious whitespace: $ git am /tmp/mbox Applying: testsuite: Fix gdb.base/bang.exp for remote stubs without exit /home/pedro/gdb/mygit/src/.git/rebase-apply/patch:23: trailing whitespace. gdb_continue_to_end "" continue 1 warning: 1 line adds whitespace errors. And also fixed ChangeLog entry formatting -- should be two spaces between name and email. ("tiny change" is just how we mark patches that don't add up to something legally significant.) ------- >From d4703eb2949c3296107cad41f925519730f16927 Mon Sep 17 00:00:00 2001 From: Anton Kolesov Date: Wed, 9 Oct 2013 12:58:14 +0400 Subject: [PATCH] testsuite: Fix gdb.base/bang.exp for remote stubs without exit Some remote stubs do not have a proper exit() function implementation. gdb.base/bang.exp was failing on those targets due to timeout. With this patch bang.exp uses already defined library procedures to handle this situation gracefully without breaking native targets. Tested with x86_64 (unix, native-gdbserver) and with arc-*-elf32. gdb/testsuite/ChangeLog: 2013-10-25 Anton Kolesov (tiny change) * gdb.base/bang.exp: Use gdb_continue_to_end to properly support remote stubs where exit() behaviour is unreliable. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.base/bang.exp | 11 ++--------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 0c1dbef..ca0c7af 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-10-25 Anton Kolesov (tiny change) + + * gdb.base/bang.exp: Use gdb_continue_to_end to properly support + remote stubs where exit() behaviour is unreliable. + 2013-10-25 Pedro Alves * gdb.cp/m-static.exp: Adjust expected output of printing a diff --git a/gdb/testsuite/gdb.base/bang.exp b/gdb/testsuite/gdb.base/bang.exp index 6fd3a59..e03c718 100644 --- a/gdb/testsuite/gdb.base/bang.exp +++ b/gdb/testsuite/gdb.base/bang.exp @@ -26,12 +26,5 @@ if {[prepare_for_testing $testfile.exp ${testfile}! $srcfile \ # Verify that we can run the program and that it terminates normally. -gdb_run_cmd -gdb_expect { - -re ".*$inferior_exited_re normally.*$gdb_prompt $" { - pass "run program" - } - timeout { - fail "run program (timeout)" - } -} +runto_main +gdb_continue_to_end "" continue 1 -- 1.7.11.7