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

CFE_SB_IsValidMsgId handler default behavior fails if return not set #2040

Closed
skliper opened this issue Jan 29, 2022 · 0 comments · Fixed by #2041 or #2043
Closed

CFE_SB_IsValidMsgId handler default behavior fails if return not set #2040

skliper opened this issue Jan 29, 2022 · 0 comments · Fixed by #2041 or #2043

Comments

@skliper
Copy link
Contributor

skliper commented Jan 29, 2022

Is your feature request related to a problem? Please describe.
Any UT not setting the return for CFE_SB_IsValidMsgId will see the call fail in the unit under test:

void UT_DefaultHandler_CFE_SB_IsValidMsgId(void *UserObj, UT_EntryKey_t FuncKey, const UT_StubContext_t *Context)
{
int32 status;
bool return_value;
UT_Stub_GetInt32StatusCode(Context, &status);
return_value = status;
UT_Stub_SetReturnValue(FuncKey, return_value);
}

Describe the solution you'd like
<ore helpful to test against CFE_SB_INVALID_MSG_ID if the return isn't set.

Describe alternatives you've considered
None

Additional context
Just test against invalid, since max is configurable and UT's shouldn't rely on it.

Requester Info
Jacob Hageman - NASA/GSFC

@skliper skliper added this to the Draco milestone Jan 29, 2022
skliper added a commit to skliper/cFE that referenced this issue Jan 29, 2022
If no return value override is set test against CFE_SB_INVALID_MSG_ID
skliper added a commit to skliper/cFE that referenced this issue Jan 29, 2022
If no return value override is set test against CFE_SB_INVALID_MSG_ID
skliper added a commit to skliper/cFE that referenced this issue Jan 29, 2022
If no return value override is set test against CFE_SB_INVALID_MSG_ID
astrogeco added a commit that referenced this issue Feb 3, 2022
…vement

Fix #2040, Improve CFE_SB_IsValidMsgId handler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant