[0/4] Avoid command-line length limit combining test results

Message ID 20260723175131.266112-1-pedro@palves.net
Headers
Series Avoid command-line length limit combining test results |

Message

Pedro Alves July 23, 2026, 5:51 p.m. UTC
  On Windows, "make check-parallel" dies when combining the per-test
gdb.sum / gdb.log files into the final combined pair:

 $ find outputs/ -name gdb.sum | wc -l
 2657
 .../dg-extract-results.sh: line 39: /ucrt64/bin/python3: Argument list too long
 make: *** [Makefile:274: check-parallel] Error 2

The testsuite Makefile passes the whole file list to
contrib/dg-extract-results.sh on the command line, expanded from a
find(1) backtick.  GDB's parallel harness writes one gdb.sum (and one
gdb.log) per test script, so on a full run that list holds thousands
of paths, which overflows the Windows command-line length limit
(~32 KB).

This series teaches dg-extract-results to read the file list from
stdin (or a file) instead, and has the Makefile pipe the find output
straight in, so the length limit no longer applies regardless of the
host.

The first patch touches contrib/dg-extract-results.{sh,py}, which are
shared with GCC, so I plan to submit that one to GCC as well.

The two middle patches (factoring out the combine recipe, and adding
the extract-results target) are pure GDB and can go in at any time.

Only the last patch depends on the new -f option added by the first
patch.

Pedro Alves (4):
  dg-extract-results.{sh,py}: Optionally read file list from stdin/file
  gdb/testsuite: Factor out dg-extract-results.sh calls
  gdb/testsuite: Add extract-results make target
  gdb/testsuite: Pipe the dg-extract-results file list via stdin

 contrib/dg-extract-results.py | 30 +++++++++++++++++++---
 contrib/dg-extract-results.sh | 17 +++++++++++--
 gdb/testsuite/Makefile.in     | 47 ++++++++++++++++++++++++-----------
 3 files changed, 74 insertions(+), 20 deletions(-)


base-commit: 39fc0cc4aa6f82a73b9eac6b8739895484ab269f
  

Comments

Pedro Alves Sept. 4, 2026, 12:31 p.m. UTC | #1
On 2026-07-23 18:51, Pedro Alves wrote:

> This series teaches dg-extract-results to read the file list from
> stdin (or a file) instead, and has the Makefile pipe the find output
> straight in, so the length limit no longer applies regardless of the
> host.
> 
> The first patch touches contrib/dg-extract-results.{sh,py}, which are
> shared with GCC, so I plan to submit that one to GCC as well.

This is now merged in both GCC and GDB.

I've gone ahead and merged the rest of the series to GDB.

Pedro Alves