Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp240697rdg; Tue, 10 Oct 2023 09:00:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGwAbwadyMvktWs+Yotftu/rSUV26G8hTe7xb0VC/HobrHh5f0BCpZMT1DlZ9RPt4bG74iA X-Received: by 2002:a05:6830:4c6:b0:6be:e447:dbd with SMTP id s6-20020a05683004c600b006bee4470dbdmr16913851otd.22.1696953600510; Tue, 10 Oct 2023 09:00:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696953600; cv=pass; d=google.com; s=arc-20160816; b=icojtQecvToytNB+IKxBxmaeBNXUhq0OSstvQlHtt5dWNErAE/MX6C3XdbgrOlVPFi DHmfQwg3s3Fdql0a7Nzr04qDBil4shz8DU3ufnFkcJsqIfPKPE8ZCaOeCAw0n4Y2uwIo YKcXmfCLsmpNAlzakzxrVRO4oP856fvdogGvbiWv4OyKFXvZlAc2RrTdRpM+eRGu6Q/h uNvuxdgcdCoD9dc9Yl/+w7CD3v9wtN583KvUiMCWlytvXHWdeN5VWfZJYlwdx5C24e/f O64GNhmBzXczvOKND36vJh3EQ+qxldMB8UdhgqviAV1wtL44BzX6urNfpmUPCSks+Y7T 72Gw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=Jc77ksfFaK1feRPbUxPxul/ob2OaEWjXWEBn10A+q2k=; fh=ckIJLRXIh4/zdc6QLLPgXwaNdh65ZXH2eAbVqElRXQ4=; b=Xz0j47EY3a9nJ5UFHLKMhp+ILJZe9gPzxgbtbO8SyfQlGMSD1EKa03SW/a+bhjGZxL LZt/bhYDNCiSLALe/71Mtcr96kyjqQapSSYbSWHmdah8YtDN+OLKY8HivW8IHGi60eCl HtCJeLz1hOpsHoUZgifYYh7voJQKu+IMBNyw2ri5In97yRDUGkeDEg5pS9rMKXnxz9Ln oh9ugEyLbhNH+CEeH9oxfimQYkVWElqw5ZOjUJ4ZCTmm361l4LnaqlgYNXR/NfRv4NpR +lRw5BySaLJQDWdh8EiiHU+FkDlitSUIv2trckXOaCbd3oJvTuy/VOF3r/KDwvPZun/L FPdQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@axis.com header.s=selector1 header.b=Qt5j3o2W; arc=pass (i=1 spf=pass spfdomain=axis.com dkim=pass dkdomain=axis.com dmarc=pass fromdomain=axis.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=axis.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id s194-20020a6377cb000000b0058988e09e36si10240862pgc.190.2023.10.10.08.59.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 09:00:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@axis.com header.s=selector1 header.b=Qt5j3o2W; arc=pass (i=1 spf=pass spfdomain=axis.com dkim=pass dkdomain=axis.com dmarc=pass fromdomain=axis.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=axis.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id C870B80267C9; Tue, 10 Oct 2023 08:59:58 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233659AbjJJP7w (ORCPT + 99 others); Tue, 10 Oct 2023 11:59:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233705AbjJJP7q (ORCPT ); Tue, 10 Oct 2023 11:59:46 -0400 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2058.outbound.protection.outlook.com [40.107.22.58]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F04E9DE for ; Tue, 10 Oct 2023 08:59:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CB2MhJTx/sJ9vjodkd8CcxHx29grGak+lstSwCdiZLyitg/BGfISueOvAksE5nx4vs98eBGDhsmXNJK2gI/84oP6jtORbO0lkcduq5fmgN7C1P+T1Hbr85BeI8FnEzc8Wd/Guf/nbhvWQi5iNM7Wa9uMkxq1TJuq7H9xn9t7juW4E0l2Okiuu+0pJe2F+u2xAzDkhmVXRJfxczlyCyuEorjT84g7qUwky+KteRkCWnJbYKmUEWX98+rXoWHeDqivyKc7MipuyFbOYn2pS7BmTvNeM3B7WAmacBeG6UTKe59CVPBU7VOYRO05thFvvZAfbYxnX4n4ij+0KqhwEpJYRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Jc77ksfFaK1feRPbUxPxul/ob2OaEWjXWEBn10A+q2k=; b=nGXr/IEJYDWT7I/mjiCithcXdqBz0V9/tKwPilJyH+DNyDtE3VGYxHnx1iBjqaVaUnzjS4ukQcHOEuEB0m0AO3jfWsCHcALPrQONLRjCvgTTcpcC87g1nb7Ftt4qEvQEcNjogk2PcvQRS9FGde0m0IcEVpI18B/Y7c0I5U8dFH8+w6mzv6Ri+4IqYFAaIi1mW3+X013GxOtgHkKj1V1I+UZBapXjt6k4Ul/aj8ZCOTHeQEizOMIefWc3nAJRp24Mc21SwCUrKfB469YJuWEp+jmyvhI/JMi8b40pHbWzbVXJYvF0C10r+PwPsMpNOT1F2HTOEdOl/mrDDUyV0IwcHg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=axis.com; dmarc=pass action=none header.from=axis.com; dkim=pass header.d=axis.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Jc77ksfFaK1feRPbUxPxul/ob2OaEWjXWEBn10A+q2k=; b=Qt5j3o2WddG7Alfrbd1lTUEC0usa0nTlzuD3v3YDFrCCenkzW29cU2bKkoLB1WDNvI7nD6cxLKhO5goSyytlRi+0xA7oHAxzaeMaM7iBuBu4P5YvZSXqWPNHh3y1kmA1XmxcbPLp7C2cEegY8ieFzSJK9v1k4W4CD4Yji3wz5y0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=axis.com; Received: from DU0PR02MB10338.eurprd02.prod.outlook.com (2603:10a6:10:317::22) by PAXPR02MB7248.eurprd02.prod.outlook.com (2603:10a6:102:1c7::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.36; Tue, 10 Oct 2023 15:59:41 +0000 Received: from DU0PR02MB10338.eurprd02.prod.outlook.com ([fe80::fdb5:ecdf:a6fc:64b7]) by DU0PR02MB10338.eurprd02.prod.outlook.com ([fe80::fdb5:ecdf:a6fc:64b7%6]) with mapi id 15.20.6863.032; Tue, 10 Oct 2023 15:59:40 +0000 Message-ID: <5c76da14-e34e-afbd-4265-493c66e0bc60@axis.com> Date: Tue, 10 Oct 2023 17:59:38 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [cocci] [PATCH 2/2] scripts: coccicheck: Separate spatch stdout and stderr Content-Language: en-GB To: Julia Lawall Cc: Nicolas Palix , cocci@inria.fr, linux-kernel@vger.kernel.org, kernel@axis.com References: <20231003-coccicheck-v1-0-07d2d900a52a@axis.com> <20231003-coccicheck-v1-2-07d2d900a52a@axis.com> From: Anton Eliasson In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: MM0P280CA0013.SWEP280.PROD.OUTLOOK.COM (2603:10a6:190:a::19) To DU0PR02MB10338.eurprd02.prod.outlook.com (2603:10a6:10:317::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR02MB10338:EE_|PAXPR02MB7248:EE_ X-MS-Office365-Filtering-Correlation-Id: e5007308-7631-4a07-3a4f-08dbc9a9e98d X-LD-Processed: 78703d3c-b907-432f-b066-88f7af9ca3af,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: e6rIqNUsBerGVWxz5angfMMMZbMU3c7UquLeijWQqj57nnnuQhuzj/dsyfho91jt1W7fqpfzG6P05XzaT/iRbFKUd4FYu61ZcJ1TQib8HRnrITFYRYaopbWuM99EUoqPb0CozBSvGOfP9toIPktNALqFcIaAB16eILLbzG2RVyRsR8Z9fy3d7cWZ4gL/9DgsbBNq1u6bHuGvXl2cEUw50q1UrDR6dJV4o4d3+wJuzritc3F0MQS2KWZjcWBtFTJPQZgB1VP2ahKPjhD4PIXwurh7b9q4svgSHBNbExIR0kqHHIXpIXAcOrWBEGMX30iwVTkgXVBJEnSqy7FmulrA0rJX/xNL7M1zQ5BsceZmZMu0CHuK6G/a5sc/Es9v5DiPGl3KHNwoB3RekfoWkmYFnZBoxL3YZOVVvXToWTnL3L7RqxfMx72twQJMXC/+iAzKOvDn6bXuJZyZv4xM0L0+ZEA3c2WRzX+GWwJOhZK0UduC86hu7j56Ivrp57AdhCI0uGa2X/FhRHkuI9DRKb3Gq2PuO+KDjoGQOO6U3dVIP3ySKhlOCkcCs8Pf9l1aw4xq9XbUL1SAPkzj787ho8kKujO/pf0obZTle73OvijVTYm/TbyHdJxkbKqgbkAEXA1m+Fqgl7bmunOqJqdziIMYkg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR02MB10338.eurprd02.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(396003)(39860400002)(366004)(136003)(376002)(230922051799003)(1800799009)(64100799003)(186009)(451199024)(31686004)(66899024)(107886003)(6512007)(36756003)(86362001)(31696002)(38100700002)(26005)(44832011)(2906002)(83380400001)(6486002)(2616005)(6506007)(478600001)(8676002)(4326008)(6916009)(8936002)(41300700001)(66476007)(5660300002)(66556008)(66946007)(316002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bTdFdDl4RHMxbWxZZHRic1RXTFRtUTRrVDE2UEsxRW1BWnNld21WQUg5cXND?= =?utf-8?B?c2xrQU4xb0RYZXM0azNvMVc5K3B5NGZncExzM3k0WDBxbVdoMzBIQ0JteitO?= =?utf-8?B?V1N5eS84b3J3dmdaT1pzc0VIbHprZzNUVUhkYi95WmhvRW1oY0lvalU4QVBG?= =?utf-8?B?NDJHdG12UmRkeHlydENBQkNEb2hpekFyM05xajQrVkhIY0FFbnRBNmtRMDUy?= =?utf-8?B?U2NyRU54Mk0wd3BSUzl5YjdwNnNPUFZhczdBc29tdldRU2ZkNUwwY2NSRFZi?= =?utf-8?B?WFpXQnNDOURCamVla2RDRVdIQWFFL3IrQTZtYTVkd0dsVU54c2plNWhvWkFL?= =?utf-8?B?am5aNG80Y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4f-08dbc9a9e98d X-MS-Exchange-CrossTenant-AuthSource: DU0PR02MB10338.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2023 15:59:40.9360 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 78703d3c-b907-432f-b066-88f7af9ca3af X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: JnFlCfVExXkhVfnrFJTsMe3qRTMQSgz6VoNQ6ONWWi2HtKHpLQM7duqw3Yq7KFNc X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR02MB7248 X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 10 Oct 2023 08:59:58 -0700 (PDT) On 07/10/2023 21.41, Julia Lawall wrote: > > On Tue, 3 Oct 2023, Anton Eliasson wrote: > >> This helps automating coccicheck runs by discarding stderr and only >> looking at the output of stdout. In report mode the only remaining >> output on stdout is the initial "Please check for false positives" >> message followed by each spatch warning found. > What is getting dropped is the spatch command lines indicating the > semantic patch. Is this desirable? > > julia It's not ideal but it's the best compromise that I have found. The problem I'm trying to solve is to be able to diff the output of two coccicheck runs and notify the developer if any new warnings were introduced. That requires the output to be stable. spatch is always invoked for each cocci file in the same order. However, the output from each spatch invocation is not stable as it examines each source file in an arbitrary order. My workaround is to sort the output before diffing. The line-by-line sorted output only makes sense if the input is one line per warning found and that is why I try to discard all output except the single line per spatch warning. While the terse output doesn't tell which semantic patch file generated the warning, it does usually contain the offending file, line number and a summary of the issue. Anton > >> Signed-off-by: Anton Eliasson >> --- >> scripts/coccicheck | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/scripts/coccicheck b/scripts/coccicheck >> index 95a312730e98..7e7c44125f47 100755 >> --- a/scripts/coccicheck >> +++ b/scripts/coccicheck >> @@ -146,8 +146,8 @@ run_cmd_parmap() { >> echo $@>>$DEBUG_FILE >> $@ 2>>$DEBUG_FILE >> else >> - echo $@ >> - $@ 2>&1 >> + echo $@ >&2 >> + $@ >> fi >> >> err=$? >> >> -- >> 2.30.2 >> >>