git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "SZEDER Gábor" <szeder.dev@gmail.com>
To: Ramsay Jones <ramsay@ramsayjones.plus.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	GIT Mailing-list <git@vger.kernel.org>,
	Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Subject: Re: [PATCH 0/1] Using sparse in a CI job
Date: Sat, 2 Feb 2019 01:41:45 +0100	[thread overview]
Message-ID: <20190202004145.GE10587@szeder.dev> (raw)
In-Reply-To: <78f85f0b-176f-0b54-2ec8-4c13fd386733@ramsayjones.plus.com>

On Fri, Feb 01, 2019 at 09:01:20PM +0000, Ramsay Jones wrote:
> I suspect that the Makefile sparse target is not easy to use in a CI
> job, since the 'sparse' program (via cgcc -no-compile) does not exit
> with a non-zero value, even when issuing errors and warnings.

We had the same issue with Coccinelle in the static analysis build job
on Travis CI, which was happily succeeding even when Coccinelle
noticed undesired code patterns entering the codebase.  We've dealt
with that by looking at the patch files generated by 'make
coccicheck': if they were empty, then all is well, if they are not,
then dump their contents into the log and 'exit 1'.  See 0860a7641b
(travis-ci: fail if Coccinelle static analysis found something to
transform, 2018-07-23).

I think we could do something like that with sparse as well.

> At the moment, on Linux, the sp-out file is free from any sparse errors
> or warnings. So are next and pu:
> 
>   $ grep error sp-out
>   $ grep warning sp-out

On 'master' I get:

  $ grep error sp-out 
  $ grep warning sp-out 
  connect.c:652:40: warning: incorrect type in argument 2 (invalid types)
  pack-revindex.c:65:23: warning: memset with byte count of 262144
  unix-socket.c:83:26: warning: incorrect type in argument 2 (invalid types)
  unix-socket.c:108:23: warning: incorrect type in argument 2 (invalid types)
  daemon.c:1041:36: warning: incorrect type in argument 2 (invalid types)
  daemon.c:1184:67: warning: incorrect type in argument 2 (invalid types)
  imap-send.c:1022:42: warning: incorrect type in argument 2 (invalid types)
  credential-cache--daemon.c:180:37: warning: incorrect type in argument 2 (invalid types)
  $ sparse --version
  v0.5.0


  parent reply	other threads:[~2019-02-02  0:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-01 21:01 [PATCH 0/1] Using sparse in a CI job Ramsay Jones
2019-02-01 22:40 ` Luc Van Oostenryck
2019-02-03 15:19   ` Ramsay Jones
2019-02-02  0:41 ` SZEDER Gábor [this message]
2019-02-03  1:49   ` Ramsay Jones
2019-02-03 12:12     ` SZEDER Gábor
2019-02-03 15:43       ` Ramsay Jones

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=20190202004145.GE10587@szeder.dev \
    --to=szeder.dev@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=luc.vanoostenryck@gmail.com \
    --cc=ramsay@ramsayjones.plus.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;
as well as URLs for NNTP newsgroup(s).