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

ES missing branch coverage in CFE_ES_RegisterCDSEx, IsNewEntry can't be true without IsNewOffset being true #1928

Closed
skliper opened this issue Sep 2, 2021 · 0 comments · Fixed by #1999 or #2001

Comments

@skliper
Copy link
Contributor

skliper commented Sep 2, 2021

Is your feature request related to a problem? Please describe.
Branches aren't independent, since a new entry will always have a new offset (can't hit false IsNewOffset with true IsNewEntry):

     432 [ +  + ][ +  + ]:         12 :         if (Status == CFE_SUCCESS && (IsNewOffset || IsNewEntry))
                 [ -  + ]
     433                 :            :         {
     434                 :            :             /* If we succeeded at creating a CDS, save updated registry in the CDS */
     435                 :          6 :             RegUpdateStatus = CFE_ES_UpdateCDSRegistry();
     436                 :            :         }

here:

if (Status == CFE_SUCCESS && (IsNewOffset || IsNewEntry))
{
/* If we succeeded at creating a CDS, save updated registry in the CDS */
RegUpdateStatus = CFE_ES_UpdateCDSRegistry();
}

Describe the solution you'd like
Could just test against IsNewOffset.

Describe alternatives you've considered
None

Additional context
None

Requester Info
Jacob Hageman - NASA/GSFC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant