From: Kevin Buettner <kevinb@redhat.com>
To: gcc-patches@gcc.gnu.org
Cc: Andrew Pinski <andrew.pinski@oss.qualcomm.com>,
gdb-patches@sourceware.org
Subject: Re: [PATCH] contrib: Make dg-extract-results.py tolerant of unparseable files
Date: Fri, 29 May 2026 13:04:03 -0700 [thread overview]
Message-ID: <20260529130403.249b662b@f42-zbm-amd> (raw)
In-Reply-To: <CALvbMcBQGP7mTGCU=hnLHkLX5NsWgFfRDQbO8piGFEcY6tQY6g@mail.gmail.com>
On Thu, 28 May 2026 16:35:31 -0700
Andrew Pinski <andrew.pinski@oss.qualcomm.com> wrote:
> On Thu, May 14, 2026 at 11:18 AM Kevin Buettner <kevinb@redhat.com>
> wrote:
> >
> > This commit is for the benefit of GDB, but as the binutils-gdb
> > repository shares the contrib/ directory with GCC, this commit
> > must first be applied to GCC and then copied back to binutils-gdb.
> >
> > When running GDB tests in parallel (make check -j$(nproc)), the
> > consolidated gdb.sum and gdb.log files are produced by
> > contrib/dg-extract-results.py, which merges per-test output files.
> >
> > If any single per-test output file is malformed (e.g., due to a
> > DejaGnu EILSEQ crash, which is how I encountered this problem), the
> > script aborts via self.fatal(). Because this script is invoked via a
> > Makefile command using shell redirection, this causes the top-level
> > output files to be left as empty, zero-byte files, discarding valid
> > results from all other tests.
> >
> > Fix by making the script tolerant of unparseable input files. Wrap
> > each file's parsing in a try/except block. When a file cannot be
> > parsed, emit a warning to stderr and continue processing remaining
> > files. This ensures that crashing tests do not destroy the
> > consolidated output for the entire parallel build.
> >
> > Tested on Fedora 44 using the GCC testsuite (make check-gcc
> > -j$(nproc)). The consolidated results are produced correctly with
> > no regressions.
> >
> > This commit fixes this GDB bug:
> >
> > https://sourceware.org/bugzilla/show_bug.cgi?id=34147
> >
> > contrib/ChangeLog:
> >
> > * dg-extract-results.py: Show warnings instead of erroring out
> > when encountering an unparseable file.
>
> Ok.
This change has been pushed to the GCC repo.
It is my understanding that ChangeLog entries are automatically added
on a daily basis. If that is incorrect, please let me know and I'll
add it by hand.
For copying back to GDB (binutils-gdb), I plan to wait until the
ChangeLog entry is in place. Once that is done, I'll do the copy and
push to GDB as well.
Finally, I noticed some discussion regarding Python formatting. I'll
note that I simply tried to follow the conventions already in use in
dg-extract-results.py. But I do think it makes sense to use modern
Python formatting standards. I'll leave it to someone else to
implement that.
Kevin
next prev parent reply other threads:[~2026-05-29 20:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-14 18:15 Kevin Buettner
2026-05-28 19:01 ` Tom Tromey
2026-05-28 19:21 ` Andrew Pinski
2026-05-28 23:38 ` Andrew Pinski
2026-05-29 0:53 ` Simon Marchi
2026-05-28 23:35 ` Andrew Pinski
2026-05-29 20:04 ` Kevin Buettner [this message]
2026-05-30 0:48 ` Kevin Buettner
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=20260529130403.249b662b@f42-zbm-amd \
--to=kevinb@redhat.com \
--cc=andrew.pinski@oss.qualcomm.com \
--cc=gcc-patches@gcc.gnu.org \
--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