Skip to content

Conversation

@AniruddhaKanhere
Copy link
Member

@AniruddhaKanhere AniruddhaKanhere commented Aug 2, 2022

Description

This PR adds a REAME file in the test/Coverity folder to guide users on the process of building and analyzing the source code using Coverity static analysis tool.

Also, it moves the Coverity config file to the test/Coverity folder to be consistent.

Test Steps

Related Issue

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@AniruddhaKanhere AniruddhaKanhere requested a review from a team as a code owner August 2, 2022 20:57
gitwallit
gitwallit previously approved these changes Aug 3, 2022
gitwallit
gitwallit previously approved these changes Aug 3, 2022
gitwallit
gitwallit previously approved these changes Aug 3, 2022
- Extract the cmake download using `tar -xzvf cmake-3.13.0.tar.gz`.
- Go to the extracted folder (`cd cmake-3.13.0`) and run `./bootstrap`.
- Run `make -j$(nproc)` and then run `sudo make install`.
- Check the version using `cmake --version` command.
Copy link
Member

@archigup archigup Aug 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For Debian based systems, we should recommend using a PPA, or for any Linux system we can recommend just unpacking a binary distribution of cmake to /opt and adding to PATH. Using sudo make install makes the system a mess and can cause conflicts with the system package manager

## Getting Started
### Prerequisites
You can run this on a platform supported by Coverity. The list and other details can be found [here](https://sig-docs.synopsys.com/polaris/topics/c_coverity-compatible-platforms.html).
To compile and run this project successfully, you must have the following:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To compile and run this project successfully, you must have the following:
To compile and run the Coverity target successfully, you must have the following:

~~~

You should now have the HTML formatted violations list in a directory named `html-output`.
With the current configuration and the provided project, you should see only one deviation from advisory rule 8.13 in file FreeRTOS_IP.c [here](https://github.com/alfred2g/FreeRTOS-Plus-TCP/blob/misra_remaining/source/FreeRTOS_IP.c#L236). This deviation has a justification outlined [here](https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/blob/main/MISRA.md#rule-813). With that justification in place, a coverity suppression statement has been added to the code. However, even with that suppression in place, the coverity tool continues to report the deviation. Thus, as an excpetion, we have allowed the deviation to be reported in the HTML formatted report. If you find a way around it, please help us fix this by creating a pull-request in this repository.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was fixed in a newer version of Coverity, if I recall correctly.

gitwallit
gitwallit previously approved these changes Aug 8, 2022
@AniruddhaKanhere AniruddhaKanhere merged commit 013b591 into FreeRTOS:main Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants