cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
From: Paul Chaignon <paul@cilium.io>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: cocci@systeme.lip6.fr
Subject: Re: [Cocci] Exit with non-zero status
Date: Tue, 5 May 2020 11:59:12 +0200	[thread overview]
Message-ID: <20200505095911.GA7247@Mem> (raw)
In-Reply-To: <72cb854f-912b-4c34-a526-be7b584e8fd8@web.de>

On Wed, Apr 29, 2020 at 09:50:21PM +0200, Markus Elfring wrote:
> >> I suggest to handle the desired search result counter
> >> by an other data processing interface.
> >> How would you like to treat program execution failures otherwise?
> >
> > I'm trying to run SmPL programs as part of a CI pipeline, so execution
> > failure and (buggy) code pattern not found really mean the same in
> > the end: a human needs to take a look :-)
> 
> I imagine that such a look can occasionally made a bit more convenient.
> 
> 
> > I understand that is not a common use case
> 
> Can such a software application become more popular?

As far as I understand, if it's not more popular to use Coccinelle in
CIs right now it's because of (1) false positives for some rules, and
(2) the little reliance of the Linux community on CIs.

We rely heavily on CI and probably wouldn't use Coccinelle in the long
term if we couldn't enable it in CI. Without CI, developers and
reviewers would likely forget to execute semantic patches.

So CI use seems to become more popular (even in low-level projects), but
it's not like this exit status issue is a blocker to use Coccinelle in
CI. For the record, I enabled Coccinelle in our CI (GitHub Actions)
yesterday and worked around that issue with the following script:

  make -C bpf/ coccicheck | tee /tmp/stdout
  exit $(grep -c "[prefix of warning messages]" /tmp/stdout)

> 
> 
> > and I'm fine using a workaround.
> 
> We have got different views around preferable solutions.
> How many information would you like to put into an exit code so far?

Please see above script. I currently exit with number of failures, but
having just 0 (success) and 1 (fail) statuses would be enough.

> 
> 
> > Just wanted to check I wasn't missing something obvious.
> 
> Further possibilities should probably be clarified further,
> shouldn't they?
> 
> Will the usage of additional data structures become more interesting?

Not sure I understand the question. What data structures?

Cheers,
Paul
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

  reply	other threads:[~2020-05-05  9:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-29 18:40 [Cocci] Exit with non-zero status Markus Elfring
2020-04-29 19:07 ` Paul Chaignon
2020-04-29 19:50   ` Markus Elfring
2020-05-05  9:59     ` Paul Chaignon [this message]
2020-05-05 11:08       ` Markus Elfring
2020-05-06 12:01         ` Paul Chaignon
2020-05-06 12:24           ` Markus Elfring
  -- strict thread matches above, loose matches on Subject: below --
2020-04-29 14:39 Paul Chaignon
2020-04-29 15:07 ` Julia Lawall
2020-04-29 15:16   ` Paul Chaignon
2020-04-29 15:25     ` 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=20200505095911.GA7247@Mem \
    --to=paul@cilium.io \
    --cc=Markus.Elfring@web.de \
    --cc=cocci@systeme.lip6.fr \
    /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;
as well as URLs for NNTP newsgroup(s).