-
Notifications
You must be signed in to change notification settings - Fork 201
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
TBL missing coverage in cfe_tbl_api.c function CFE_TBL_Update #1838
Comments
The targeted condition is:
By default RegRecPtr is NULL. The only way to update RegRecPtr is by taking the following path:
There is no way to have both Status < 0 and RegRecPtr != NULL without changing the implementation. Code Coverage is not possible. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
CFE_TBL_Update
function contains two hard to reach lines (953-954) that remains untested, preventing us from reaching 100% line coverage. It's actually just one uncovered line, but lcov thinks it's two.Describe the solution you'd like
These lines should be safe to leave uncovered because they do not contain any potential to access a NULL pointer or anything else similarly dangerous.
Additional context
Line 953 is currently impossible to reach because
CFE_TBL_UpdateInternal
does not throw any error status codes (< 0), so the only way to trigger the if statement on line 949 is fromCFE_TBL_ValidateAccess
on line 920 which would always meanRegRecPtr
is NULL. Thus the if statement on line 951 can never be true, leaving line 953 uncovered.Requester Info
Niall Mullane - GSFC 582 Intern
The text was updated successfully, but these errors were encountered: