User story #160
Updated by André Neto over 9 years ago
Verify and implement coding standard using Flexelint.
h1. Source code files modified
* Source/Core/L0Portability/Threads.h
* Source/Core/L0Portability/OperatingSystem/Linux/ThreadsOS.cpp
* Source/Core/L0Portability/OperatingSystem/Windows/ThreadsOS.h
* Source/Core/L0Portability/OperatingSystem/Windows/ThreadsOS.cpp
* Test/Core/L0Portability/ThreadsTest.h
* Test/Core/L0Portability/ThreadsTest.cpp
* Test/GTest/ThreadsGTest.cpp
h1. Architecture & design review
*Date of the review:* 29/07/2015
*Person who did the review:* Ivan Herrero
*Version of architecture & design document:* N/A. As per the original MARTe implementation, this is a support function and does not require formal design in UML.
*Result of review:* N/A
*List of non-conformities:* N/A
h1. Code and documentation review
*Date of the review:* 29/07/2015
*Person who did the review:* Ivan Herrero
*Result of review:* PASS (MISRA compliant)
*List of non-conformities:*
Threads::name declares that it returns a C style string (char8*) without specifying who is the responsible for the management of the memory used by this char array (it actually returns a pointer to the char array hosted by an instance of ThreadInformation calling its ThreadName method). Perhaps it should be created a copy of the char array by means of Memory::StringDup or changed the prototype putting the char array as an out parameter of the method.
h1. Unit test review
*Date of the review:* 29/07/2015
*Person who did the review:* Ivan Herrero
*Result of coverage tests review:* PASS
*Result of functional tests review:* FAIL
*Result of review:* FAIL
*List of non-conformities:*
In this review, Threads tests fails at:
[ FAILED ] ThreadsGTest.TestPriority
[ FAILED ] ThreadsGTest.TestGetThreadInfoCopy
The reason why these
Moreover, the tests fail is that in Linux a regular user is have not allowed to change the priority. This can enough granularity and they must be solved by either running the tests as the root user (not advisable), or by editing the file @/etc/security/limits.conf@ and adding the following lines (change aneto to your username):
@aneto soft rtprio 100
@aneto hard rtprio 10 refactored.
h1. Source code files modified
* Source/Core/L0Portability/Threads.h
* Source/Core/L0Portability/OperatingSystem/Linux/ThreadsOS.cpp
* Source/Core/L0Portability/OperatingSystem/Windows/ThreadsOS.h
* Source/Core/L0Portability/OperatingSystem/Windows/ThreadsOS.cpp
* Test/Core/L0Portability/ThreadsTest.h
* Test/Core/L0Portability/ThreadsTest.cpp
* Test/GTest/ThreadsGTest.cpp
h1. Architecture & design review
*Date of the review:* 29/07/2015
*Person who did the review:* Ivan Herrero
*Version of architecture & design document:* N/A. As per the original MARTe implementation, this is a support function and does not require formal design in UML.
*Result of review:* N/A
*List of non-conformities:* N/A
h1. Code and documentation review
*Date of the review:* 29/07/2015
*Person who did the review:* Ivan Herrero
*Result of review:* PASS (MISRA compliant)
*List of non-conformities:*
Threads::name declares that it returns a C style string (char8*) without specifying who is the responsible for the management of the memory used by this char array (it actually returns a pointer to the char array hosted by an instance of ThreadInformation calling its ThreadName method). Perhaps it should be created a copy of the char array by means of Memory::StringDup or changed the prototype putting the char array as an out parameter of the method.
h1. Unit test review
*Date of the review:* 29/07/2015
*Person who did the review:* Ivan Herrero
*Result of coverage tests review:* PASS
*Result of functional tests review:* FAIL
*Result of review:* FAIL
*List of non-conformities:*
In this review, Threads tests fails at:
[ FAILED ] ThreadsGTest.TestPriority
[ FAILED ] ThreadsGTest.TestGetThreadInfoCopy
The reason why these
Moreover, the tests fail is that in Linux a regular user is have not allowed to change the priority. This can enough granularity and they must be solved by either running the tests as the root user (not advisable), or by editing the file @/etc/security/limits.conf@ and adding the following lines (change aneto to your username):
@aneto soft rtprio 100
@aneto hard rtprio 10 refactored.