public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "simon.marchi at polymtl dot ca" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug testsuite/30414] Random failure in gdb.fortran/lbound-ubound.exp
Date: Thu, 04 May 2023 11:50:23 +0000 [thread overview]
Message-ID: <bug-30414-4717-f4bgPr0DGq@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-30414-4717@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=30414
--- Comment #3 from Simon Marchi <simon.marchi at polymtl dot ca> ---
(In reply to Tom de Vries from comment #1)
> (In reply to Simon Marchi from comment #0)
> > I haven't figured out how the test can get out of the gdb_test_multiple
> > without a value for ubound.
>
> I think this is what happens when hitting this clause:
> ...
> -re ".*LBOUND = (\[^\r\n\]+)\r\n" {
> set expected_lbound $expect_out(1,string)
> if {!$found_prompt} {
> exp_continue
> }
> }
> ...
> when $found_prompt == 1.
>
> I wonder whether this'll fix it:
> ...
> diff --git a/gdb/testsuite/gdb.fortran/lbound-ubound.exp
> b/gdb/testsuite/gdb.fortran/lbound-ubound.exp
> index fced41f9fe3..31a3be11c3d 100644
> --- a/gdb/testsuite/gdb.fortran/lbound-ubound.exp
> +++ b/gdb/testsuite/gdb.fortran/lbound-ubound.exp
> @@ -59,9 +59,7 @@ while { $test_count < 500 } {
>
> -re ".*LBOUND = (\[^\r\n\]+)\r\n" {
> set expected_lbound $expect_out(1,string)
> - if {!$found_prompt} {
> - exp_continue
> - }
> + exp_continue
> }
> -re ".*UBOUND = (\[^\r\n\]+)\r\n" {
> set expected_ubound $expect_out(1,string)
> ...
Hmm it could be. The gdb_test_multiple reads from both the GDB output and the
inferior's output, so it is possible that there is a race here, that we read
GDB's prompt before we read the UBOUND line. I'm wondering if there is a way
to hack the test case to force this to happen.
But I'm not sure why the test case uses inferior I/O to print the expected
results. Could it instead place the expected results in some variables that
GDB would read, while stopped at the test breakpoint?
--
You are receiving this mail because:
You are on the CC list for the bug.
next prev parent reply other threads:[~2023-05-04 11:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-03 1:53 [Bug gdb/30414] New: " simon.marchi at polymtl dot ca
2023-05-04 8:25 ` [Bug gdb/30414] " vries at gcc dot gnu.org
2023-05-04 8:25 ` [Bug testsuite/30414] " vries at gcc dot gnu.org
2023-05-04 11:50 ` simon.marchi at polymtl dot ca [this message]
2023-05-04 11:57 ` vries at gcc dot gnu.org
2023-05-04 12:05 ` simon.marchi at polymtl dot ca
2023-05-04 15:48 ` simon.marchi at polymtl dot ca
2023-05-18 17:22 ` cvs-commit at gcc dot gnu.org
2023-05-18 17:23 ` simon.marchi at polymtl dot ca
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=bug-30414-4717-f4bgPr0DGq@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=gdb-prs@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).