From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12811 invoked by alias); 20 May 2010 16:42:05 -0000 Received: (qmail 12785 invoked by uid 22791); 20 May 2010 16:42:04 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 20 May 2010 16:41:56 +0000 Received: (qmail 31393 invoked from network); 20 May 2010 16:41:54 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 20 May 2010 16:41:54 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [RFA] (long) sepdebug.exp replace send_gdb with gdb_test Date: Thu, 20 May 2010 16:47:00 -0000 User-Agent: KMail/1.12.2 (Linux/2.6.31-21-generic; KDE/4.3.2; x86_64; ; ) Cc: Michael Snyder References: <4BF47D1D.2030005@vmware.com> In-Reply-To: <4BF47D1D.2030005@vmware.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201005201741.52364.pedro@codesourcery.com> 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: 2010-05/txt/msg00422.txt.bz2 I didn't to a thorough review, but I noticed a couple of issues. On Thursday 20 May 2010 01:06:53, Michael Snyder wrote: > > -# Test deleting all breakpoints when there are none installed, > -# GDB should not prompt for confirmation. > -# Note that gdb-init.exp provides a "delete_breakpoints" proc > -# for general use elsewhere. > - > -send_gdb "delete breakpoints\n" > -gdb_expect { > - -re "Delete all breakpoints.*$" { > - send_gdb "y\n" > - gdb_expect { > - -re "$gdb_prompt $" { > - fail "Delete all breakpoints when none (unexpected prompt)" > - } > - timeout { fail "Delete all breakpoints when none (timeout after unexpected prompt)" } > - } > - } > - -re ".*$gdb_prompt $" { pass "Delete all breakpoints when none" } > - timeout { fail "Delete all breakpoints when none (timeout)" } > -} > +delete_breakpoints delete_breakpoints doesn't do what the test was doing before. Notice the comment.. Whether what is being tested or not has any value in this case, is another question, but it seems to have been just blindly copied from break.exp. You could just delete it it seems. > - -re "Catchpoint \[0-9\]* .fork..*$gdb_prompt $" > - {pass $name} > - -re "Catch of fork not yet implemented.*$gdb_prompt $" > - {pass $name} > - -re "$gdb_prompt $" > - {fail $name} > - timeout {fail "(timeout) $name"} > +gdb_test_multiple "catch fork" $name { > + -re "Catchpoint \[0-9\]* .fork.*" { > + pass $name You should make sure to always consume the prompt with gdb_test_multiple, otherwise, it may be left in the input stream and confuse follow up tests. -- Pedro Alves