All of lore.kernel.org
 help / color / mirror / Atom feed
* Static code analysis tool for openbmc
@ 2019-03-13 10:14 Ratan Gupta
  2019-03-13 13:43 ` Lei YU
  2019-03-14 16:26 ` Tanous, Ed
  0 siblings, 2 replies; 4+ messages in thread
From: Ratan Gupta @ 2019-03-13 10:14 UTC (permalink / raw)
  To: openbmc

Hi Team,

Is there any plan to use any static code analysis tool in openbmc? I 
find one of the tool which is good and used in multiple opensource 
projects is "coverity".

Regards
Ratan Gupta

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Static code analysis tool for openbmc
  2019-03-13 10:14 Static code analysis tool for openbmc Ratan Gupta
@ 2019-03-13 13:43 ` Lei YU
  2019-03-13 21:55   ` Stewart Smith
  2019-03-14 16:26 ` Tanous, Ed
  1 sibling, 1 reply; 4+ messages in thread
From: Lei YU @ 2019-03-13 13:43 UTC (permalink / raw)
  To: Ratan Gupta; +Cc: openbmc

On Wed, Mar 13, 2019 at 6:15 PM Ratan Gupta <ratagupt@linux.vnet.ibm.com> wrote:
> Is there any plan to use any static code analysis tool in openbmc? I

In Jenkins job, we have cppcheck to do checks on the code.

> find one of the tool which is good and used in multiple opensource
> projects is "coverity".

I would prefer clang static analyzer, but other tools like coverity is also
welcome.
And if possible, there is much stronger analyzer PVS-Studio Analyzer (need
license though). I read [PVS-Studio's blog][1] and that tool is really really
good.

But I think the main question is, what to do with issues found by the static
analyzer? We need to define some rule to fix or ignore the issues.

[1]: https://www.viva64.com/en/b/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Static code analysis tool for openbmc
  2019-03-13 13:43 ` Lei YU
@ 2019-03-13 21:55   ` Stewart Smith
  0 siblings, 0 replies; 4+ messages in thread
From: Stewart Smith @ 2019-03-13 21:55 UTC (permalink / raw)
  To: Lei YU, Ratan Gupta; +Cc: openbmc

Lei YU <mine260309@gmail.com> writes:
> On Wed, Mar 13, 2019 at 6:15 PM Ratan Gupta <ratagupt@linux.vnet.ibm.com> wrote:
>> Is there any plan to use any static code analysis tool in openbmc? I
>
> In Jenkins job, we have cppcheck to do checks on the code.
>
>> find one of the tool which is good and used in multiple opensource
>> projects is "coverity".
>
> I would prefer clang static analyzer, but other tools like coverity is also
> welcome.
> And if possible, there is much stronger analyzer PVS-Studio Analyzer (need
> license though). I read [PVS-Studio's blog][1] and that tool is really really
> good.
>
> But I think the main question is, what to do with issues found by the static
> analyzer? We need to define some rule to fix or ignore the issues.

In my experience with host firmware on OpenPOWER, each tool gets a
different set of things that it catches. Even the humble sparse catches
things that other tools do not (notably endian screw-ups).

A big advantage of Coverity is the tooling around it, the web site where
you can mark things permanently as a false positive, assign things to
people, etc. For other tools that you just run in a jenkins job, it's
way too easy to not see things grow, or just have a large list of false
positives you get used to ignoring.

-- 
Stewart Smith
OPAL Architect, IBM.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Static code analysis tool for openbmc
  2019-03-13 10:14 Static code analysis tool for openbmc Ratan Gupta
  2019-03-13 13:43 ` Lei YU
@ 2019-03-14 16:26 ` Tanous, Ed
  1 sibling, 0 replies; 4+ messages in thread
From: Tanous, Ed @ 2019-03-14 16:26 UTC (permalink / raw)
  To: Ratan Gupta, openbmc

> 
> Is there any plan to use any static code analysis tool in openbmc? I find one
> of the tool which is good and used in multiple opensource projects is
> "coverity".
> 

I'm in full support of getting coverity started.  I had some troubles with performance (the analysis for a single app takes a very long time) and unexpected false positives when I attempted it a while back, and gave up at the time.  One person also did get the Facebook static analyzer, infer, running recently on an OpenBMC project and it seemed to give some results, about 10% of which were actionable, and generated some commits to OpenBMC.  I'm not sure I'd advocate for it, but it's certainly another option.

-Ed

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-03-14 16:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-13 10:14 Static code analysis tool for openbmc Ratan Gupta
2019-03-13 13:43 ` Lei YU
2019-03-13 21:55   ` Stewart Smith
2019-03-14 16:26 ` Tanous, Ed

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.