Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp811381rdg; Wed, 11 Oct 2023 06:19:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IETnDaoBhvwpj+Mm+SMwHctB1eAiGqAFDmxx5W3lhNkdqNdFDYJDmtNKuScanKd9O9S5D+y X-Received: by 2002:a17:90b:3905:b0:273:f138:29cc with SMTP id ob5-20020a17090b390500b00273f13829ccmr17867725pjb.35.1697030363508; Wed, 11 Oct 2023 06:19:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697030363; cv=pass; d=google.com; s=arc-20160816; b=p/FNWJCnEvPSd0XWXDmcMLxg9Z3TmpPpE5U2LIeK9qLQHBQxmbsoUA1XL1TLA8yzaI V6EzEMy9eSTM+PqJ+mmzkjlM5q5ep7GPQYwOnh+zRet0IEs0qdq2EYQsBtAueYk3oee0 BIXEWnR4fdMZxRKb8ZJqUrzEx6IKxWIQqTmv9n9l/JCgwKuAK0TzBSu2TipeUzdWbhH6 HDqKyLm0DDRjOWP4Lksm8J5dWWFHbpT2lXxDAU8qnL8CQ1ffrvzE7Z1lXKSLkha1do9/ hJjRElgXoKoae+a1Aj2XGwK0FwxhyR5GD+CdEAAEZxTodnt6J981dsZKGqf0700tVoXr pGxw== 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:content-language:references:cc:to:subject :user-agent:date:message-id:dkim-signature; bh=0nLtVZBK2uK1oS5PxAZ18Ukh96EKOU5KZtz6GTGg+8k=; fh=ckIJLRXIh4/zdc6QLLPgXwaNdh65ZXH2eAbVqElRXQ4=; b=jLHRrMRtdoI0Imrx06Cku+A5vUjE/VYYlFTv7KWHY9V+9J5VPV49UaLkwEXrr4sslD CQiCpYXNcU/6CHkoGPLQRpumNyYrYrzy0GhMLOdUt47icy0cqbIICLdWkHAm80CvhjQY 6Dx/vqya0y/yI5qXW5fSfVWhu88jRQR5V3TbzFVcfrYEy5lzIUuc38VUfCgX3rEwLoag ZF2jVXeypM1Vbg8IxgptwR4nAZ2s2RSetbbGKofb9CnNPgdr2bkAM3iUcu51Ms0MSwSF CzFt7CWcqcaswqasAmb/JFnaRc1fsBQNx8Do28uPXGUpmVwDfiPFmc6CnTyUc5CAM0tx Hd/w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@axis.com header.s=selector1 header.b=OIyjPU8R; 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.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id z65-20020a17090a6d4700b002776a60ea68si14594850pjj.1.2023.10.11.06.19.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 06:19:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@axis.com header.s=selector1 header.b=OIyjPU8R; 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.32 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 agentk.vger.email (Postfix) with ESMTP id C67658135CE4; Wed, 11 Oct 2023 06:19:20 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232299AbjJKNTM (ORCPT + 99 others); Wed, 11 Oct 2023 09:19:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231976AbjJKNTK (ORCPT ); Wed, 11 Oct 2023 09:19:10 -0400 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on2059.outbound.protection.outlook.com [40.107.13.59]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F4A593 for ; Wed, 11 Oct 2023 06:19:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BPb6CSznNFmTGyLZ/VMcBGdM8IZIstMcoFSIFB1YVGuCJfz5GL42WuuS424FqmkM1oqr2MDiFdq/QQR3+36t9MCfx1/z2sidsNtuNAU5uVQXWK5ghRL2jkwNbQXnls8zfHF/PhJDhUnmDFOWbrKJZIrIl4oZXj4kIoDaiMUcsKyF3vo6y18yhRhpa6vybIw9wnvts/0dZWD3Ii11wepQC7LeSeItXnK/DJzftEJjABU0lPzAbET+4jkAEN2YjKipYjaz3O6eyW7RNPwSP8heMdp0HzHmlqprIuHdNMySBNoA93U4W66XKd6uEroRQ9KcNOf+jBYUypPEfU9s2+ymAQ== 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=0nLtVZBK2uK1oS5PxAZ18Ukh96EKOU5KZtz6GTGg+8k=; b=KBoO6vySL4wcWI4cRds6a3oq75Bx23NeaJ3TV1z0Dyn0J/8jN+UFLPkAsPAvWh9bGzenOurp6tpBdPPvnYcl0v7FCIlUGs1wnrhRCH3XP61Q6jbvglffDxytA2CdU94NqxQno/ZYc72TWHckg8GdRdBSjcq28b+w4KAZJP3fQnMGDOHhYHwS3kxg8ObOyRPE/E7a1nGFJ6WNPOKbOcKvnt6PLfi3ptniBGSMP0kqM58E2lEvkYt4PZHFQi4F/KCYSUCLCX52PVq/gkelzRIgPcRuzfAa4MSnAD7ZoubQZ6SDIjb2d6IDfJiPDlxow6Qb5AjQXTnknpyhh04bDwGD6A== 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=0nLtVZBK2uK1oS5PxAZ18Ukh96EKOU5KZtz6GTGg+8k=; b=OIyjPU8RTmVZLbBYqWWP7zH2CQu9XEVcUxb+y//akNmGSHErIBBwX9sHVZGoPF2Zd2TCsblnwYJ+3Yy277oTmTgvQet6rq/ZeOTHg6fRxwW11vBAzarSzLdhs48xEpZqS2dtcSYUhWlUh2jb3Ss9sO4h0U5CODVhq9G09/mKHmo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=axis.com; Received: from AS1PR02MB10348.eurprd02.prod.outlook.com (2603:10a6:20b:473::13) by PA4PR02MB6894.eurprd02.prod.outlook.com (2603:10a6:102:f6::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.38; Wed, 11 Oct 2023 13:19:04 +0000 Received: from AS1PR02MB10348.eurprd02.prod.outlook.com ([fe80::31ee:1e73:e80b:d9ce]) by AS1PR02MB10348.eurprd02.prod.outlook.com ([fe80::31ee:1e73:e80b:d9ce%4]) with mapi id 15.20.6838.040; Wed, 11 Oct 2023 13:19:04 +0000 Message-ID: Date: Wed, 11 Oct 2023 15:19:02 +0200 User-Agent: Mozilla Thunderbird Subject: Re: [cocci] [PATCH 2/2] scripts: coccicheck: Separate spatch stdout and stderr 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> <5c76da14-e34e-afbd-4265-493c66e0bc60@axis.com> Content-Language: en-GB From: Anton Eliasson In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: MM0P280CA0004.SWEP280.PROD.OUTLOOK.COM (2603:10a6:190:a::18) To AS1PR02MB10348.eurprd02.prod.outlook.com (2603:10a6:20b:473::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS1PR02MB10348:EE_|PA4PR02MB6894:EE_ X-MS-Office365-Filtering-Correlation-Id: 031c0a5d-e905-4071-fb31-08dbca5ca43e 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: cvfJ/M+NKcv+LMrpbaoFppRJ2MBlc/LcsFIXEDybWAu1wHw746WHLYtV+sCOpNLILLhvhb5Nv8pV0lJJqQNeC6SG9LY27I2v8CJ48fI19GMS9hkPzEMjgvjakUPSNq50eKJm7Q3dwvED3pY5sulpcXsRnynUhG9nVCL0O8jO6QX9SuVbBLuL1jA7rmNfRCndx+pa5ORSHOW6leijK8tkkfM1/gup8Vua0sttO+0nc7fKQHYWidR5l9y9UCFpiprnF4T3VCAKmad/UiZHAX0ebHCbDulFt6cimneFjq/PKYRSm9RRaDUTFmWdSgwHecThC8UDR6+86QFa1ZCYgy2qRx7S+V0FGxpp4sNyPPN9RieCgA2zK9a8Hoopd52SBpEex27HwnF6yuERvQh7fIlJ6hle2eRttTinZixjJi7MZOt/cLDUgEa9qSnhh9hposAM+HpbmtAMJYVXLP8nFCttGJIjinVzlcx41d9axdv+8zE6q6X5CGLRfYjbN/E9zSoIREk8lv9JPoalAnUzftuRhr/ahnLEDGE93xKPFYIJgaOXiBsozPAoEcCm5G37ORv9oEORoDV4Af/JwKrZTyKct7Rf+YqIlQb/00e1f2N0UOmNX4okHLo0mk7oSoGDTitVaupM3o7gJvsdNzYbQNrqIg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS1PR02MB10348.eurprd02.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(136003)(39860400002)(376002)(396003)(346002)(230922051799003)(186009)(451199024)(1800799009)(64100799003)(26005)(107886003)(66899024)(2616005)(478600001)(36756003)(6512007)(6486002)(6506007)(86362001)(31696002)(38100700002)(8676002)(66946007)(6916009)(316002)(44832011)(4326008)(41300700001)(8936002)(2906002)(5660300002)(66556008)(66476007)(31686004)(83380400001)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eG5aRDZJV3NBK0hLREx1VS8rNEZvazhZU3U2NTdSS25aTmRNT0pxNXI2czJV?= =?utf-8?B?UFhTNUdFMTcza3BGcFVuZlF5clErNVpnQ1NjSVR0THlpMWdqUGd3NFdtb3NI?= =?utf-8?B?NEwyOWVwU2VvbXJsdUVNWWdkRnZEUkt1elhXYWNkNzdmc2lMOXVoVWU1MU1m?= =?utf-8?B?WG52aGxiNHE1MVdTWGhRNVd3S2pUYU54K2kwV1dYNXVLN2sxeGM1eFdjSGpK?= =?utf-8?B?V2NES1AyUk5NUUd6TnNtUjREZUd1aWV0WVVlZVVDRHpHeVpXakxPbi9qc0du?= =?utf-8?B?MGRjQ2pHc05tcitsL3piSklmam5LdmJBcU1abW9FZ2VmN2c0YUJCZTFUc2NH?= =?utf-8?B?Mk51L1ZMRGs1WGZFQUtNWn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rossTenant-Network-Message-Id: 031c0a5d-e905-4071-fb31-08dbca5ca43e X-MS-Exchange-CrossTenant-AuthSource: AS1PR02MB10348.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2023 13:19:04.6904 (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: 1o4JGQuVN/6i7ZfeSRXQGIaNk39ydQJnTxVu2MuX1dQl/T5NntZqpQJIXmmn7hWD X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR02MB6894 X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Wed, 11 Oct 2023 06:19:20 -0700 (PDT) X-Spam-Level: ** On 10/10/2023 18.11, Julia Lawall wrote: > > On Tue, 10 Oct 2023, Anton Eliasson wrote: > >> 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. > Why does the command line pose a problem for sorting? > > julia You're right. I was overthinking it. Since the sorted command lines will be common for the two runs they will disappear after diffing. So at this point I don't have any need for this patch. I'll reach out to you again if it turns out to be an issue after we have gotten the continuous integration check in place. Thanks for the feedback and I'm sorry about the noise. Anton > >> >> 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 >>>> >>>> >>