-
Notifications
You must be signed in to change notification settings - Fork 216
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 on OSAL unit tests #268
Conversation
Rename to "vxworks" and "posix", respectively, to match the actual implementation names. The build scripts rely on the name being the same and will fail if different. This also updates the default build to be vxworks rather than vxworks6, if not specified on the command line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Separate FSW change. Prefer a separate commit at minimum. Ideally create an issue, fix, and pull specific to the FSW change (easier tracking/reporting of FSW changes).
6b20595
to
ef5d44b
Compare
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.
ef5d44b
to
dfa3393
Compare
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.
FYI: just pushed an additional commit on this branch that correlates with pull #277 (FSW code changes here required a corresponding coverage update). Kept as a separate commit because neither pull request is merged to master yet. Inclusion depends on order of merges. |
Describe the contribution
Fixes issue #230, improving coverage of shared and vxworks modules in the OSAL coverage tests.
Testing performed
Expected behavior changes
Code coverage is substantially improved. All non-deprecated lines are visited.
Before change:
After change:
System(s) tested on:
Ubuntu 18.04.2 LTS, 64 bit
Additional context
This fixes one very minor FSW code issue found while running UT. The return value of the vxWorks "taskSpawn" is documented to be
ERROR
, not zero, in the event of failure. The FSW was testing the wrong value here in one instance.The only non-covered lines of FSW code are in 2 deprecated directory functions.
Contributor Info
Joseph Hickey, Vantage Systems, Inc.