Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1712470pxk; Sun, 13 Sep 2020 13:16:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxx30I8iZGHq1rKxzI4sXrF45Rni1YGLmPFghKhtgGeXarln2AmrHPeIndGOReW31eJsWyN X-Received: by 2002:a50:9f22:: with SMTP id b31mr14256062edf.345.1600028168419; Sun, 13 Sep 2020 13:16:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600028168; cv=none; d=google.com; s=arc-20160816; b=llImYLXDJol6OeQrYm1a160cQIQhXAp1106BazjLexs3grA9IGYWRjnBoI/r9laKk4 hJKILpOx4/rvDTr+4ie/TzYKfxGl6JRB6Pp44Hr5GIYziHXxxkdTScwteCP2A1XUt8rh n0u6hI84oJ1i5c0mPc5KR1dnC1pdooNIwbVXsMl0nJHcCnB1i+fiyeAtEbiRc7HWwZXX k4jFdx0bGaVrBL7aIdKoG2dKCXdjmSp+z2Wi7JtAe6QEij+NlbpMx2yvj8qTFtRLVu21 a45qrIe+3dnPNjT0nc329F5l4awM6ukz+ZvRrYapPHVWWXx+QkPw+th0m8PsOR4/Zt1g D6LA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=tRlmxeWs+4MqMo673I9LmIUXGGx17H/CZgVA8IuEAqk=; b=hqu8BQnk1kKkoVfY9D/P7CqR9fWLhbhv3oCckoTnvnelbLimCxrDHI/+egj1Ihr3IX tjXn/3AHyUiFJMkRlmyrhegSQPbDMDTIFZ1awcoCoY1T0Xmnm+ip0OInvAr4xwN1e8uS oH/ph2e+5XBslsDEH3242ag+jaCeR7oYUoTZhmukp/Zr9J0l2nl8dr74/jGm2XGhBq2h UhNsAlmV67eCNww5c1QPoqiuaXlY5nUKQPLB56Nue+wnq+Z0Fvw3VPALL1oSmXoBpYLS xlcMrMyksQ1rP7NfUt0X/0ZgA8C4Z0CwCGgOzi9ceRvLEBZWFJ8ATKcUB4TpWGit0gde Zz0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cb11si5904777edb.361.2020.09.13.13.15.34; Sun, 13 Sep 2020 13:16:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725956AbgIMUME (ORCPT + 99 others); Sun, 13 Sep 2020 16:12:04 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:11782 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725941AbgIMUME (ORCPT ); Sun, 13 Sep 2020 16:12:04 -0400 X-IronPort-AV: E=Sophos;i="5.76,359,1592863200"; d="scan'208";a="467425457" Received: from abo-173-121-68.mrs.modulonet.fr (HELO hadrien) ([85.68.121.173]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Sep 2020 22:12:02 +0200 Date: Sun, 13 Sep 2020 22:12:02 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Sumera Priyadarsini cc: linux-kernel@vger.kernel.org, michal.lkml@markovi.net, nicolas.palix@imag.fr, cocci@systeme.lip6.fr, Gilles.Muller@lip6.fr Subject: Re: [Cocci] [RFC PATCH] scripts: coccicheck: Improve error feedback when coccicheck fails In-Reply-To: <20200913120548.bwl3elfl7ss66eyh@adolin> Message-ID: References: <20200913120548.bwl3elfl7ss66eyh@adolin> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 13 Sep 2020, Sumera Priyadarsini wrote: > Currently, coccicheck fails with only the message "coccicheck failed" > and the error code for the failure. To obtain the error logs, > one needs to specify a debug file using the DEBUG_FILE option. > > Modify coccicheck to display error logs when it crashes unless > DEBUG_FILE is set, in which case, the error logs are stored in > the specified debug file. Applied, thanks. julia > > Signed-off-by: Sumera Priyadarsini > --- > scripts/coccicheck | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/scripts/coccicheck b/scripts/coccicheck > index e04d328210ac..dbeafa21f359 100755 > --- a/scripts/coccicheck > +++ b/scripts/coccicheck > @@ -126,8 +126,14 @@ run_cmd_parmap() { > if [ $VERBOSE -ne 0 ] ; then > echo "Running ($NPROC in parallel): $@" > fi > - echo $@ >>$DEBUG_FILE > - $@ 2>>$DEBUG_FILE > + if [ "$DEBUG_FILE" != "/dev/null" -a "$DEBUG_FILE" != "" ]; then > + echo $@>>$DEBUG_FILE > + $@ 2>>$DEBUG_FILE > + else > + echo $@ > + $@ 2>&1 > + fi > + > err=$? > if [[ $err -ne 0 ]]; then > echo "coccicheck failed" > -- > 2.25.1 > > _______________________________________________ > Cocci mailing list > Cocci@systeme.lip6.fr > https://systeme.lip6.fr/mailman/listinfo/cocci >