Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew STUBBS <andrew.stubbs@st.com>
To: Mark Kettenis <mark.kettenis@xs4all.nl>, gdb@sourceware.org
Subject: Re: Flipping ifelse.exp test
Date: Tue, 18 Jul 2006 15:24:00 -0000	[thread overview]
Message-ID: <44BCAA7C.6030503@st.com> (raw)
In-Reply-To: <20060717234035.GA29855@nevyn.them.org>

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


  reply	other threads:[~2006-07-18  9:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-17 23:32 Mark Kettenis
2006-07-18  7:24 ` Daniel Jacobowitz
2006-07-18 15:24   ` Andrew STUBBS [this message]
2006-07-18 17:59     ` Mark Kettenis
2006-07-18 18:35       ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44BCAA7C.6030503@st.com \
    --to=andrew.stubbs@st.com \
    --cc=gdb@sourceware.org \
    --cc=mark.kettenis@xs4all.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox