From: Daniel Jacobowitz <drow@false.org>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: gdb@sourceware.org
Subject: Re: Flipping ifelse.exp test
Date: Tue, 18 Jul 2006 07:24:00 -0000 [thread overview]
Message-ID: <20060717234035.GA29855@nevyn.them.org> (raw)
In-Reply-To: <200607172302.k6HN2mlx002514@elgar.sibelius.xs4all.nl>
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
next prev parent reply other threads:[~2006-07-17 23:40 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 [this message]
2006-07-18 15:24 ` Andrew STUBBS
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=20060717234035.GA29855@nevyn.them.org \
--to=drow@false.org \
--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