From: Julia Lawall <julia.lawall@inria.fr>
To: Sumera Priyadarsini <sylphrenadin@gmail.com>
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
Date: Sun, 13 Sep 2020 22:12:02 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.22.394.2009132211430.2368@hadrien> (raw)
In-Reply-To: <20200913120548.bwl3elfl7ss66eyh@adolin>
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 <sylphrenadin@gmail.com>
> ---
> 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
>
next prev parent reply other threads:[~2020-09-13 20:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-13 12:05 Sumera Priyadarsini
2020-09-13 20:12 ` Julia Lawall [this message]
[not found] <44ab7442-1473-f267-4487-af98631a9338@web.de>
2020-09-14 6:21 ` [Cocci] " Julia Lawall
[not found] ` <287a8c82-6359-9a7e-c2ca-d26aa5be9650@web.de>
2020-09-14 7:14 ` Julia Lawall
[not found] ` <e5d90bca-c264-c154-25ad-5046ac00b3e8@web.de>
2020-09-14 7:26 ` Julia Lawall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.22.394.2009132211430.2368@hadrien \
--to=julia.lawall@inria.fr \
--cc=Gilles.Muller@lip6.fr \
--cc=cocci@systeme.lip6.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.lkml@markovi.net \
--cc=nicolas.palix@imag.fr \
--cc=sylphrenadin@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®