public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@redhat.com>
To: Tom de Vries <tdevries@suse.de>, 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 14:52:11 +0000	[thread overview]
Message-ID: <87h6kog5b8.fsf@redhat.com> (raw)
In-Reply-To: <a55a1f1c-8747-4465-bc46-2648fe6c1a8a@suse.de>

Tom de Vries <tdevries@suse.de> writes:

> On 12/8/23 23:25, Tom de Vries wrote:
>> On 11/30/23 20:23, Tom Tromey wrote:
>>>>>>>> "Andrew" == Andrew Burgess <aburgess@redhat.com> writes:
>>>
>>> Andrew> Following on from the previous commit, I searched the 
>>> testsuite for
>>> Andrew> places where we did:
>>>
>>> Andrew>   set eol "<some pattern>"
>>>
>>> Andrew> in most cases the <some pattern> could be replaced with "\r\n" 
>>> though
>>> Andrew> in the stabs test I've switched to using the multi_line proc 
>>> as that
>>> Andrew> seemed like a better choice.
>>>
>>> Andrew> In gdb.ada/info_types.exp I did need to add an extra use of 
>>> $eol as
>>> Andrew> the previous pattern would match multiple newlines, and in 
>>> this one
>>> Andrew> place we were actually expecting to match multiple newlines.  The
>>> Andrew> tighter pattern only matches a single newline, so we now need 
>>> to be
>>> Andrew> explicit when multiple newlines are expected -- I think this 
>>> is a good
>>> Andrew> thing.
>>>
>>> Andrew> All the tests are still passing for me after these changes.
>>>
>>> Looks good to me, thank you.
>>> Approved-By: Tom Tromey <tom@tromey.com>
>> 
>> I  see some regressions:
>> ...
>> FAIL: gdb.ada/catch_assert_if.exp: continuing to expected failed assertion
>> FAIL: gdb.ada/catch_ex.exp: continuing to first exception
>> FAIL: gdb.ada/catch_ex.exp: continuing to second exception
>> FAIL: gdb.ada/catch_ex.exp: continuing to Program_Error exception
>> FAIL: gdb.ada/catch_ex.exp: continuing to failed assertion
>> FAIL: gdb.ada/catch_ex.exp: continuing to unhandled exception
>> FAIL: gdb.ada/catch_ex.exp: continuing to temporary catchpoint
>> FAIL: gdb.ada/excep_handle.exp: continuing to first Constraint_Error 
>> exception handlers
>> FAIL: gdb.ada/excep_handle.exp: continuing and stopping in Storage_Error 
>> exception handlers
>> FAIL: gdb.ada/excep_handle.exp: continuing without stopping to 
>> Program_Error exception handlers
>> FAIL: gdb.ada/excep_handle.exp: continuing without stopping to 
>> Storage_Error exception handlers
>> FAIL: gdb.ada/excep_handle.exp: continuing to second Constraint_Error 
>> exception handlers
>> FAIL: gdb.ada/excep_handle.exp: continuing to Program_Error exception 
>> handlers
>> ...
>> 
>> For instance:
>> ...
>> (gdb) PASS: gdb.ada/catch_assert_if.exp: Check catch assertions with 
>> condition
>> continue^M
>> Continuing.^M
>> ^M
>> Catchpoint 2, failed assertion at 0x000000000040201a in bla () at 
>> /data/vries/gdb/binutils-gdb.git/gdb/testsuite/gdb.ada/catch_assert_if/bla.adb:32^M
>> 32            pragma Assert (Global_Var = 1, "Error #2"); -- STOP^M
>> (gdb) FAIL: gdb.ada/catch_assert_if.exp: continuing to expected failed 
>> assertion
>> ...
>
> I see this failure both with openSUSE Leap 15.4 and openSUSE Tumbleweed.
>
> Fixed on both by:
> ...
> diff --git a/gdb/testsuite/gdb.ada/catch_assert_if.exp 
> b/gdb/testsuite/gdb.ada/catch_assert_if.exp
> index 9b094d88dc8..dd9db10ebe1 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" \
> ...
>
> Does this pass for you without this patch?

All the tests you listed are showing as UNSUPPORTED for me due to the
runtime debuginfo package being missing.  So far I've been unable to
find/install the correct package.

The change above looks reasonable to me, I suspect all these tests will
be fixed by similar updates.

FWIW, have a pre-approval for fixes for these regressions.  And thanks
for looking into these.

Approved-By: Andrew Burgess <aburgess@redhat.com>

Thanks,
Andrew


  reply	other threads:[~2023-12-11 14:53 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 [this message]
2023-12-11 14:55           ` Tom de Vries
2023-12-11 16:16             ` Tom de Vries
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=87h6kog5b8.fsf@redhat.com \
    --to=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tdevries@suse.de \
    --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).