From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13086 invoked by alias); 18 Jul 2006 09:48:47 -0000 Received: (qmail 13078 invoked by uid 22791); 18 Jul 2006 09:48:46 -0000 X-Spam-Check-By: sourceware.org Received: from lon-del-03.spheriq.net (HELO lon-del-03.spheriq.net) (195.46.50.99) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 18 Jul 2006 09:48:44 +0000 Received: from lon-out-03.spheriq.net ([195.46.50.131]) by lon-del-03.spheriq.net with ESMTP id k6I9mfSD028498 for ; Tue, 18 Jul 2006 09:48:41 GMT Received: from lon-cus-01.spheriq.net (lon-cus-01.spheriq.net [195.46.50.37]) by lon-out-03.spheriq.net with ESMTP id k6I9lsS7021929 for ; Tue, 18 Jul 2006 09:48:21 GMT Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by lon-cus-01.spheriq.net with ESMTP id k6I9lRvX029490 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Tue, 18 Jul 2006 09:47:32 GMT Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 9715CDAB0; Tue, 18 Jul 2006 09:31:43 +0000 (GMT) Received: from mail1.bri.st.com (mail1.bri.st.com [164.129.8.218]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 8F218473DF; Tue, 18 Jul 2006 09:31:42 +0000 (GMT) Received: from [164.129.15.13] (bri1043.bri.st.com [164.129.15.13]) by mail1.bri.st.com (MOS 3.5.8-GR) with ESMTP id CHV28244 (AUTH stubbsa); Tue, 18 Jul 2006 10:31:40 +0100 (BST) Message-ID: <44BCAA7C.6030503@st.com> Date: Tue, 18 Jul 2006 15:24:00 -0000 From: Andrew STUBBS User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: Mark Kettenis , gdb@sourceware.org Subject: Re: Flipping ifelse.exp test References: <200607172302.k6HN2mlx002514@elgar.sibelius.xs4all.nl> <20060717234035.GA29855@nevyn.them.org> In-Reply-To: <20060717234035.GA29855@nevyn.them.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00126.txt.bz2 Daniel Jacobowitz wrote: > 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.. > Hmmm, the point of the 'got here' was to ensure that GDB hadn't died horribly, and that it was still capable of running commands. I think the problem was that there is no output from the actual statement being tested. That was with the original script I had. Perhaps now it is implemented with gdb_test_multiple the prompt is enough. A slightly wackier alternative might be to change the GDB prompt for this test. Andrew