Improve coverage on OSAL unit tests#268
Merged
skliper merged 3 commits intonasa:masterfrom Nov 7, 2019
Merged
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.
skliper
suggested changes
Oct 21, 2019
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
Contributor
Author
skliper
approved these changes
Oct 21, 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.
Contributor
Author
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.