[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 0/4] Static analyser finding deviation


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Tue, 29 Nov 2022 09:46:57 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=T7yKCOPmEG9Emy9mtL6aGpmL1ikd6wWhvDAVQ0KS8zA=; b=fSL6o/Fb/sBSZL5rX596dTTABz90PdgLZOrgPv8AlIoUmDSWYV1VlA48RNPSwQ+uQ/pXWUMezO9izrUjPMLlEcTzx+AmXFpQsJIRVjevhP7FQpO8/Fw5gShC7dFtAERx6zV0vW0YI6iofBgsIqCYsG68lOI3fV7LBFcVsICzEdIWlVI9Ay9/wdaGjGsYPc2h0Jk/swN1lxKwf+TG59ejB9wv77o2WcRQd5pRlLlYNBIn7qHyS9i2/+SRIH9AngulnuxyrdvOq+5ycO7I4Dozqx6eIj7MHCbvvOfs6SOQBrcFKrRqxmJUlJhi3o91wsKc6aLuWkC3Ertu5w9xXeApsw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IY83BL5o1BUsi+LK4Xkq+zYGHzE/JL8a1aSRKari2WU1qXO4Q6ogiOn1dhJIiJIoWL8stwW0RTUG4jpIGOQ2EiwZcRWOpGoaATFOr7HE8X2mReXVA0UxW3Qz8Cq6FtYtDpev1iPAitjYuAM0ww+IbTscFdPcrNWlzwEB+CYeBr1EKuyvF82VgUBcBC2j5o9XvZFzdc90e9D/FkZUl6+6duBlu+DLLHow6XmH9/wwzDaTG3Bz/k5dlHvHa1TVhGLjhic0IVvEe06QHwjfuADE6LCqPMLKkLY+VWHwIK/JOeRrg8E9+uWKwLHvveoPKfc8iunvwYTnlvS/uE+/k8HvdA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Tue, 29 Nov 2022 09:47:03 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Thread-index: AQHZAzNMLbhXl7Jpp0uxGRE1XtEGda5VJQuAgACDlwA=
  • Thread-topic: [PATCH 0/4] Static analyser finding deviation


> On 29 Nov 2022, at 01:55, Stefano Stabellini <sstabellini@xxxxxxxxxx> wrote:
> 
> On Mon, 28 Nov 2022, Luca Fancellu wrote:
>> This serie introduces a way to suppress a static analyser finding providing a
>> proper justification for it.
>> The process is explained in the docs/misra/documenting-violations.rst 
>> document
>> that this serie will provide.
>> The tools currently supported are eclair, coverity and cppcheck, but the 
>> design
>> is open to support many other static analysis tool.
>> 
>> The changes are split between the first two patches to reduce the review 
>> effort,
>> the first patch is introducing the deviation process for the eclair and 
>> coverity
>> tools, this is because their analysis system is similar.
>> 
>> The second patch is introducing the same deviation process for cppcheck,
>> modifying the current way it is called from the makefile and improving its
>> analysis.
>> 
>> The third patch is a fix for a tool used for cppcheck and the fourth patch
>> is an example of how a deviation can be applied for some MISRA findings.

Hi Stefano,

> 
> I tried testing this series with:
> 
> # scripts/xen-analysis.py --build-only --cppcheck-html --run-cppcheck 
> --cppcheck-bin=/local/repos/cppcheck/cppcheck 
> --cppcheck-html-bin=/local/repos/cppcheck/htmlreport/cppcheck-htmlreport
> 
> But I get this error:
> 
> ERROR: Can't find cppcheck version or version is not 2.7
> 
> 
> Note that my cppcheck is 2.7.4:
> 
> # ./cppcheck --version
> Cppcheck 2.7.4

Yes this is a bug, I’m strictly checking for 2.7, I will modify it to 2.7.x if 
you agree

> 
> 
> After removing the version check in cppcheck_analysis.py, the process
> starts correctly.
> 
> Also, where is the output html report created by cppcheck-html by
> default?


The html output should be in the xen folder 
[xen_repo]/xen/cppcheck-htmlreport/html but when you specify --build-only the 
reports are not generated, only the build phase is executed.

Have you tried without --build-only to test the report generations?

Cheers,
Luca

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.