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

Unit test hooks should not pass back pointers out of context #194

Closed
3 tasks done
skliper opened this issue Feb 9, 2022 · 0 comments · Fixed by #267
Closed
3 tasks done

Unit test hooks should not pass back pointers out of context #194

skliper opened this issue Feb 9, 2022 · 0 comments · Fixed by #267
Assignees
Labels
draco-rc2 unit-test Related to coverage or functional tests
Milestone

Comments

@skliper
Copy link
Contributor

skliper commented Feb 9, 2022

Checklist (Please check before submitting)

  • I reviewed the Contributing Guide.
  • I reviewed the CF README.md file to see if the feature is in the major future work.
  • I performed a cursory search to see if the feature request is relevant, not redundant, nor in conflict with other tickets.

Is your feature request related to a problem? Please describe.
Multiple cases of pointers getting passed back out of context:

ctxt->Spec = UT_Hook_GetArgValueByName(Context, "Spec", const char *);

ctxt->MsgPtr = UT_Hook_GetArgValueByName(Context, "MsgPtr", const CFE_MSG_Message_t *);

ctxt->MsgPtr = UT_Hook_GetArgValueByName(Context, "MsgPtr", CFE_MSG_Message_t *);

ctxt->MsgPtr = UT_Hook_GetArgValueByName(Context, "MsgPtr", CFE_MSG_Message_t *);

ctxt->MsgPtr = UT_Hook_GetArgValueByName(Context, "MsgPtr", const CFE_MSG_Message_t *);

ctxt->MsgPtr = UT_Hook_GetArgValueByName(Context, "MsgPtr", const CFE_MSG_Message_t *);

ctxt->MsgPtr = UT_Hook_GetArgValueByName(Context, "MsgPtr", CFE_MSG_Message_t *);

ctxt->MsgPtr = UT_Hook_GetArgValueByName(Context, "MsgPtr", CFE_MSG_Message_t *);

These could all be stale by the time they are checked.

Describe the solution you'd like
Clean up hooks. Remove info not needed, anything critical should either check in context or copy the information out.

Describe alternatives you've considered
None

Additional context
None

Requester Info
Jacob Hageman - NASA/GSFC

@skliper skliper added the unit-test Related to coverage or functional tests label Feb 9, 2022
@skliper skliper self-assigned this Jun 16, 2022
@skliper skliper added this to the Draco milestone Jun 16, 2022
astrogeco added a commit that referenced this issue Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
draco-rc2 unit-test Related to coverage or functional tests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant