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

TBL uncovered lines in CFE_TBL_LoadCmd, no alternative error codes from CFE_TBL_GetWorkingBuffer #1901

Closed
skliper opened this issue Aug 26, 2021 · 0 comments · Fixed by #2303
Assignees
Milestone

Comments

@skliper
Copy link
Contributor

skliper commented Aug 26, 2021

Is your feature request related to a problem? Please describe.
CFE_TBL_GetWorkingBuffer has no alternative error codes to exercise the following code in CFE_TBL_LoadCmd:

     492         [ +  - ]:          2 :                         else if (Status == CFE_TBL_ERR_NO_BUFFER_AVAIL)
     493                 :            :                         {
     494                 :          2 :                             CFE_EVS_SendEvent(CFE_TBL_NO_WORK_BUFFERS_ERR_EID, CFE_EVS_EventType_ERROR,
     495                 :            :                                               "No working buffers available for table '%s'", TblFileHeader.TableName);
     496                 :            :                         }
     497                 :            :                         else
     498                 :            :                         {
     499                 :          0 :                             CFE_EVS_SendEvent(CFE_TBL_INTERNAL_ERROR_ERR_EID, CFE_EVS_EventType_ERROR,
     500                 :            :                                               "Internal Error (Status=0x%08X)", (unsigned int)Status);
     501                 :            :                         }

else if (Status == CFE_TBL_ERR_NO_BUFFER_AVAIL)
{
CFE_EVS_SendEvent(CFE_TBL_NO_WORK_BUFFERS_ERR_EID, CFE_EVS_EventType_ERROR,
"No working buffers available for table '%s'", TblFileHeader.TableName);
}
else
{
CFE_EVS_SendEvent(CFE_TBL_INTERNAL_ERROR_ERR_EID, CFE_EVS_EventType_ERROR,
"Internal Error (Status=0x%08X)", (unsigned int)Status);
}

Describe the solution you'd like
Could cover if CFE_TBL_GetWorkingBuffer was stubbed (test individual file units in #1886). Note there is a possible internal error from getting the mutex, but it doesn't get returned (see #1469)

Describe alternatives you've considered
Trade refactor/removal of condition... it's useful if errors do get added, just not currently reachable.

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
Development

Successfully merging a pull request may close this issue.

3 participants