public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: Andrew Burgess <aburgess@redhat.com>, Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/2] gdb/testsuite: tighten up some end-of-line patterns
Date: Mon, 11 Dec 2023 17:16:12 +0100	[thread overview]
Message-ID: <ca44feda-82d5-46a9-9da9-ebfc15e10b0e@suse.de> (raw)
In-Reply-To: <20d8fce5-d190-4f83-9a6d-be47dd4a2738@suse.de>

[-- Attachment #1: Type: text/plain, Size: 121 bytes --]

On 12/11/23 15:55, Tom de Vries wrote:
> Ok, I'll fix these then using this approach.

Pushed as attached.

Thanks,
- Tom

[-- Attachment #2: 0001-gdb-testsuite-Fix-eol-regexp-usage-in-some-test-case.patch --]
[-- Type: text/x-patch, Size: 6234 bytes --]

From 6a48bc988b57f94e2accc3899152a7b0c4946ada Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries@suse.de>
Date: Mon, 11 Dec 2023 16:18:23 +0100
Subject: [pushed] [gdb/testsuite] Fix $eol regexp usage in some test-cases

Commit cff71358132 ("gdb/testsuite: tighten up some end-of-line patterns") replaced:
...
set eol "\[\r\n\]+"
...
with the more strict:
...
set eol "\r\n"
...
in a few test-cases, but didn't update all uses of eol accordingly.

Fix this in three gdb.ada test-cases.

Tested on x86_64-linux.

Approved-By: Andrew Burgess <aburgess@redhat.com>
---
 gdb/testsuite/gdb.ada/catch_assert_if.exp |  2 +-
 gdb/testsuite/gdb.ada/catch_ex.exp        | 12 ++++++------
 gdb/testsuite/gdb.ada/excep_handle.exp    | 12 ++++++------
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/gdb/testsuite/gdb.ada/catch_assert_if.exp b/gdb/testsuite/gdb.ada/catch_assert_if.exp
index 9b094d88dc8..3071c4a5e06 100644
--- a/gdb/testsuite/gdb.ada/catch_assert_if.exp
+++ b/gdb/testsuite/gdb.ada/catch_assert_if.exp
@@ -52,7 +52,7 @@ set bp_location [gdb_get_line_number "STOP" ${testdir}/bla.adb]
 set catchpoint_msg \
   "Catchpoint $decimal, failed assertion at $hex in bla \\\(\\\).*at .*bla.adb:$bp_location"
 gdb_test "continue" \
-         "Continuing\.$eol$catchpoint_msg$eol.*STOP" \
+	 "Continuing\.$eol$eol$catchpoint_msg$eol.*STOP" \
          "continuing to expected failed assertion"
 
 gdb_test "continue" \
diff --git a/gdb/testsuite/gdb.ada/catch_ex.exp b/gdb/testsuite/gdb.ada/catch_ex.exp
index 22175d83c07..19f743db7a6 100644
--- a/gdb/testsuite/gdb.ada/catch_ex.exp
+++ b/gdb/testsuite/gdb.ada/catch_ex.exp
@@ -55,13 +55,13 @@ gdb_test "info break" \
 set catchpoint_msg \
   "Catchpoint $any_nb, CONSTRAINT_ERROR (\\\(ignore C_E\\\) )?at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb"
 gdb_test "continue" \
-         "Continuing\.$eol$catchpoint_msg$eol.*SPOT1" \
+	 "Continuing\.$eol$eol$catchpoint_msg$eol.*SPOT1" \
          "continuing to first exception"
 
 set catchpoint_msg \
   "Catchpoint $any_nb, PROGRAM_ERROR (\\\(foo\\.adb:$decimal explicit raise\\\) )?at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb"
 gdb_test "continue" \
-         "Continuing\.$eol$catchpoint_msg$eol.*SPOT2" \
+	 "Continuing\.$eol$eol$catchpoint_msg$eol.*SPOT2" \
          "continuing to second exception"
 
 ################################################
@@ -108,19 +108,19 @@ gdb_test "info break" \
 set catchpoint_msg \
   "Catchpoint $any_nb, PROGRAM_ERROR (\\\(foo.adb:$decimal explicit raise\\\) )?at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb"
 gdb_test "continue" \
-         "Continuing\.$eol$catchpoint_msg$eol.*SPOT2" \
+	 "Continuing\.$eol$eol$catchpoint_msg$eol.*SPOT2" \
          "continuing to Program_Error exception"
 
 set catchpoint_msg \
   "Catchpoint $any_nb, failed assertion at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb"
 gdb_test "continue" \
-         "Continuing\.$eol$catchpoint_msg$eol.*SPOT3" \
+	 "Continuing\.$eol$eol$catchpoint_msg$eol.*SPOT3" \
          "continuing to failed assertion"
 
 set catchpoint_msg \
   "Catchpoint $any_nb, unhandled CONSTRAINT_ERROR at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb"
 gdb_test "continue" \
-         "Continuing\.$eol$catchpoint_msg$eol.*SPOT4" \
+	 "Continuing\.$eol$eol$catchpoint_msg$eol.*SPOT4" \
          "continuing to unhandled exception"
 
 gdb_test "continue" \
@@ -148,7 +148,7 @@ gdb_test "tcatch exception" \
 set temp_catchpoint_msg \
   "Temporary catchpoint $any_nb, CONSTRAINT_ERROR (\\\(.*\\\) )?at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb"
 gdb_test "continue" \
-         "Continuing\.$eol$temp_catchpoint_msg$eol.*SPOT1" \
+	 "Continuing\.$eol$eol$temp_catchpoint_msg$eol.*SPOT1" \
          "continuing to temporary catchpoint"
 
 with_test_prefix "temporary catchpoint" {
diff --git a/gdb/testsuite/gdb.ada/excep_handle.exp b/gdb/testsuite/gdb.ada/excep_handle.exp
index 590c7fccdec..f1ce24a1682 100644
--- a/gdb/testsuite/gdb.ada/excep_handle.exp
+++ b/gdb/testsuite/gdb.ada/excep_handle.exp
@@ -55,7 +55,7 @@ gdb_test "catch handlers" \
 # Continue.  The program should stop at first exception handling.
 
 gdb_test "continue" \
-    "Continuing\.$eol$catchpoint_constraint_error_msg" \
+    "Continuing\.$eol$eol$catchpoint_constraint_error_msg" \
     "continuing to first Constraint_Error exception handlers"
 
 # Resume the program's exception.
@@ -66,7 +66,7 @@ gdb_test "continue" \
 # the next exception being raised.
 
 gdb_test "continue" \
-    "Continuing\.$eol$catchpoint_storage_error_msg" \
+    "Continuing\.$eol$eol$catchpoint_storage_error_msg" \
     "continuing and stopping in Storage_Error exception handlers"
 
 gdb_test_no_output "delete 2" \
@@ -85,7 +85,7 @@ 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" \
+    "Continuing\.$eol$eol$catchpoint_program_error_msg" \
     "continuing without stopping to Program_Error exception handlers"
 
 gdb_test_no_output \
@@ -101,7 +101,7 @@ gdb_test "catch handlers Storage_Error" \
 # Continue, we should stop at Storage_Error handlers.
 
 gdb_test "continue" \
-    "Continuing\.$eol$catchpoint_storage_error_msg" \
+    "Continuing\.$eol$eol$catchpoint_storage_error_msg" \
     "continuing without stopping to Storage_Error exception handlers"
 
 gdb_test_no_output \
@@ -126,7 +126,7 @@ 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" \
+    "Continuing\.$eol$eol$catchpoint_constraint_error_msg" \
     "continuing to second Constraint_Error exception handlers"
 
 gdb_test_no_output \
@@ -148,7 +148,7 @@ gdb_test "catch handlers Program_Error if Global_Var = 4" \
 # the second one.
 
 gdb_test "continue" \
-    "Continuing\.$eol$catchpoint_program_error_msg" \
+    "Continuing\.$eol$eol$catchpoint_program_error_msg" \
     "continuing to Program_Error exception handlers"
 
 # Continue, the program should exit properly.

base-commit: 9394690cb87b5ddc575b333bd0595b07a7a72c60
-- 
2.35.3


  reply	other threads:[~2023-12-11 16:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-29 17:55 [PATCH 0/2] A few minor testsuite cleanups Andrew Burgess
2023-11-29 17:55 ` [PATCH 1/2] gdb/testsuite: fix gdb.ada/complete.exp timeout in READ1 mode Andrew Burgess
2023-11-30 19:22   ` Tom Tromey
2023-11-29 17:55 ` [PATCH 2/2] gdb/testsuite: tighten up some end-of-line patterns Andrew Burgess
2023-11-30 19:23   ` Tom Tromey
2023-12-08 22:25     ` Tom de Vries
2023-12-09  6:59       ` Tom de Vries
2023-12-11 14:52         ` Andrew Burgess
2023-12-11 14:55           ` Tom de Vries
2023-12-11 16:16             ` Tom de Vries [this message]
2023-12-11 16:44               ` Andrew Burgess
2023-12-08 18:07 ` [PATCH 0/2] A few minor testsuite cleanups Andrew Burgess

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=ca44feda-82d5-46a9-9da9-ebfc15e10b0e@suse.de \
    --to=tdevries@suse.de \
    --cc=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).