From: Yao Qi <yao@codesourcery.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: New gdb.mi/mi-breakpoint-changed.exp racy results [Re: [PATCH] Test case on breakpoint-related notifications]
Date: Sun, 07 Oct 2012 12:16:00 -0000 [thread overview]
Message-ID: <50717295.20802@codesourcery.com> (raw)
In-Reply-To: <20120930090736.GA25208@host2.jankratochvil.net>
On 09/30/2012 05:07 PM, Jan Kratochvil wrote:
> I do not have it reproducible, even PR 12649 'read1' does not work for it.
> It looks like:
>
> =library-loaded,id="/lib/libc.so.6",target-name="/lib/libc.so.6",host-name="/lib/libc.so.6",symbols-loaded="0",thread-group="i1"^M
> -=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0xf7fd8502",func="pendfunc1",file="gdb/testsuite/gdb.mi/pendshr1.c",fullname="/unsafegdb/testsuite/gdb.mi/pendshr1.c",line="21",times="0",original-location="pendfunc1"}PASS: gdb.mi/mi-breakpoint-changed.exp: pending resolved: breakpoint on pendfunc1 resolved
> -^M
> +=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0xf7fd8502",func="pendfunc1",file="gdb/testsuite/gdb.mi/pendshr1.c",fullname="/unsafegdb/testsuite/gdb.mi/pendshr1.c",line="21",times="0",original-location="pendfunc1"}^M
> =breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0xf7fd8502",func="pendfunc1",file="gdb/testsuite/gdb.mi/pendshr1.c",fullname="/unsafegdb/testsuite/gdb.mi/pendshr1.c",line="21",times="1",original-location="pendfunc1"}^M
I can't reproduce it either on my system. However, it looks like fail
is caused by some trail ".*" in patterns, because trail ".*" is
ambiguous on how many characters will be matched. The patch below
should fix the fail.
--
Yao
gdb/testsuite:
2012-10-07 Yao Qi <yao@codesourcery.com>
* gdb.mi/mi-breakpoint-changed.exp (test_pending_resolved): Remove
trail '.*' on matching patterns.
---
gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp b/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp
index c3abd74..773f588 100644
--- a/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp
+++ b/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp
@@ -163,11 +163,11 @@ proc test_pending_resolved { } { with_test_prefix "pending resolved" {
set test "breakpoint on pendfunc1 resolved"
gdb_expect {
- -re ".*=breakpoint-modified,bkpt=\{number=\"1\".*addr=\"${hex}\".*,times=\"0\".*" {
+ -re ".*=breakpoint-modified,bkpt=\{number=\"1\".*addr=\"${hex}\".*,times=\"0\"" {
pass $test
exp_continue
}
- -re ".*=breakpoint-modified,bkpt=\{number=\"1\".*addr=\"${hex}\".*,times=\"1\".*" {
+ -re ".*=breakpoint-modified,bkpt=\{number=\"1\".*addr=\"${hex}\".*,times=\"1\"" {
pass "$test: hit_count is updated"
}
-re ".*${mi_gdb_prompt}$" {
@@ -219,7 +219,7 @@ proc test_pending_resolved { } { with_test_prefix "pending resolved" {
mi_send_resuming_command "exec-continue" "continuing to exit"
set test "breakpoint on pendfunc3 pending again"
gdb_expect {
- -re ".*=breakpoint-modified,bkpt=\{number=\"3\".*addr=\"<PENDING>\".*" {
+ -re ".*=breakpoint-modified,bkpt=\{number=\"3\".*addr=\"<PENDING>\"" {
pass $test
}
-re ".*${mi_gdb_prompt}$" {
--
1.7.7.6
next prev parent reply other threads:[~2012-10-07 12:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-25 6:02 [PATCH] Test case on breakpoint-related notifications Yao Qi
2012-09-28 21:28 ` Tom Tromey
2012-09-30 9:08 ` New gdb.mi/mi-breakpoint-changed.exp racy results [Re: [PATCH] Test case on breakpoint-related notifications] Jan Kratochvil
2012-09-30 9:25 ` Andreas Schwab
2012-10-07 12:16 ` Yao Qi [this message]
2012-10-11 7:21 ` Jan Kratochvil
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=50717295.20802@codesourcery.com \
--to=yao@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
/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