From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2610:1c1:1:606c::19:2]) by sourceware.org (Postfix) with ESMTPS id 1AA1A3857340 for ; Thu, 23 Jun 2022 22:09:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1AA1A3857340 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=FreeBSD.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits)) (Client CN "mx1.freebsd.org", Issuer "R3" (verified OK)) by mx2.freebsd.org (Postfix) with ESMTPS id D3E3D90E98 for ; Thu, 23 Jun 2022 22:09:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LTZCm5Nh8z4qpC for ; Thu, 23 Jun 2022 22:09:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656022148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vbU8qKFeQdYDtqPtrJH6CmJMfnXwb8csc0JHIPhaQ0U=; b=fkGynhNNqWdAVTSQzXfTwD50KyNiPCGWWSdPLzRRkFL9QIDDsg/3HBJhq3/6ATmci0O3b5 azpRS5B9PmB1DrHzrT4UDDKY0ZzTpTgSjytsNbyOlaGNkNPiRViAuX9kaNSoDHogoDDucO PHKmMTfptmhHqTmtFBdTul2DCVSncyKjYoqCdam5Yb8OUj/3vpslIpSIrodDDnrTZj4Kbv zvXrvY/eJ8c+Z/Bz1AfSbEtmbj22d7Zf7K0cPz42XMjyq+vyy2QKbLsl6FUsfFXaMhjC9f z4C4vZoq5cC/mZepov4Hq/hNa/T8x0VcArTzN0xRzwAQWmkl8IBtYIf93KbJtw== Received: from [10.0.1.4] (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 6AAB42D45 for ; Thu, 23 Jun 2022 22:09:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <9c1ff5a8-a08f-3994-f25e-416ad0b483bd@FreeBSD.org> Date: Thu, 23 Jun 2022 15:09:07 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH 2/2] Include count of unexpected core files in gdb.sum summary Content-Language: en-US To: gdb-patches@sourceware.org References: <20220623183053.172430-1-pedro@palves.net> <20220623183053.172430-3-pedro@palves.net> <2d2f3af3-a9d2-b84e-d0db-14585a6ae3db@palves.net> From: John Baldwin In-Reply-To: <2d2f3af3-a9d2-b84e-d0db-14585a6ae3db@palves.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656022148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vbU8qKFeQdYDtqPtrJH6CmJMfnXwb8csc0JHIPhaQ0U=; b=ofh0+zosXA3BV7V2G12J3zDsSe63UMQ/XjrP3a+PZ681PMPmJm7FBT2+3R+mK4aS23qCb8 Or+krjtOlD0Erj8FKI6rc1jNyXLcqJYjiZRAGZjEd3AsFJtg5zx3ZFSP+3lybUPJVRzgTy SFzzVEN7FMxVzPtuys3e39JEi5LKu2lCyTrhtew7uZnpeYwPai9Uv6dJQF6Q34Sq8jNCHN sy3Zc2k5UrqYp8FjIvmW66cKNw/O/DTRZQJ96MF8fTYB1lod3bv8r2V6buzD2lHiosjiEV UKUR4ZrvaDpX6PR04QT6AC4qK2f6xnb5uo6kZLm4ZQLsA7xsKmDciFeGsh9MyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1656022148; a=rsa-sha256; cv=none; b=Nhm1NOKQde8adfMVv/XdFWhHMSFEMOoIKQRCdC0iMfZsdnnEpF/llx1xaJQ7LUE5IPeRyg RBwNmRDkWRRO9tU6i/tdkLJhHGQWEkoRSxDrGjAnsQclOK/6jYy4RFu7DEy2+1KkueTPTV pEhKFqw6X2TFapHFdyh3Q5LNB1ZClxmFZ9733n4QEUOcXrVaWahzUpAtsYa+y4RpQjHY1L rwWBKIw8zi0ntBMsXhxxlSEW3HR2ZGk4DfQnJlm6u2dJbwz3v3HwuV3B0nvXeLIH2MJbg6 59/RFj4auxvibZW/enGaSBjOh3ieCRLrjyzDIDyryk+1lRFal3R9qMUTcnMGvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jun 2022 22:09:13 -0000 On 6/23/22 12:12 PM, Pedro Alves wrote: > On 2022-06-23 19:30, Pedro Alves wrote: > >> +# Add our line to the summary line. >> +sed "/=== gdb Summary ===/{ >> +n >> +a\ >> +# of unexpected core files $cores >> +}" -i gdb.sum > > I knew this -i wasn't portable as is, but then forgot to fix it before posting. I now tried > the script on a FreeBSD machine on the gcc compile farm, and tweaked this so it works with BSD > seds too. That sed invocation now looks like: > > # Add our line to the summary line. > sed -i'' -e "/=== gdb Summary ===/{ > n > a\\ > # of unexpected core files $cores > }" gdb.sum > > If -i doesn't work elsewhere, we can just do: > > sed .... < gdb.sum > gdb.sum.tmp > mv gdb.sum.tmp gdb.sum > > Here's the updated patch. Thanks for testing on FreeBSD. :) I like the idea. The only thing I see is that you might want to use a pattern of '*core*' to look for cores instead of 'core*.'. On BSD's at least core files by default are named .core (e.g. gdb.core) and don't match the 'core*' glob. If '*core*' has too many false positives perhaps you can use 'core* *.core' as the patterns to look for? -- John Baldwin