From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17816 invoked by alias); 9 Oct 2013 08:58:21 -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 17803 invoked by uid 89); 9 Oct 2013 08:58:21 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.9 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: hermes.synopsys.com Received: from us01smtp3.synopsys.com (HELO hermes.synopsys.com) (198.182.44.81) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 09 Oct 2013 08:58:20 +0000 Received: from WBSNus02mta2 (us02secmta2.synopsys.com [10.12.235.98]) by hermes.synopsys.com (Postfix) with ESMTP id AEC9416C20C; Wed, 9 Oct 2013 01:58:18 -0700 (PDT) Received: from us02secmta2.internal.synopsys.com (us02secmta2.internal.synopsys.com [127.0.0.1]) by us02secmta2.internal.synopsys.com (Service) with ESMTP id A341255F13; Wed, 9 Oct 2013 01:58:18 -0700 (PDT) Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by us02secmta2.internal.synopsys.com (Service) with ESMTP id 874FC55F02; Wed, 9 Oct 2013 01:58:18 -0700 (PDT) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 7BAAB4A2; Wed, 9 Oct 2013 01:58:18 -0700 (PDT) Received: from ru20-arctools.internal.synopsys.com (ru20-arctools.internal.synopsys.com [10.121.9.107]) by mailhost.synopsys.com (Postfix) with ESMTP id 93F0849E; Wed, 9 Oct 2013 01:58:17 -0700 (PDT) From: Anton Kolesov To: gdb-patches@sourceware.org Cc: Jeremy.bennett@embecosm.com Subject: [PATCH] testsuite: Fix gdb.base/bang.exp for remote stubs without exit Date: Wed, 09 Oct 2013 08:58:00 -0000 Message-Id: <1381309094-24410-1-git-send-email-Anton.Kolesov@synopsys.com> X-SW-Source: 2013-10/txt/msg00253.txt.bz2 From: Anton Kolesov 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-08 Anton Kolesov * gdb.base/bang.exp: Use gdb_continue_to_end to properly support remote stubs where exit() behaviour is unreliable. --- gdb/testsuite/gdb.base/bang.exp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/gdb/testsuite/gdb.base/bang.exp b/gdb/testsuite/gdb.base/bang.exp index 6fd3a59..4c5c2e6 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.8.4.1