public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [pushed] [gdb/testsuite] Fix gdb.ada/excep_handle.exp for updated gdb_test
Date: Sat, 29 Apr 2023 08:57:19 +0200	[thread overview]
Message-ID: <20230429065719.9562-1-tdevries@suse.de> (raw)

Test-case gdb.ada/excep_handle.exp fails since commit e2f620135d9
("gdb/testsuite: change newline patterns used in gdb_test"):
...
(gdb) continue^M
Continuing.^M
^M
Catchpoint 2, exception at 0x00000000004020b6 in foo () at foo.adb:26^M
26            when Constraint_Error =>^M
(gdb) FAIL: gdb.ada/excep_handle.exp: continuing to first Constraint_Error \
  exception handlers
...

The output is supposed to be matched by:
...
gdb_test "continue" \
         "Continuing\.$eol$catchpoint_constraint_error_msg$eol.*" \
         "continuing to first Constraint_Error exception handlers"
...
but the $eol bit no longer matches due to the stricter matching introduced
in aforementioned commit.

Fix this by dropping the "$eol.*" bit.

Tested on x86_64-linux.

PR testsuite/30399
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30399
---
 gdb/testsuite/gdb.ada/excep_handle.exp | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/gdb/testsuite/gdb.ada/excep_handle.exp b/gdb/testsuite/gdb.ada/excep_handle.exp
index f8a6ded2cdf..2cc80fbb988 100644
--- a/gdb/testsuite/gdb.ada/excep_handle.exp
+++ b/gdb/testsuite/gdb.ada/excep_handle.exp
@@ -69,8 +69,8 @@ gdb_test_multiple "catch handlers" $msg {
 # Continue.  The program should stop at first exception handling.
 
 gdb_test "continue" \
-         "Continuing\.$eol$catchpoint_constraint_error_msg$eol.*" \
-         "continuing to first Constraint_Error exception handlers"
+    "Continuing\.$eol$catchpoint_constraint_error_msg" \
+    "continuing to first Constraint_Error exception handlers"
 
 # Resume the program's exception.
 #
@@ -80,8 +80,8 @@ gdb_test "continue" \
 # the next exception being raised.
 
 gdb_test "continue" \
-         "Continuing\.$eol$catchpoint_storage_error_msg$eol.*" \
-         "continuing and stopping in Storage_Error exception handlers"
+    "Continuing\.$eol$catchpoint_storage_error_msg" \
+    "continuing and stopping in Storage_Error exception handlers"
 
 gdb_test_no_output "delete 2" \
                    "delete catchpoint on all Ada exceptions handlers"
@@ -99,8 +99,8 @@ gdb_test "catch handlers Program_Error" \
 # Continue, we should not stop at ABORT_SIGNAL but at Program_Error one.
 
 gdb_test "continue" \
-         "Continuing\.$eol$catchpoint_program_error_msg$eol.*" \
-         "continuing without stopping to Program_Error exception handlers"
+    "Continuing\.$eol$catchpoint_program_error_msg" \
+    "continuing without stopping to Program_Error exception handlers"
 
 gdb_test_no_output \
     "delete 3" \
@@ -115,8 +115,8 @@ gdb_test "catch handlers Storage_Error" \
 # Continue, we should stop at Storage_Error handlers.
 
 gdb_test "continue" \
-         "Continuing\.$eol$catchpoint_storage_error_msg$eol.*" \
-         "continuing without stopping to Storage_Error exception handlers"
+    "Continuing\.$eol$catchpoint_storage_error_msg" \
+    "continuing without stopping to Storage_Error exception handlers"
 
 gdb_test_no_output \
     "delete 4" \
@@ -140,8 +140,8 @@ gdb_test "info breakpoint" "stop only if Global_Var = 2" \
 # Continue, we should not stop at ABORT_SIGNAL but at Program_Error one.
 
 gdb_test "continue" \
-         "Continuing\.$eol$catchpoint_constraint_error_msg$eol.*" \
-         "continuing to second Constraint_Error exception handlers"
+    "Continuing\.$eol$catchpoint_constraint_error_msg" \
+    "continuing to second Constraint_Error exception handlers"
 
 gdb_test_no_output \
     "delete 5" \
@@ -162,8 +162,8 @@ gdb_test "catch handlers Program_Error if Global_Var = 4" \
 # the second one.
 
 gdb_test "continue" \
-         "Continuing\.$eol$catchpoint_program_error_msg$eol.*" \
-         "continuing to Program_Error exception handlers"
+    "Continuing\.$eol$catchpoint_program_error_msg" \
+    "continuing to Program_Error exception handlers"
 
 # Continue, the program should exit properly.
 

base-commit: e5cbbbf79ad269983f744414a7efece6784dd682
-- 
2.35.3


                 reply	other threads:[~2023-04-29  6:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20230429065719.9562-1-tdevries@suse.de \
    --to=tdevries@suse.de \
    --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).