Skip to contentSkip to conversation

Lgtm scan of DPDK

DISCUSSION Stephen Hemminger 3 participants 5 messages May 27, 2022 – Jun 9, 2022

lore
Share & tools
lore
#0 lore raw

I just discovered that there is another tool similar to Coverity for scanning. It gives different results, and might be useful.
The scans of github open source projects is already done.

See: https://lgtm.com/projects/g/DPDK/dpdk

Shows 19 errors, 263 warnings and 111 recommendations.

Of course, some of these are bogus. For example, tool thinks are scripts are Python 2.

#1 lore raw

28/05/2022 01:12, Stephen Hemminger:

Quoted 9 lines

I just discovered that there is another tool similar to Coverity for scanning. It gives different results, and might be useful.
The scans of github open source projects is already done.

See: https://lgtm.com/projects/g/DPDK/dpdk

Shows 19 errors, 263 warnings and 111 recommendations.

Of course, some of these are bogus. For example, tool thinks are scripts are Python 2.

The problem is that we already invest some time in Coverity triage to mark false positives.
Can you check whether this tool has some false positives?

#2 lore raw
Quoted 16 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Wednesday, June 8, 2022 9:23 AM
To: Stephen Hemminger <[email protected]>
Cc: [email protected]; Mcnamara, John <[email protected]>; [email protected]
Subject: Re: Lgtm scan of DPDK

28/05/2022 01:12, Stephen Hemminger:

Quoted 1 line

I just discovered that there is another tool similar to Coverity for

scanning.

Quoted 5 lines

It gives different results, and might be useful. The scans of github open source projects is already done.

See: https://lgtm.com/projects/g/DPDK/dpdk

Quoted 8 lines
Quoted 3 lines

Shows 19 errors, 263 warnings and 111 recommendations.

Of course, some of these are bogus. For example, tool thinks are scripts

are Python 2.

The problem is that we already invest some time in Coverity triage to mark false positives.
Can you check whether this tool has some false positives?

We looked at this tool a few years ago.

Some of the good points were:

* It is automatic and runs independently
* It did find some genuine issues
* Issues have the commit ID associated with them so you could assign them to

One of the main disadvantages was:

* False positives can only be marked with a comment in the code

Nevertheless it is probably worth folks evaluating the issues in their own areas of code and in particular any of the Errors.

John

#3 lore raw
Quoted 33 lines · John
Quoted 16 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Wednesday, June 8, 2022 9:23 AM
To: Stephen Hemminger <[email protected]>
Cc: [email protected]; Mcnamara, John <[email protected]>; [email protected]
Subject: Re: Lgtm scan of DPDK

28/05/2022 01:12, Stephen Hemminger:

Quoted 1 line

I just discovered that there is another tool similar to Coverity for

scanning.

Quoted 5 lines

It gives different results, and might be useful. The scans of github open source projects is already done.

See: https://lgtm.com/projects/g/DPDK/dpdk

Quoted 8 lines
Quoted 3 lines

Shows 19 errors, 263 warnings and 111 recommendations.

Of course, some of these are bogus. For example, tool thinks are scripts

are Python 2.

The problem is that we already invest some time in Coverity triage to mark false positives.
Can you check whether this tool has some false positives?

We looked at this tool a few years ago.

Some of the good points were:

* It is automatic and runs independently
* It did find some genuine issues
* Issues have the commit ID associated with them so you could assign them to

Quoted 7 lines

One of the main disadvantages was:

* False positives can only be marked with a comment in the code

Nevertheless it is probably worth folks evaluating the issues in their own areas of code and in particular any of the Errors.

John

Some background on why I looked at this.

LGTM became Codeql which is now owned by Microsoft.
Our internal build system now runs Codeql on all builds, mostly as a security scan.

Long term would like to make DPDK upstream clean (so the team doesn't get false warnings) and engage Codeql if possible to resolve the issues on their side (like the Python noise).

For now, will try to filter out anything that gets marked

#4 lore raw
Quoted 40 lines

-----Original Message-----
From: Stephen Hemminger <[email protected]>
Sent: Thursday, June 9, 2022 3:36 AM
To: Mcnamara, John <[email protected]>
Cc: Thomas Monjalon <[email protected]>; [email protected]; [email protected]
Subject: Re: Lgtm scan of DPDK

Quoted 12 lines · John
Quoted 12 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Wednesday, June 8, 2022 9:23 AM
To: Stephen Hemminger <[email protected]>
Cc: [email protected]; Mcnamara, John <[email protected]>; [email protected]
Subject: Re: Lgtm scan of DPDK

28/05/2022 01:12, Stephen Hemminger:

Quoted 2 lines

I just discovered that there is another tool similar to Coverity for

scanning.

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

It gives different results, and might be useful. The scans of github open source projects is already done.

See: https://lgtm.com/projects/g/DPDK/dpdk

Shows 19 errors, 263 warnings and 111 recommendations.

...

Some background on why I looked at this.

LGTM became Codeql which is now owned by Microsoft.
Our internal build system now runs Codeql on all builds, mostly as a security scan.

Quoted 6 lines

Long term would like to make DPDK upstream clean (so the team doesn't get false warnings) and engage Codeql if possible to resolve the issues on their side (like the Python noise).

For now, will try to filter out anything that gets marked

Hi Stephen,

That is interesting. If you want help broadening out the initiative in the community let me know. In terms of static code analysis more is better so I'm in favour of any initiatives like this.

John