From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28648 invoked by alias); 17 Jul 2006 23:40:39 -0000 Received: (qmail 28639 invoked by uid 22791); 17 Jul 2006 23:40:39 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Mon, 17 Jul 2006 23:40:37 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1G2chX-0007p8-Fj; Mon, 17 Jul 2006 19:40:35 -0400 Date: Tue, 18 Jul 2006 07:24:00 -0000 From: Daniel Jacobowitz To: Mark Kettenis Cc: gdb@sourceware.org Subject: Re: Flipping ifelse.exp test Message-ID: <20060717234035.GA29855@nevyn.them.org> Mail-Followup-To: Mark Kettenis , gdb@sourceware.org References: <200607172302.k6HN2mlx002514@elgar.sibelius.xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200607172302.k6HN2mlx002514@elgar.sibelius.xs4all.nl> User-Agent: Mutt/1.5.11+cvs20060403 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-07/txt/msg00124.txt.bz2 On Tue, Jul 18, 2006 at 01:02:48AM +0200, Mark Kettenis wrote: > > (gdb) if 1 > >end > (gdb) FAIL: gdb.base/ifelse.exp: if 1 with empty body > echo got here\n > got here > (gdb) PASS: gdb.base/ifelse.exp: if 0 with empty body > > I fail to see what's wrong with the test though. The regular > expressions seem to be properly anchored. > > Can anyone spot the problem? Yes. The default pattern in gdb_test_multiple is anchored by "$gdb_prompt $", which occurs (if you're unlucky with buffering) right in the middle of this test. Basically you can't do a test that requires two gdb prompts. I'd recommend removing the "echo got_here" from that test and the other similar ones. Another thing that might work would be an explicit anchored pattern to catch the first gdb prompt and continue, below the pass pattern, but that's prone to timeouts if something goes wrong.. -- Daniel Jacobowitz CodeSourcery