From patchwork Thu Jul 23 17:51:28 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 139840 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 434BE4BA7993 for ; Thu, 23 Jul 2026 17:52:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 434BE4BA7993 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (2048-bit key, unprotected) header.d=palves.net header.i=@palves.net header.a=rsa-sha256 header.s=dreamhost header.b=owH1ITrF X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from lightcyan.cherry.relay.mailchannels.net (lightcyan.cherry.relay.mailchannels.net [23.83.223.105]) by sourceware.org (Postfix) with ESMTPS id E03CB4BA23C2 for ; Thu, 23 Jul 2026 17:51:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E03CB4BA23C2 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=palves.net ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E03CB4BA23C2 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=23.83.223.105 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784829108; cv=none; b=OmXsUb5c/AuJU8AIHI3WqEExjH5MwUomVAdsO+DY3VMhAY0MdArcW6xY/YJXKBNsy830bRPwfe5/lP3XCpAbZwbWe09xcJVq5BmtlOHuRuGlrWSOZXHA8eCYzkIVbuV4uObXtywECQ8g406HNaibD+wncCN0n3C34/Zi49heGxU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784829108; c=relaxed/simple; bh=BE0/MQLt60XlA8NwYbEZffuUOs2rJmSfkFNfAhoYPVU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=u4v0k2Gr5r0/VcFROTHu6c8N8bvtK6okXvB9wC1WZvVaRN2UF6rdtvRCWgJsORoOwwncNy+1kWiTzyKk44CF3CqKWhxca15XqLqNmlPT92EKqHu+Ai9mwxhbWWDG9xs1PFOvkMUIecjRS4iEPKIpXGcPv3m0ECn0UXeh5pdoZ8Y= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=palves.net header.i=@palves.net header.a=rsa-sha256 header.s=dreamhost header.b=owH1ITrF DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E03CB4BA23C2 X-Sender-Id: dreamhost|x-authsender|pedro@palves.net Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 04EED161456 for ; Thu, 23 Jul 2026 17:51:47 +0000 (UTC) Received: from pdx1-sub0-mail-a242.dreamhost.com (trex-green-8.trex.outbound.svc.cluster.local [100.104.12.45]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 9AFEC160EC6 for ; Thu, 23 Jul 2026 17:51:46 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|pedro@palves.net X-MC-Relay: Good X-MailChannels-SenderId: dreamhost|x-authsender|pedro@palves.net X-MailChannels-Auth-Id: dreamhost X-Army-Squirrel: 5d197c173a5b0ad7_1784829106880_1700924328 X-MC-Loop-Signature: 1784829106880:1302648778 X-MC-Ingress-Time: 1784829106880 Received: from pdx1-sub0-mail-a242.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.104.12.45 (trex/8.0.2); Thu, 23 Jul 2026 17:51:46 +0000 Received: from localhost (bl20-181-64.dsl.telepac.pt [2.81.181.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pedro@palves.net) by pdx1-sub0-mail-a242.dreamhost.com (Postfix) with ESMTPSA id 4h5dwf0km9z1049 for ; Thu, 23 Jul 2026 10:51:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=palves.net; s=dreamhost; t=1784829106; bh=XmidhMmQr6wI+UnhCpdbJ/lWWNxMciQlHNq4fu0uZUs=; h=From:To:Subject:Date:Content-Transfer-Encoding; b=owH1ITrFyXB1dHwPkJTbAuoOa8Emx7gbsXA7UfBNeOGr5qHMMEdwLF9BTTasJqaef CmzmslSonJwjzyeMrJ2SjUu82xf/4GjPkSiLiNOD5DLqftyCuCDsicY3BZrurq8BEA n7n8OvOgKTimevfEaGMcq8mp+ptSr5lgT0Z4VQ9diS2c+YjwWNffgj/I42x/4z60yO VWPSY8aVpRosYk9QB0/RKWRfC5JlP4PTErDqK1/qHB9hSxbv4GJ+Mlb0G83JLuQiCi q4kYf4AWTXSTtZC1bZRm5mOMoM/eVWVtl1VlFjjGM7A3fEC0cr9PUmzlDhxQd7J2TN 275hX7vf7a/ew== From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 1/4] dg-extract-results.{sh, py}: Optionally read file list from stdin/file Date: Thu, 23 Jul 2026 18:51:28 +0100 Message-ID: <20260723175131.266112-2-pedro@palves.net> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260723175131.266112-1-pedro@palves.net> References: <20260723175131.266112-1-pedro@palves.net> MIME-Version: 1.0 X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, POISEN_SPAM_PILL, POISEN_SPAM_PILL_1, POISEN_SPAM_PILL_3, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_PBL, SPF_HELO_NONE, SPF_PASS, TXREP shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org dg-extract-results.sh and dg-extract-results.py take the summary/log files to combine as command-line arguments, one argument per file. That is fine for GCC, whose parallel harness produces one .sum per target variant -- a handful of files. GDB uses these scripts too, but its parallel harness writes one .sum (and one .log) per test script, of which there are 2657 at the moment. On Windows, with native Windows python, passing that many sum or log files to dg-extract-results overflows the command-line length limit (~32 KB), and the combine step dies: $ make check -j$(nproc) ... make[1]: Leaving directory '/c/msys2/home/alves/gdb/build-testsuite-windows' /c/gdb/src/gdb/testsuite/../../contrib/dg-extract-results.sh: line 39: /ucrt64/bin/python3: Argument list too long /c/gdb/src/gdb/testsuite/../../contrib/dg-extract-results.sh: line 39: /ucrt64/bin/python3: Argument list too long make: *** [Makefile:274: check-parallel] Error 2 ... $ find outputs/ -name gdb.sum | wc -l 2657 The .sh wrapper re-execs the faster Python implementation, forwarding the file list, so the overflow can also surface at the re-exec. Fix it by teaching both dg-extract-results.sh and dg-extract-results.py a new -f option that reads the list of files to process, one per line, from a named file, or from standard input when the argument is "-". The option may be given more than once and mixed with file arguments. A caller can then pipe the file list straight in via "-f -" instead of expanding it onto the command line, so the length limit no longer applies regardless of the host or Python flavor. Existing callers can continue working as they were if they want, as passing the file list as one file per argument is still supported. Change-Id: Iaced5ba228972ce267f355de65fe5ad8a1e38c68 --- contrib/dg-extract-results.py | 30 ++++++++++++++++++++++++++---- contrib/dg-extract-results.sh | 17 +++++++++++++++-- 2 files changed, 41 insertions(+), 6 deletions(-) diff --git a/contrib/dg-extract-results.py b/contrib/dg-extract-results.py index 98b0f4989c9..b5d890f6406 100644 --- a/contrib/dg-extract-results.py +++ b/contrib/dg-extract-results.py @@ -164,7 +164,7 @@ class Prog: def usage (self): name = sys.argv[0] sys.stderr.write ('Usage: ' + name - + ''' [-t tool] [-l variant-list] [-L] log-or-sum-file ... + + ''' [-t tool] [-l variant-list] [-L] [-f list-file] log-or-sum-file ... tool The tool (e.g. g++, libffi) for which to create a new test summary file. If not specified then output @@ -174,6 +174,12 @@ class Prog: variants in the files for . sum-file A test summary file with the format of those created by runtest from DejaGnu. + list-file A file listing the log-or-sum files to process, one + per line. Use "-" to read the list from standard + input. This avoids the command-line length limit + when combining very many files. May be given more + than once, and may be mixed with log-or-sum-file + arguments. If -L is used, merge *.log files instead of *.sum. In this mode the exact order of lines may not be preserved, just different Running *.exp chunks should be in correct order. @@ -189,19 +195,35 @@ class Prog: # Parse the command-line arguments. def parse_cmdline (self): try: - (options, self.files) = getopt.getopt (sys.argv[1:], 'l:t:L') - if len (self.files) == 0: - self.usage() + (options, self.files) = getopt.getopt (sys.argv[1:], 'l:t:Lf:') for (option, value) in options: if option == '-l': self.variations.append (value) elif option == '-t': self.tools.append (value) + elif option == '-f': + self.read_file_list (value) else: self.do_sum = False + if len (self.files) == 0: + self.usage() except getopt.GetoptError as e: self.fatal (None, e.msg) + # Append the files listed in FILENAME, one per line, to self.files. + # FILENAME of "-" means read the list from standard input. Blank + # lines are ignored. + def read_file_list (self, filename): + f = sys.stdin if filename == '-' else open (filename, 'r') + try: + for line in f: + line = line.strip() + if line: + self.files.append (line) + finally: + if f is not sys.stdin: + f.close() + # Try to parse time string TIME, returning an arbitrary time on failure. # Getting this right is just a nice-to-have so failures should be silent. def parse_time (self, time): diff --git a/contrib/dg-extract-results.sh b/contrib/dg-extract-results.sh index d64ba255838..d03e1a9b4e1 100755 --- a/contrib/dg-extract-results.sh +++ b/contrib/dg-extract-results.sh @@ -42,7 +42,7 @@ done usage() { cat <&2 -Usage: $PROGNAME [-t tool] [-l variant-list] [-L] sum-file ... +Usage: $PROGNAME [-t tool] [-l variant-list] [-L] [-f list-file] sum-file ... tool The tool (e.g. g++, libffi) for which to create a new test summary file. If not specified then all @@ -52,6 +52,11 @@ Usage: $PROGNAME [-t tool] [-l variant-list] [-L] sum-file ... variants in the files for . sum-file A test summary file with the format of those created by runtest from DejaGnu. + list-file A file listing the sum-files to process, one per line. + Use "-" to read the list from standard input. This + avoids the command-line length limit when combining + very many files. May be given more than once, and + may be mixed with sum-file arguments. If -L is used, merge *.log files instead of *.sum. In this mode the exact order of lines may not be preserved, just different Running *.exp chunks should be in correct order. @@ -69,18 +74,26 @@ msg() { VARIANTS="" TOOL="" MODE="sum" +LIST_FILES="" -while getopts "l:t:L" ARG; do +while getopts "l:t:Lf:" ARG; do case $ARG in l) VARIANTS="${VARIANTS} ${OPTARG}";; t) test -z "$TOOL" || (msg "${PROGNAME}: only one tool can be specified"; exit 1); TOOL="${OPTARG}";; L) MODE="log";; + f) if test "${OPTARG}" = "-" ; then + LIST_FILES="${LIST_FILES} `cat`" + else + LIST_FILES="${LIST_FILES} `cat "${OPTARG}"`" + fi;; \?) usage; exit 0;; esac done shift `expr ${OPTIND} - 1` +set -- ${LIST_FILES} "$@" + if test $# -lt 1 ; then usage exit 1 From patchwork Thu Jul 23 17:51:29 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 139841 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 190684BA23F6 for ; Thu, 23 Jul 2026 17:52:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 190684BA23F6 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=palves.net header.i=@palves.net header.a=rsa-sha256 header.s=dreamhost header.b=KusoWTRE X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from dog.pear.relay.mailchannels.net (dog.pear.relay.mailchannels.net [23.83.216.48]) by sourceware.org (Postfix) with ESMTPS id 344794BA23CC for ; Thu, 23 Jul 2026 17:51:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 344794BA23CC Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=palves.net ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 344794BA23CC Authentication-Results: sourceware.org; arc=none smtp.remote-ip=23.83.216.48 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784829118; cv=none; b=Yo7vglwDSw94b/PIY2yt2tiFDO/35wIBSB/mEa2S+9xjO0dG5tRGjwsGVMeNPgc8yfvY4HWwvLLwtLI74DB0JOxDPDAaQEgEQEZxN3xkhmtS1RYtJ1PdQMYU/gSa+My6d152TgsCuU0eS4dgZPsNBsYhsgnAgkXP/FW7YYWvMfg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784829118; c=relaxed/simple; bh=29cjuulHpiC3dpjEvVbToYLyCNDWWiLfQDw+UtvxrMI=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=ij605OOJzaPasm20FUMIwikZckKCYIHiUcC6UAcCwuXNS6loCvFNrdoIw2ID8dlY35I2xfhBfS+c6SIs9OoHwyiItM+ulEtoaVOyLYC9SoFWFbRZPCPu+MI3/hr5NAzH3/IuvdJnY1DZ+x+4lPhdPL/oiabNwdhM+nvOTGtvhbQ= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=palves.net header.i=@palves.net header.a=rsa-sha256 header.s=dreamhost header.b=KusoWTRE DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 344794BA23CC X-Sender-Id: dreamhost|x-authsender|pedro@palves.net Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 409E04C2430 for ; Thu, 23 Jul 2026 17:51:57 +0000 (UTC) Received: from pdx1-sub0-mail-a242.dreamhost.com (trex-green-0.trex.outbound.svc.cluster.local [100.104.243.149]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id CEA724C189E for ; Thu, 23 Jul 2026 17:51:56 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|pedro@palves.net X-MC-Relay: Good X-MailChannels-SenderId: dreamhost|x-authsender|pedro@palves.net X-MailChannels-Auth-Id: dreamhost X-Eight-White: 668de99e6e8ef5f4_1784829117175_4179211243 X-MC-Loop-Signature: 1784829117174:1115418552 X-MC-Ingress-Time: 1784829117174 Received: from pdx1-sub0-mail-a242.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.104.243.149 (trex/8.0.2); Thu, 23 Jul 2026 17:51:57 +0000 Received: from localhost (bl20-181-64.dsl.telepac.pt [2.81.181.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pedro@palves.net) by pdx1-sub0-mail-a242.dreamhost.com (Postfix) with ESMTPSA id 4h5dwr2F5Mz103s for ; Thu, 23 Jul 2026 10:51:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=palves.net; s=dreamhost; t=1784829116; bh=obZnx8fYXzut6OjDpmuBsfHEjmbcMdyXmEWpNwXLJFQ=; h=From:To:Subject:Date:Content-Transfer-Encoding; b=KusoWTRE6NBoMz/UN01ewGtOeYyzvXFATGzJkc8StzWVCmikLBA5L6PU2Xekky5e7 o9Ofj7+kmlCDvsqRSyy/Hslos/h/QH0TsGNcIcXuj5/am5PnsgbMRgvQkN8hjODNZF 1bP//sWkd6QCJhffjS62tykBbI8JoiT4wfnR8fSEdik+p7FRh8tLoASQyyt8/y1V1Y Y/E8jGaTQssfr9KXGyQEfiFgzC4zb7LcxVCzQkdwvG41nklmRn+BY7ikPcchXBPvc/ wEnCa8FAYzTr+pr8GGdQuu4Xm3rKqPLyOk1O7ikI66aQ6lS97bvoQ9P4eKcjWixhtq NpLfqHLwEmLGA== From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 2/4] gdb/testsuite: Factor out dg-extract-results.sh calls Date: Thu, 23 Jul 2026 18:51:29 +0100 Message-ID: <20260723175131.266112-3-pedro@palves.net> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260723175131.266112-1-pedro@palves.net> References: <20260723175131.266112-1-pedro@palves.net> MIME-Version: 1.0 X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_HOSTKARMA_W, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, RCVD_IN_PBL, SPF_HELO_NONE, SPF_PASS, TXREP shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org The parallel-testing targets in the testsuite Makefile each combine the per-test gdb.sum / gdb.log files produced by a run into a single combined pair, using contrib/dg-extract-results.sh. The same pair of invocations (once for gdb.sum, once with -L for gdb.log) is copied in check-parallel, check-parallel-racy, and check-all-boards, each only differing in the input and output directories. Factor those invocations into a DG_EXTRACT_RESULTS canned recipe parameterized by the input and output directories, and use it from all three targets. Change-Id: Ia3417c9410b87a415cb9b104efa60d4bfb9ffbc5 --- gdb/testsuite/Makefile.in | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/gdb/testsuite/Makefile.in b/gdb/testsuite/Makefile.in index f103d7ddd65..fb312583b0e 100644 --- a/gdb/testsuite/Makefile.in +++ b/gdb/testsuite/Makefile.in @@ -254,16 +254,23 @@ check-single-racy: `ls racy_outputs/*/gdb.sum` > racy.sum; \ sed -n '/=== gdb Summary ===/,$$ p' racy.sum +# Combine the individual gdb.sum / gdb.log files found anywhere under +# directory $(1) into a single gdb.sum / gdb.log pair in directory +# $(2), using contrib/dg-extract-results.sh. +define DG_EXTRACT_RESULTS + $(SHELL) $(srcdir)/../../contrib/dg-extract-results.sh \ + `find $(1) -name gdb.sum -print` > $(2)/gdb.sum; \ + $(SHELL) $(srcdir)/../../contrib/dg-extract-results.sh -L \ + `find $(1) -name gdb.log -print` > $(2)/gdb.log +endef + check-parallel: -rm -f *core* -rm -rf cache outputs temp $(MAKE) -k do-check-parallel; \ result=$$?; \ if test -d outputs; then \ - $(SHELL) $(srcdir)/../../contrib/dg-extract-results.sh \ - `find outputs -name gdb.sum -print` > gdb.sum; \ - $(SHELL) $(srcdir)/../../contrib/dg-extract-results.sh -L \ - `find outputs -name gdb.log -print` > gdb.log; \ + $(call DG_EXTRACT_RESULTS,outputs,.); \ $(SHELL) $(srcdir)/lib/dg-add-core-file-count.sh; \ sed -n '/=== gdb Summary ===/,$$ p' gdb.sum; \ fi; \ @@ -282,12 +289,7 @@ check-parallel-racy: for n in `seq $$racyiter` ; do \ $(MAKE) -k do-check-parallel-racy \ RACY_OUTPUT_N=$$n; \ - $(SHELL) $(srcdir)/../../contrib/dg-extract-results.sh \ - `find racy_outputs/$$n -name gdb.sum -print` > \ - racy_outputs/$$n/gdb.sum; \ - $(SHELL) $(srcdir)/../../contrib/dg-extract-results.sh -L \ - `find racy_outputs/$$n -name gdb.log -print` > \ - racy_outputs/$$n/gdb.log; \ + $(call DG_EXTRACT_RESULTS,racy_outputs/$$n,racy_outputs/$$n); \ sed -n '/=== gdb Summary ===/,$$ p' racy_outputs/$$n/gdb.sum; \ done; \ $(srcdir)/analyze-racy-logs.py \ @@ -389,10 +391,7 @@ check-all-boards: all $(abs_builddir)/site.exp "$(TESTS)" \ result=$$?; \ if test -d check-all; then \ - $(SHELL) $(srcdir)/../../contrib/dg-extract-results.sh \ - `find check-all -name gdb.sum -print` > check-all/gdb.sum; \ - $(SHELL) $(srcdir)/../../contrib/dg-extract-results.sh -L \ - `find check-all -name gdb.log -print` > check-all/gdb.log; \ + $(call DG_EXTRACT_RESULTS,check-all,check-all); \ sed -n '/=== gdb Summary ===/,$$ p' check-all/gdb.sum; \ fi; \ exit $$result From patchwork Thu Jul 23 17:51:30 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 139843 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5953A4BA2E27 for ; Thu, 23 Jul 2026 17:53:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5953A4BA2E27 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=palves.net header.i=@palves.net header.a=rsa-sha256 header.s=dreamhost header.b=LyIckBV1 X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from earwig.apple.relay.mailchannels.net (earwig.apple.relay.mailchannels.net [23.83.208.54]) by sourceware.org (Postfix) with ESMTPS id DC2534BA7997 for ; Thu, 23 Jul 2026 17:52:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DC2534BA7997 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=palves.net ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DC2534BA7997 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=23.83.208.54 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784829127; cv=none; b=wR3CtYUQtrnTRyJ34IvFYxqWzqaOfZmhcfXbOAeJ/k1smw0Y6gE4vSDy7XDkMLEoXw7a6OHtlkEWyw4myRXHBmRAuJpn0r3CWvS1aD5xyngLCkT+42yXlzjySZLK4u5piQTh4pCeBMwNoxf46k6n5VLKF+s2PiqOpmuVHQ4JANk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784829127; c=relaxed/simple; bh=7L/htgMRoXK6o7RRm6f050NttsMG1uXjXjezpD0ieCc=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=GIkCGFoDMPLrFnCLeoIl3fGumxKIaOqbUro8IMqSRnDM+yP+mXokIVMLTB6ab9vMj36DRAV1oAdbgOJic4vNd5G5VI9GKcllijLdgVhu8emjhkL2TWDBIt9IC4PeUSxLb/2+21DIFWa8tE5kN4+dFsqqUJNFyF/6URI5lh2CtHo= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=palves.net header.i=@palves.net header.a=rsa-sha256 header.s=dreamhost header.b=LyIckBV1 DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DC2534BA7997 X-Sender-Id: dreamhost|x-authsender|pedro@palves.net Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 97FDA941469 for ; Thu, 23 Jul 2026 17:52:05 +0000 (UTC) Received: from pdx1-sub0-mail-a242.dreamhost.com (trex-green-5.trex.outbound.svc.cluster.local [100.105.0.101]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 4C0C4941FC4 for ; Thu, 23 Jul 2026 17:52:05 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|pedro@palves.net X-MC-Relay: Good X-MailChannels-SenderId: dreamhost|x-authsender|pedro@palves.net X-MailChannels-Auth-Id: dreamhost X-Turn-Shade: 5f42accb59458f76_1784829125542_916003435 X-MC-Loop-Signature: 1784829125542:4169158455 X-MC-Ingress-Time: 1784829125542 Received: from pdx1-sub0-mail-a242.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.105.0.101 (trex/8.0.2); Thu, 23 Jul 2026 17:52:05 +0000 Received: from localhost (bl20-181-64.dsl.telepac.pt [2.81.181.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pedro@palves.net) by pdx1-sub0-mail-a242.dreamhost.com (Postfix) with ESMTPSA id 4h5dx05chgz103w for ; Thu, 23 Jul 2026 10:52:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=palves.net; s=dreamhost; t=1784829125; bh=oMfpOonFeUX5PTqm6gylKcmBp+JfXlQZXN/LjVXnfyA=; h=From:To:Subject:Date:Content-Transfer-Encoding; b=LyIckBV1fOD1MBRaRDWrEKoVv4GMdDA3Axct0UV7JpOH9djDyVXZ7CucVnsXxpP5T rncSv0cRhUZ6a75eoplZ8iw4EI9OrOgnowPjspKuAajc20nP0vltW3s0Qq7tGohwaz bgVf7diXsx2v+nTwlZOw/6RTS4cr4I1hYUjpWEaHpYwH0a9fBDCbhSWRZ0xdCXbj0C JtpiMwdW3jFc7RzqPyGp750mRyaiLWlYzJ6rieWY5I3MqYhHm2ejrTa/gLGg/Jm1hk YCvZXiKX3fXXal1l/OlMyT64DD9G0X6/y2pQToDigaCgAyhwEBvz2+dLE+aWuSMyMp YTIkJvjKA58KA== From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 3/4] gdb/testsuite: Add extract-results make target Date: Thu, 23 Jul 2026 18:51:30 +0100 Message-ID: <20260723175131.266112-4-pedro@palves.net> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260723175131.266112-1-pedro@palves.net> References: <20260723175131.266112-1-pedro@palves.net> MIME-Version: 1.0 X-Spam-Status: No, score=-9.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_PBL, SPF_HELO_NONE, SPF_PASS, TXREP shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org Add a new "make extract-results" target that regenerates the combined gdb.sum/gdb.log from an existing outputs/ directory, without re-running any tests. This is handy after a parallel "make check" run to rebuild the combined results by hand -- for example after tweaking contrib/dg-extract-results.sh, to see the effect on the combined files without a full testsuite run. Change-Id: I67cac742343dd2c6091cf0013343af86cb86a1e7 --- gdb/testsuite/Makefile.in | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/gdb/testsuite/Makefile.in b/gdb/testsuite/Makefile.in index fb312583b0e..f671e90e125 100644 --- a/gdb/testsuite/Makefile.in +++ b/gdb/testsuite/Makefile.in @@ -276,6 +276,19 @@ check-parallel: fi; \ exit $$result +# Regenerate the combined gdb.sum / gdb.log from an existing outputs/ +# directory, without re-running any tests. Handy after a "make check" +# parallel run to rebuild the combined results by hand -- for example +# after tweaking contrib/dg-extract-results.sh. +extract-results: + @if test ! -d outputs; then \ + echo "No outputs/ directory found; run a parallel \"make check\" first."; \ + exit 1; \ + fi + $(call DG_EXTRACT_RESULTS,outputs,.) + $(SHELL) $(srcdir)/lib/dg-add-core-file-count.sh + sed -n '/=== gdb Summary ===/,$$ p' gdb.sum + check-parallel-racy: -rm -rf cache racy_outputs temp racyiter="$(RACY_ITER)"; \ From patchwork Thu Jul 23 17:51:31 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 139842 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DB29E4BA23FA for ; Thu, 23 Jul 2026 17:53:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DB29E4BA23FA Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=palves.net header.i=@palves.net header.a=rsa-sha256 header.s=dreamhost header.b=W4hApxaA X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from lavender.cherry.relay.mailchannels.net (lavender.cherry.relay.mailchannels.net [23.83.223.99]) by sourceware.org (Postfix) with ESMTPS id 993954BA23CA for ; Thu, 23 Jul 2026 17:52:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 993954BA23CA Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=palves.net ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 993954BA23CA Authentication-Results: sourceware.org; arc=none smtp.remote-ip=23.83.223.99 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784829134; cv=none; b=kXckuKg5Zn0GvHHnj+4BGD5ZW3XdRLNlnHggNqXDAfo9iXaWGLVhzcsRZnljyen8Tny5plcze8P2/621tRxfYJHp6M62aSKzHxxqTuK6n7TNxZ4oYqluvdLKhGS0pDN91VD1s5sDJsLUnWjAo5Y6w3I+LPz/BCBVMgr2RzhDEVg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784829134; c=relaxed/simple; bh=ajLc6JNtwoDMIu/4t9vvzCwdU5F4Fhk6R2kuRw8zfeI=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=LNpdZgfFYC7cVI3zQOBAIDFPzed0Ty3Q/4bIPbrzM/PR/OXAiIFLa0FAJd/goPld/B3Dfi11Ky9PgZiv96lKfb/wrhYnVw4uJTKEBLtMmx6b50bFsQClyHAI7oosSX+shmOBywrm1ckHFAMqvVwDr5yITr6S85OKVi8H5tqtP5A= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=palves.net header.i=@palves.net header.a=rsa-sha256 header.s=dreamhost header.b=W4hApxaA DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 993954BA23CA X-Sender-Id: dreamhost|x-authsender|pedro@palves.net Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id B747C640E22 for ; Thu, 23 Jul 2026 17:52:13 +0000 (UTC) Received: from pdx1-sub0-mail-a242.dreamhost.com (trex-green-7.trex.outbound.svc.cluster.local [100.103.100.118]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 679FD641FEE for ; Thu, 23 Jul 2026 17:52:13 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|pedro@palves.net X-MC-Relay: Good X-MailChannels-SenderId: dreamhost|x-authsender|pedro@palves.net X-MailChannels-Auth-Id: dreamhost X-Plucky-Suffer: 66c1d5424385a75b_1784829133661_2302690076 X-MC-Loop-Signature: 1784829133660:1950670124 X-MC-Ingress-Time: 1784829133660 Received: from pdx1-sub0-mail-a242.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.103.100.118 (trex/8.0.2); Thu, 23 Jul 2026 17:52:13 +0000 Received: from localhost (bl20-181-64.dsl.telepac.pt [2.81.181.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pedro@palves.net) by pdx1-sub0-mail-a242.dreamhost.com (Postfix) with ESMTPSA id 4h5dx869rNz1049 for ; Thu, 23 Jul 2026 10:52:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=palves.net; s=dreamhost; t=1784829133; bh=tPQ4h4v3fwBz3LOErNXtHYDtfZM8Ft+FkuFGbBSEJq4=; h=From:To:Subject:Date:Content-Transfer-Encoding; b=W4hApxaAcVUFuxE5KVaxfT3zDsLFcpAPGlQl4quatTOwzLvgbiqKPoPyyFSKCCFTl DYf9yFuIZs5FGj+KPgBPcPOzR3aEyau8q8SY1Bl3aiKn8CjxOd6gpR/JXBVKCFMoPB KAJOI2iWkBaNXpwcbfLO0R/oGGwRKWzXQPbjiz2o4K5BYijFaKZKr+Ij56K79Gzd49 C4J8SfY1KLn/01G5934v0VWSsmxEjvsDfbggjzRwS5O3hiAO1QmflPugk5xeG8eWiG sdXTncS6vHw1irzxqD4gSpK44/9yffa5mSEPkTDsogAhd1KBNeQ8Zy4S0PbUAoAwWw uslYfPWGDEmWA== From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 4/4] gdb/testsuite: Pipe the dg-extract-results file list via stdin Date: Thu, 23 Jul 2026 18:51:31 +0100 Message-ID: <20260723175131.266112-5-pedro@palves.net> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260723175131.266112-1-pedro@palves.net> References: <20260723175131.266112-1-pedro@palves.net> MIME-Version: 1.0 X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, POISEN_SPAM_PILL, POISEN_SPAM_PILL_1, POISEN_SPAM_PILL_3, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_PBL, SPF_HELO_NONE, SPF_PASS, TXREP shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org The parallel-testing targets combine the per-test result files into a single gdb.sum / gdb.log pair with the DG_EXTRACT_RESULTS macro, which passes the whole list to contrib/dg-extract-results.sh on the command line, one positional argument per file: $(SHELL) .../dg-extract-results.sh \ `find $(1) -name gdb.sum -print` > $(2)/gdb.sum A parallel run writes one gdb.sum (and one gdb.log) per .exp, so with GDB's testsuite the whole list is thousands of paths. On Windows with native Windows Python that overflows the command-line length limit (~32 KB), and the run dies while combining the results: $ make check-parallel ... .../dg-extract-results.sh: line 39: /ucrt64/bin/python3: Argument list too long make: *** [Makefile:274: check-parallel] Error 2 ... $ find outputs/ -name gdb.sum | wc -l 2657 An earlier commit taught dg-extract-results.sh/dg-extract-results.py a -f option that reads the file list from a file, or from standard input when the argument is "-", so we can now fix this by piping the find output into dg-extract-results.sh via stdin instead, so the command line length limit no longer applies. Change-Id: I5d8c94332eda9bf49c9b0144dabb846de1102f57 --- gdb/testsuite/Makefile.in | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/gdb/testsuite/Makefile.in b/gdb/testsuite/Makefile.in index f671e90e125..11782a860db 100644 --- a/gdb/testsuite/Makefile.in +++ b/gdb/testsuite/Makefile.in @@ -257,11 +257,18 @@ check-single-racy: # Combine the individual gdb.sum / gdb.log files found anywhere under # directory $(1) into a single gdb.sum / gdb.log pair in directory # $(2), using contrib/dg-extract-results.sh. +# +# The file list is piped in via "-f -" rather than expanded onto the +# command line: a parallel run writes one gdb.sum/gdb.log per .exp, so +# the list can hold thousands of paths and overflow the command-line +# length limit (notably on Windows, where the limit is ~32 KB). define DG_EXTRACT_RESULTS - $(SHELL) $(srcdir)/../../contrib/dg-extract-results.sh \ - `find $(1) -name gdb.sum -print` > $(2)/gdb.sum; \ - $(SHELL) $(srcdir)/../../contrib/dg-extract-results.sh -L \ - `find $(1) -name gdb.log -print` > $(2)/gdb.log + find $(1) -name gdb.sum -print \ + | $(SHELL) $(srcdir)/../../contrib/dg-extract-results.sh -f - \ + > $(2)/gdb.sum; \ + find $(1) -name gdb.log -print \ + | $(SHELL) $(srcdir)/../../contrib/dg-extract-results.sh -L -f - \ + > $(2)/gdb.log endef check-parallel: