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

Generate new set of CFE coverage test stubs #1417

Closed
jphickey opened this issue Apr 22, 2021 · 3 comments · Fixed by #1463 or #1492
Closed

Generate new set of CFE coverage test stubs #1417

jphickey opened this issue Apr 22, 2021 · 3 comments · Fixed by #1463 or #1492
Assignees
Milestone

Comments

@jphickey
Copy link
Contributor

Is your feature request related to a problem? Please describe.
To achieve max flexibility the CFE coverage test stubs should have no built-in logic, with all handler logic in a separate function.

This is the pattern that was introduced with nasa/osal#966, along with the stub generator script.

Describe the solution you'd like
Run the stub generator script on CFE core API headers to generate a new set of "pure" stub implementation files with no extra logic in them.
Migrate any existing post-hook logic in the old stub to be a default handler function, as was done for OSAL stubs.

Additional context
Extension of original request in nasa/osal#832, but for CFE. Depends on nasa/osal#966 to be accepted/merged before this can be done.

Requester Info
Joseph Hickey, Vantage Systems, Inc.

@jphickey jphickey self-assigned this Apr 22, 2021
@jphickey
Copy link
Contributor Author

Ping @asgibson for awareness, this will be the next step in getting all the stubs updated to work in the preferred manner.

jphickey added a commit to jphickey/cFE that referenced this issue Apr 30, 2021
Update CFE core stub libraries to use generated stubs, using the generator
script now part of UT Assert.  All existing stub logic is converted to
a default handler routine.

This also entailed moving all of the internal API prototypes to be
in the "core_private" interface lib rather than in "core_api".  The
only reason this was not done earlier was due to issues with the stubs,
but that is alleviated when using generated stubs.
jphickey added a commit to jphickey/cFE that referenced this issue Apr 30, 2021
Update CFE core stub libraries to use generated stubs, using the generator
script now part of UT Assert.  All existing stub logic is converted to
a default handler routine.

This also entailed moving all of the internal API prototypes to be
in the "core_private" interface lib rather than in "core_api".  The
only reason this was not done earlier was due to issues with the stubs,
but that is alleviated when using generated stubs.
@skliper skliper added this to the 7.0.0 milestone Apr 30, 2021
@jphickey
Copy link
Contributor Author

Yes this fixes #1387 but does not fix #1393. I can do an add-on PR for that part though.

jphickey added a commit to jphickey/cFE that referenced this issue Apr 30, 2021
Update CFE core stub libraries to use generated stubs, using the generator
script now part of UT Assert.  All existing stub logic is converted to
a default handler routine.

This also entailed moving all of the internal API prototypes to be
in the "core_private" interface lib rather than in "core_api".  The
only reason this was not done earlier was due to issues with the stubs,
but that is alleviated when using generated stubs.
@asgibson
Copy link
Contributor

I have pulled this update and run with cFS c8b5e00 with the only change being the use of cFE #1463. All the CF unit tests run as they did before with no discernible difference. As this is the goal, that is success.

One note: None of the new "handler" override of any cFE stub was attempted. This only shows that whatever cFE API methods that are called by CF unit tests still operate as expected. This is not extensive, but several are called during testing.

Some of those used (not a complete list):

  • CFE_EVS_SendEvent
  • CFE_TBL_ReleaseAddress
  • CFE_TBL_GetAddress
  • CFE_MSG_GetFcnCode
  • CFE_MSG_GetSize
  • CFE_MSG_SetMsgTime
  • CFE_TIME_GetTime
  • CFE_SB_TransmitMsg

jphickey added a commit to jphickey/cFE that referenced this issue May 6, 2021
Update CFE core stub libraries to use generated stubs, using the generator
script now part of UT Assert.  All existing stub logic is converted to
a default handler routine.

This also entailed moving all of the internal API prototypes to be
in the "core_private" interface lib rather than in "core_api".  The
only reason this was not done earlier was due to issues with the stubs,
but that is alleviated when using generated stubs.
astrogeco added a commit that referenced this issue May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants