This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] gdb.python/py-evthreads.exp: fix racy test (PR testsuite/12649)
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Marek Polacek <mpolacek at redhat dot com>
- Cc: Joel Brobecker <brobecker at adacore dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Wed, 6 Jul 2011 19:11:45 +0200
- Subject: Re: [PATCH] gdb.python/py-evthreads.exp: fix racy test (PR testsuite/12649)
- References: <4E09E2C1.2020909@redhat.com> <20110628155107.GL20676@adacore.com> <4E0C4F28.4000703@redhat.com>
On Thu, 30 Jun 2011 12:25:44 +0200, Marek Polacek wrote:
> On 06/28/2011 05:51 PM, Joel Brobecker wrote:
> > This is an area where I'm not entirely sure, but we usually use
> > `$gdb_prompt $' as the anchor.
>
> Actually, it doesn't matter. That `$' at the end marks end of the
> read buffer, not the end of line.
It is a difference as it requires the end of the read buffer that way.
If GDB outputs some
(gdb) unexpected_result
then (without any read1 hacks) -re "$gdb_prompt $" will FAIL/timeout as it
should while -re "$gdb_prompt " could give a false PASS.
(I do not think it requires a new commit, it is up to you.)
Thanks,
Jan