public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Subject: [PATCH v2 3/5] kfail a FinishBreakpoint test
Date: Tue, 20 Feb 2024 08:21:26 -0700	[thread overview]
Message-ID: <20240220-py-simple-exc-v2-3-c672f1984b4d@adacore.com> (raw)
In-Reply-To: <20240220-py-simple-exc-v2-0-c672f1984b4d@adacore.com>

I noticed that one particular FinishBreakpoint test is only passing by
accident -- the regexp is too broad and matches an error message.

This patch changes the test to actually check what it claims to check;
and then kfails the test because it doesn't work.  I've taken this
approach because this failure is only incidental to this series.
Meanwhile I've filed a bug that I will leave open after this lands.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31391
---
 gdb/testsuite/gdb.python/py-finish-breakpoint.exp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.python/py-finish-breakpoint.exp b/gdb/testsuite/gdb.python/py-finish-breakpoint.exp
index 45e2630337f..6b72ddb2186 100644
--- a/gdb/testsuite/gdb.python/py-finish-breakpoint.exp
+++ b/gdb/testsuite/gdb.python/py-finish-breakpoint.exp
@@ -73,7 +73,11 @@ with_test_prefix "normal conditions" {
 	"check MyFinishBreakpoint hit"
     gdb_test "python print (finishbp.return_value)" "-5.*" "check return_value"
 
-    gdb_test "python print (finishbp_default.hit_count)" "1.*" "check finishBP on default frame has been hit"
+    # This test does not work and the result being checked for here
+    # used to match by accident.  See PR python/31391.
+    setup_kfail "python/31391" *-*-*
+    gdb_test "python print ('HC=' + str(finishbp_default.hit_count))" "HC=1" \
+	"check finishBP on default frame has been hit"
     gdb_test "python print (finishbp.is_valid())" "False.*"\
 	"ensure that finish bp is invalid afer normal hit"
 

-- 
2.43.0


  parent reply	other threads:[~2024-02-20 15:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-20 15:21 [PATCH v2 0/5] Fix DAP pause bug Tom Tromey
2024-02-20 15:21 ` [PATCH v2 1/5] Introduce read_remainder_of_file Tom Tromey
2024-02-20 15:21 ` [PATCH v2 2/5] Fix formatting buglet in python.c Tom Tromey
2024-02-20 15:21 ` Tom Tromey [this message]
2024-02-20 15:21 ` [PATCH v2 4/5] Rewrite "python" command exception handling Tom Tromey
2024-02-20 15:21 ` [PATCH v2 5/5] Use the .py file in gdb.dap/pause.exp Tom Tromey

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=20240220-py-simple-exc-v2-3-c672f1984b4d@adacore.com \
    --to=tromey@adacore.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).