Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp828937rdg; Wed, 11 Oct 2023 06:47:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH+uM4Kgn5PNrS7H34zSMGYom204kQZHagbLSo3huVQW6+uy+63XuBkdq1oPVXEwenRGV7W X-Received: by 2002:a05:6358:4297:b0:13a:2fed:337c with SMTP id s23-20020a056358429700b0013a2fed337cmr23666560rwc.24.1697032022443; Wed, 11 Oct 2023 06:47:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697032022; cv=none; d=google.com; s=arc-20160816; b=wDw41E36VIa11F3yPQKI4m8sB34Ev9YJ/8iYwjEGwj9jADcIkgpNJEpVKekJxpg2/9 bV1awWy4ZcVuOcyHyRxA+EaamNgbAkrpAG6f+Zj6fqFeUZ2O55DoyDC+g4SOF9ZXt8R6 0SxG2u8TxkUqRvTV3V1ayoP/FVQfVwfpPrbQsP9FOG/vpwbuNj5tuuISyjefsm9hkOVU KOzMbT54bwI2Zp3hCS/Z9E7GaIYytHm2BRouDWtRwX3eVjmTQAkfxu/33A/IgCtwx1FF MUjBKiU9MFjtwWgox2mJjz4AGck7SgbbDW4kmmIEEKeES5u91fH+7PV9vViEaDsTnC20 ly5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=p6UCNceHOuV04IW+X+h7Oj6O5SM6pFqNphUsXx7LFEU=; fh=3INv4ojhZPr/8lxodP3twRHteGxuDZq0iy+Doksd3Lw=; b=cLBwvwClAbri53Zc00bUN1UfbMe8k4TlRcLiHlSUQKV76zVlvUrxZVTWfWfroedqhj Bz+RdGmTZZB7CTKe/8cPjEatiG4DKIPBJfFjTfMXd6JokZpG8NobEOauA2JZMkoDHjAq GJ2bGScaNkjwzdAeGGNl7x0JSZq4gRPnQ71j2pMvbjkt/5ttUqV5vOdOuTY7P50b6g4F ZqOcuE0O9odLaju0l46/c4nWByOT3nuyYDXh7NqUQ0ensl/1wYe3PPKG7xQXzJgXgMA6 CxxxsYyY7hcwawgcolhCkIm0Yc0aKZLmaMdNTfG6yZiMz6WgXSA/40q4lzEwKMsZJiF8 g9Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@inria.fr header.s=dc header.b=ICKt+cZe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=inria.fr Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id d19-20020a056a00199300b0068ffeb6a949si12393612pfl.73.2023.10.11.06.47.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 06:47:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@inria.fr header.s=dc header.b=ICKt+cZe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=inria.fr Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id BF41980A4AFD; Wed, 11 Oct 2023 06:46:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346930AbjJKNqm (ORCPT + 99 others); Wed, 11 Oct 2023 09:46:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234904AbjJKNql (ORCPT ); Wed, 11 Oct 2023 09:46:41 -0400 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3EE6B0 for ; Wed, 11 Oct 2023 06:46:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=p6UCNceHOuV04IW+X+h7Oj6O5SM6pFqNphUsXx7LFEU=; b=ICKt+cZe+4JGa4EZFRys4MWKoQ7+kqqek9WVP/KK/FkxVCW9vQBl6JRB VNXnPlZcWAAiekWTcAUke2d1hQRah9Zn0bTtX81mLSvg/Q+nkPhkz9lGn kaYxUxWqPxBui5hlnl29ffxpH4ZCUtY71LdijqaJCATiq7Q+aMxHiSe5p c=; Authentication-Results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=julia.lawall@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="6.03,216,1694728800"; d="scan'208";a="130688632" Received: from dt-lawall.paris.inria.fr ([128.93.67.65]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2023 15:46:36 +0200 Date: Wed, 11 Oct 2023 15:46:36 +0200 (CEST) From: Julia Lawall To: Anton Eliasson cc: Nicolas Palix , cocci@inria.fr, linux-kernel@vger.kernel.org, kernel@axis.com Subject: Re: [cocci] [PATCH 2/2] scripts: coccicheck: Separate spatch stdout and stderr In-Reply-To: Message-ID: References: <20231003-coccicheck-v1-0-07d2d900a52a@axis.com> <20231003-coccicheck-v1-2-07d2d900a52a@axis.com> <5c76da14-e34e-afbd-4265-493c66e0bc60@axis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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 fry.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 (fry.vger.email [0.0.0.0]); Wed, 11 Oct 2023 06:47:00 -0700 (PDT) X-Spam-Level: ** On Wed, 11 Oct 2023, Anton Eliasson wrote: > 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. OK, thanks for the discussion. I was also thinking about whether it could be possible to make the output always come out in the same order, based on the name of the analyzed file. Maybe it is possible. julia > > > 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 > > > > > > > > > > > > > > >