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: Marek Polacek <mpolacek at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: Jan Kratochvil <jan dot kratochvil at redhat dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Wed, 06 Jul 2011 19:42:15 +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> <20110706171145.GB28535@host1.jankratochvil.net> <20110706172616.GE2407@adacore.com>
On 07/06/2011 07:26 PM, Joel Brobecker wrote:
>> 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.)
>
> Let's fix it. If anything, we should be consistent. I might have
> a minute later today, but I don't want to make the change without
> running the testcase... So, I won't mind if someone gets to it before
> I do.
>
Sure. Shall I commit the patch below?
2011-07-06 Marek Polacek <mpolacek@redhat.com>
* gdb.python/py-evthreads.exp: Add missing `$'.
--- gdb/gdb/testsuite/gdb.python/py-evthreads.exp.mp 2011-07-06 19:34:05.210582529 +0200
+++ gdb/gdb/testsuite/gdb.python/py-evthreads.exp 2011-07-06 19:34:14.660516229 +0200
@@ -86,7 +86,7 @@ gdb_expect {
send_gdb "continue&\n"
gdb_expect {
-re ".*event type: continue.*
-.*thread num: 1.*\r\n$gdb_prompt " {
+.*thread num: 1.*\r\n$gdb_prompt $" {
pass "continue thread 1"
}
timeout {