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

Fix #479, add name association to stub arguments #480

Conversation

jphickey
Copy link
Contributor

Describe the contribution
Add the capability to store parameter names in addition to pointers as part of the stub argument context data.

Macroize the UT_Stub_RegisterContext function utstubs.h to also pass the parameter name in addition to the pointer.

Add hook-side accessor functions/macros to make it easier and more reliable to get this information from the context data.

Also other minor items:

  • Increase max "fixed" args from 4 to 8
  • Add convenience macros for variable argument stubs

Fixes #479

Testing performed
Build and execute unit tests, confirm all passing (baseline).
Update EVS stub and SAMPLE_APP test cases to use new functions and confirm operation.

Expected behavior changes
New features only, does not change existing behavior.
UT Hook functions now have the capability to get argument values by name, which is more future proof than assuming a numeric index.

System(s) tested on
Ubuntu 20.04

Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.

Add the capability to store parameter names in addtion
to pointers as part of the stub argument context data.

Macroize the UT_Stub_RegisterContext function utstubs.h to
also pass the parameter name in addition to the pointer.

Also add hook-side accessor functions/macros to make it
easier and more reliable to get this information from
the context data.
@jphickey jphickey added the CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) label May 21, 2020
@astrogeco
Copy link
Contributor

CCB 2020-05-27 APPROVED

@astrogeco astrogeco added CCB:Approved Indicates code review and approval by community CCB IC-20200527 and removed CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) labels May 27, 2020
@astrogeco astrogeco changed the base branch from master to integration-candidate June 1, 2020 18:16
@astrogeco astrogeco merged commit a1aaec2 into nasa:integration-candidate Jun 2, 2020
@jphickey jphickey deleted the fix-479-utassert-stub-arg-names branch June 19, 2020 16:13
@skliper skliper added this to the 5.1.0 milestone Aug 21, 2020
jphickey added a commit to jphickey/osal that referenced this pull request Aug 10, 2022
Create a new background job to handle the maintenance tasks
that had been performed in the ES main task as part of the
CFE_ES_ScanAppTable() routine.

All app state changes, including those invoked by messages,
are now handled by this job.

This also slightly changes the semantics of CFE_ES_RunLoop and
CFE_ES_ExitApp.  Now, the CFE_ES_RunLoop routine no longer requires
a RunStatus buffer.  Instead, the only thing that matters is the
RunStatus value that is eventually passed to CFE_ES_ExitApp after
the shutdown is complete.  This should be mostly backward compatible,
as the recommended app pattern would pass the same value to
both functions.

This commit also fixes nasa#480, as the value passed to CFE_ES_ExitApp
will not override a request that was already pending.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CCB:Approved Indicates code review and approval by community CCB
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ut Assert argument name association
3 participants