-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve coverage test for "shared" layer #230
Comments
Imported from trac issue 207. Created by jphickey on 2019-03-08T12:27:20, last modified: 2019-08-14T14:11:46 |
jphickey
added a commit
to jphickey/osal
that referenced
this issue
Oct 21, 2019
Add numerous unit test cases to improve the code coverage ratios on the vxworks and shared implementation layers. Prior to this change set, the coverage ratio was: lines......: 90.4% (2549 of 2820 lines) functions..: 95.9% (306 of 319 functions) After this change set, the coverage ratio is: lines......: 99.9% (2846 of 2849 lines) functions..: 100.0% (330 of 330 functions) Note these stats include some of the UT code itself, and this is what added 11 functions. No functions were added to FSW code. One patch was made to the FSW code, where the vxWorks "taskSpawn" function is documented as returning ERROR on failure, not zero. The FSW code was checking the wrong value, and this was found during the unit tests. This also fixes the posix coverage test so it builds and runs, but coverage is still not implemented here.
This was referenced Oct 21, 2019
jphickey
added a commit
to jphickey/osal
that referenced
this issue
Oct 21, 2019
Add numerous unit test cases to improve the code coverage ratios on the vxworks and shared implementation layers. Prior to this change set, the coverage ratio was: lines......: 90.4% (2549 of 2820 lines) functions..: 95.9% (306 of 319 functions) After this change set, the coverage ratio is: lines......: 99.9% (2846 of 2849 lines) functions..: 100.0% (330 of 330 functions) Note these stats include some of the UT code itself, and this is what added 11 functions. No functions were added to FSW code. One patch was made to the FSW code, where the vxWorks "taskSpawn" function is documented as returning ERROR on failure, not zero. The FSW code was checking the wrong value, and this was found during the unit tests. This also fixes the posix coverage test so it builds and runs, but coverage is still not implemented here.
jphickey
added a commit
to jphickey/osal
that referenced
this issue
Oct 21, 2019
The test for failure of taskSpawn should be for the value of ERROR, not 0, per the VxWorks API documentation. Found when implementing the unit test improvements in nasa#230. This issue is generally only reproducible in UT where taskSpawn can be made to fail.
jphickey
added a commit
to jphickey/osal
that referenced
this issue
Oct 25, 2019
The timer code for VxWorks was fixed in bug nasa#271 and the coverage code test needs a corresponding update to cover the code change. This is kept as a separate update commit as neither changeset is merged to master yet.
skliper
pushed a commit
that referenced
this issue
Oct 31, 2019
The test for failure of taskSpawn should be for the value of ERROR, not 0, per the VxWorks API documentation. Found when implementing the unit test improvements in #230. This issue is generally only reproducible in UT where taskSpawn can be made to fail.
skliper
added a commit
that referenced
this issue
Oct 31, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a follow-on to original ticket #28
As part of the original change sets, a basic coverage test was added for the shared layer. It calls most functions in a nominal case, but does not yet cover a sufficient number of the error cases. For instance the module loader only has 72% of line coverage. Others are between 80-90% but could still be improved (files, queues, timers).
It has been discussed in CCB meetings during the review for #28 that we should make another pass through the coverage test logs to improve the error case coverage prior to releasing the next OSAL.
The text was updated successfully, but these errors were encountered: