Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: gdb-patches@sourceware.org
Subject: [pushed 2/2] gdb.base/bp-permanent.exp: Tighten regex
Date: Thu, 05 Mar 2015 23:42:00 -0000	[thread overview]
Message-ID: <1425598969-7666-3-git-send-email-palves@redhat.com> (raw)
In-Reply-To: <1425598969-7666-1-git-send-email-palves@redhat.com>

Trying to fix a permanent breakpoints bug, I broke "next" over a
regular breakpoint.  "next" would immediately hit the breakpoint the
program was already stopped at.  But, the "next over setup" test
failed to notice this and still issued a pass.  That's because the
regex matches "testsuite" in:

  Breakpoint 2 at 0x400687: file src/gdb/testsuite/gdb.base/bp-permanent.c, line 46.

gdb/testsuite/ChangeLog:
2015-03-05  Pedro Alves  <palves@redhat.com>

	* gdb.base/bp-permanent.exp: Tighten "next over setup" regex.
---
 gdb/testsuite/ChangeLog                 | 4 ++++
 gdb/testsuite/gdb.base/bp-permanent.exp | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 1a76cc8..dd98483 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2015-03-05  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/bp-permanent.exp: Tighten "next over setup" regex.
+
 2015-03-04  Simon Marchi  <simon.marchi@ericsson.com>
 
 	* lib/mi-support.exp (mi_expect_interrupt): Accept
diff --git a/gdb/testsuite/gdb.base/bp-permanent.exp b/gdb/testsuite/gdb.base/bp-permanent.exp
index d0ed991..81a5293 100644
--- a/gdb/testsuite/gdb.base/bp-permanent.exp
+++ b/gdb/testsuite/gdb.base/bp-permanent.exp
@@ -96,7 +96,7 @@ proc test {always_inserted sw_watchpoint} {
 
 	# Run the "setup" function in the inferior.  This memcpy's the
 	# breakpoint instruction to a buffer in the inferior.
-	gdb_test "next" "test.*" "next over setup"
+	gdb_test "next" "test_basics \\(\\).*" "next over setup"
 
 	delete_breakpoints
 
-- 
1.9.3


  reply	other threads:[~2015-03-05 23:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-05 23:42 [pushed 0/2] PR gdb/18002: bp-permanent.exp failures Pedro Alves
2015-03-05 23:42 ` Pedro Alves [this message]
2015-03-05 23:42 ` [pushed 1/2] PR gdb/18002: Fix reinsert of a permanent breakpoints Pedro Alves
2015-03-06 14:31   ` Yao Qi
2015-03-06 16:43     ` Pedro Alves

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=1425598969-7666-3-git-send-email-palves@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /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