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

Incorrect test of taskSpawn result in VxWorks implementation #269

Closed
jphickey opened this issue Oct 21, 2019 · 0 comments · Fixed by #281
Closed

Incorrect test of taskSpawn result in VxWorks implementation #269

jphickey opened this issue Oct 21, 2019 · 0 comments · Fixed by #281
Assignees
Labels
Milestone

Comments

@jphickey
Copy link
Contributor

Describe the bug
The VxWorks implementation is testing for an error result from the taskSpawn API call by comparing with (TASK_ID)0. This is incorrect, the VxWorks API documentation says that when taskSpawn fails, it returns the value ERROR, not 0.

To Reproduce
This can only be reproduced in unit test.

Expected behavior
The error handing path should be taken when taskSpawn returns ERROR.

System observed on:
Ubuntu 18.04.2 LTS 64 bit (running OSAL coverage unit tests)

Additional context
Discovered when implementing the coverage error path unit tests in #230

Reporter Info
Joseph Hickey, Vantage Systems, Inc.

@jphickey jphickey self-assigned this 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.

Note, one test condition will fail until the
fix for related bug nasa#269 is merged.

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.
@skliper skliper added this to the 5.1.0 milestone Oct 22, 2019
@skliper skliper added the bug label Oct 30, 2019
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants