From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 0KJLNHzxGWq0qycAWB0awg (envelope-from ) for ; Fri, 29 May 2026 16:05:16 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=VAw8owaS; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id C02D11E0A3; Fri, 29 May 2026 16:05:16 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_SBL_CSS,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=no autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id DD10A1E024 for ; Fri, 29 May 2026 16:05:15 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E4B8B4BA7982 for ; Fri, 29 May 2026 20:05:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E4B8B4BA7982 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=VAw8owaS Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 5E2614BA23DE for ; Fri, 29 May 2026 20:04:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5E2614BA23DE Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5E2614BA23DE Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1780085052; cv=none; b=cXk1UkBgnrXEK0gy6zyStXWukSL6Jdx5ZGjv3LApGV4Vk0TLikd4Wb+STcMobcZhGD6PetZ4ErE/kEeFTfP4KfzzgUdxVDBdt73VqD/jQ36F2z98VQnyvCtc+VlDecnRGToFNgIr1k5bsCa9zTPjGXZ0fcYBYHx61wSaf/U7O+A= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1780085052; c=relaxed/simple; bh=VusMrZkeJ5Xbycp7rcN/jFKOZ9K1PKaexAe8eBKSzJk=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=F0NvLBZvCy72cVL2KvFeDLS+R+6G4lbcqBAcGAFDTqi9RkJIPyNRbXvF/ABjEZ6QGu9xeaYK7vAA0TWS2U3UYiKYmi0RiD16DzAhyS/P+0c/My2lmtZfPf7R25KHIYU2ZaI5f8XUwm6WVC8A/NI8SF5sCpABTPk78lXJtncUFYQ= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=VAw8owaS DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5E2614BA23DE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1780085052; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+2muevQXeiDLu3GybOHIlinxhelll96CUrVz+2ip4J0=; b=VAw8owaSbBhDN+dlw1jJIh449ozMqaA++RAiOJb6fEuhdwFKk/7uF/K6evRF3L2nEgEliP kLIpuXZp7hRoEyGFXni8j67n/5tmUPTmjEJk56JgP89y9hVBHVyBWE+bCrIk56wuO9iCjX P2fr4Jcqb02akXrDgYS70NgTajRa5w8= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-33-OWSSktsTMWe7Z3YVtI-CSg-1; Fri, 29 May 2026 16:04:08 -0400 X-MC-Unique: OWSSktsTMWe7Z3YVtI-CSg-1 X-Mimecast-MFC-AGG-ID: OWSSktsTMWe7Z3YVtI-CSg_1780085047 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 00B92195608A; Fri, 29 May 2026 20:04:07 +0000 (UTC) Received: from f42-zbm-amd (unknown [10.22.64.64]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 73A8030001BB; Fri, 29 May 2026 20:04:05 +0000 (UTC) Date: Fri, 29 May 2026 13:04:03 -0700 From: Kevin Buettner To: gcc-patches@gcc.gnu.org Cc: Andrew Pinski , gdb-patches@sourceware.org Subject: Re: [PATCH] contrib: Make dg-extract-results.py tolerant of unparseable files Message-ID: <20260529130403.249b662b@f42-zbm-amd> In-Reply-To: References: <20260514181502.2841511-2-kevinb@redhat.com> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: RANdxxVZtGTHZ8ZmFI0gTCjyUxdep72QEdJxlfsKNsI_1780085047 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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~public-inbox=simark.ca@sourceware.org On Thu, 28 May 2026 16:35:31 -0700 Andrew Pinski wrote: > On Thu, May 14, 2026 at 11:18 AM Kevin Buettner > 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