Skip to content
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

Closed
skliper opened this issue Sep 30, 2019 · 1 comment · Fixed by #281
Closed

Improve coverage test for "shared" layer #230

skliper opened this issue Sep 30, 2019 · 1 comment · Fixed by #281
Assignees
Milestone

Comments

@skliper
Copy link
Contributor

skliper commented Sep 30, 2019

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.

@skliper skliper self-assigned this Sep 30, 2019
@skliper
Copy link
Contributor Author

skliper commented Sep 30, 2019

Imported from trac issue 207. Created by jphickey on 2019-03-08T12:27:20, last modified: 2019-08-14T14:11:46

@skliper skliper assigned jphickey and unassigned skliper Sep 30, 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
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
Fixes #230 #266 #269
Code reviewed and approved at 20191023 CCB
@skliper skliper closed this as completed in dfa3393 Nov 7, 2019
@skliper skliper added this to the 5.1.0 milestone Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants