git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/1] Using sparse in a CI job

From
SZEDER Gábor <szeder.dev@gmail.com>
Date
Feb 2, 2019, 00:41 UTC
Message-ID
<20190202004145.GE10587@szeder.dev>
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.
Show 5 quoted lines
> 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
Previous: Ramsay JonesNext: Ramsay Jones
Message 4 of 7 in “Using sparse in a CI job”
  1. 0/1 Using sparse in a CI jobRamsay Jones, Feb 1, 2019
  2. Luc Van OostenryckFeb 1, 2019
  3. Ramsay JonesFeb 3, 2019
  4. SZEDER GáborFeb 2, 2019
  5. Ramsay JonesFeb 3, 2019
  6. SZEDER GáborFeb 3, 2019
  7. Ramsay JonesFeb 3, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.