From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24762 invoked by alias); 11 May 2006 11:08:36 -0000 Received: (qmail 24754 invoked by uid 22791); 11 May 2006 11:08:35 -0000 X-Spam-Check-By: sourceware.org Received: from w099.z064220152.sjc-ca.dsl.cnc.net (HELO duck.specifix.com) (64.220.152.99) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 11 May 2006 11:08:31 +0000 Received: from [::1] (duck.specifix.com [64.220.152.99]) by duck.specifix.com (Postfix) with ESMTP id 357E8FCAB; Thu, 11 May 2006 04:08:28 -0700 (PDT) From: Fred Fish Reply-To: fnf@specifix.com To: gdb-patches@sourceware.org Subject: [RFA] Handle output after 'Program exited normally' consistently Date: Thu, 11 May 2006 11:08:00 -0000 User-Agent: KMail/1.9.1 Cc: fnf@specifix.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605110709.11444.fnf@specifix.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00212.txt.bz2 There are 21 places in the current gdb testsuite where the testsuite checks for 'Program exited normally' followed by a gdb prompt. All of them, with the exception of a couple, use a test like: -re ".*Program exited normally.*$gdb_prompt $" { Note that this swallows and accepts anything between the exit message and the prompt. Current the bang.exp test is failing when run in the mips-elf simulator because of some output between the message and the prompt: Program exited normally. Current language: auto; currently asm (gdb) which doesn't match the pattern checked for in bang.exp: -re ".*Program exited normally\.\r\n$gdb_prompt $" { I believe that the bang.exp test should be changed to make it consistent with the other tests. If we care about testing for cruft between the exit message and the gdb prompt, to specifically catch that case, then I think that should have it's own dedicated testcase, which I'm happy to write and submit. -Fred 2006-05-11 Fred Fish * gdb.base/bang.exp: Ignore unexpected output between the "program exited normally" and the gdb prompt, as many other tests do. Index: gdb.base/bang.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/bang.exp,v retrieving revision 1.3 diff -u -p -r1.3 bang.exp --- gdb.base/bang.exp 7 Mar 2006 15:23:32 -0000 1.3 +++ gdb.base/bang.exp 11 May 2006 11:03:21 -0000 @@ -38,7 +38,7 @@ gdb_load ${binfile} gdb_run_cmd gdb_expect { - -re ".*Program exited normally\.\r\n$gdb_prompt $" { + -re ".*Program exited normally.*$gdb_prompt $" { pass "run program" } timeout {