Bug 30399 - [gdb/testsuite] FAIL: gdb.ada/excep_handle.exp: continuing to first Constraint_Error exception handlers
Summary: [gdb/testsuite] FAIL: gdb.ada/excep_handle.exp: continuing to first Constrain...
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: testsuite (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: 14.1
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-28 07:41 UTC by Tom de Vries
Modified: 2023-04-29 06:57 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom de Vries 2023-04-28 07:41:27 UTC
For a testsuite run with a build without tui and ncurses and system readline, I run into:
...
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
...

First fail in more detail:
...
(gdb) PASS: gdb.ada/excep_handle.exp: insert catchpoint on all Ada exceptions handlers
continue^M
Continuing.^M
^M
Catchpoint 2, exception at 0x00000000004020b6 in foo () at /data/vries/gdb/binutils-gdb.git/gdb/testsuite/gdb.ada/exc\
ep_handle/foo.adb:26^M
26            when Constraint_Error =>^M
(gdb) FAIL: gdb.ada/excep_handle.exp: continuing to first Constraint_Error exception handlers
...

Fixed by:
...
diff --git a/gdb/testsuite/gdb.ada/excep_handle.exp b/gdb/testsuite/gdb.ada/excep_handle.exp
index f8a6ded2cdf..300fefc8291 100644
--- a/gdb/testsuite/gdb.ada/excep_handle.exp
+++ b/gdb/testsuite/gdb.ada/excep_handle.exp
@@ -69,7 +69,7 @@ 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\.$eol$catchpoint_constraint_error_msg" \
          "continuing to first Constraint_Error exception handlers"
 
 # Resume the program's exception.
...

I'll do some other builds to see whether this has to do with one of the disabled aspects.
Comment 1 Tom de Vries 2023-04-29 04:43:12 UTC
I did another build, with ncuses and tui and without system readline.

FAIL did reproduce.
Comment 2 Tom de Vries 2023-04-29 05:14:53 UTC
I did my usual build, with ncurses and tui and system readline.

Still FAILs.

This may be fallout from "gdb/testsuite: stricter matching for gdb_test".
Comment 3 Tom de Vries 2023-04-29 06:36:25 UTC
(In reply to Tom de Vries from comment #2)
> This may be fallout from "gdb/testsuite: stricter matching for gdb_test".

Confirmed, starts failing at commit e2f620135d9 ("gdb/testsuite: change newline patterns used in gdb_test").
Comment 4 Sourceware Commits 2023-04-29 06:56:56 UTC
The master branch has been updated by Tom de Vries <vries@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bc752bfbd98b6c2b02d59ed0a6c7ca88fbf4e3e0

commit bc752bfbd98b6c2b02d59ed0a6c7ca88fbf4e3e0
Author: Tom de Vries <tdevries@suse.de>
Date:   Sat Apr 29 08:57:07 2023 +0200

    [gdb/testsuite] Fix gdb.ada/excep_handle.exp for updated gdb_test
    
    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
Comment 5 Tom de Vries 2023-04-29 06:57:45 UTC
Fixed by commit.