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

Offer secondary target for UT assert library that can be dynamically loaded #501

Closed
jphickey opened this issue Jun 12, 2020 · 0 comments · Fixed by #504 or #521
Closed

Offer secondary target for UT assert library that can be dynamically loaded #501

jphickey opened this issue Jun 12, 2020 · 0 comments · Fixed by #504 or #521
Assignees
Labels
enhancement unit-test Tickets related to the OSAL unit testing (functional and/or coverage)
Milestone

Comments

@jphickey
Copy link
Contributor

Is your feature request related to a problem? Please describe.
The current UT assert is designed to be statically linked as an OSAL application.

To support a CFE functional test environment that uses the same UT assert reporting methods, the library should offer a target that can be linked as loadable module.

Describe the solution you'd like
The differences are:

  • Compile as position independent code (PIC) so it can be linked into a dynamic module.
  • Separate out the OS_Application_Startup and OS_Application_Run - as this will be loaded into a larger app, not a standalone app, and these symbols are already defined.
  • Consolidate global variables into a common structure and make early init/reset of these variables into a separate routine from OS_Application_Startup.

Additional context
This dynamically-loadable variant can be a separate target, so it shouldn't change anything about the existing apps/tests that link with the existing static "ut_assert" library.

Requester Info
Joseph Hickey, Vantage Systems, Inc.

@jphickey jphickey self-assigned this Jun 12, 2020
jphickey added a commit to jphickey/osal that referenced this issue Jun 16, 2020
Add a position independent code (PIC) variant of the ut_assert library,
which can be dynamically loaded into other applications rather than running
as a standalone OSAL application.  This enables loading UT assert as a
CFE library.

This required moving some symbols/functions around.  Mainly, the PIC
library does _not_ contain the "utbsp.c" file which has the bindings
to the OSAL BSP when running as a standalone app, but everything else
should be the same.
astrogeco added a commit that referenced this issue Jun 23, 2020
@astrogeco astrogeco added this to the v5.1.0 milestone Sep 28, 2020
@astrogeco astrogeco added the unit-test Tickets related to the OSAL unit testing (functional and/or coverage) label Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement unit-test Tickets related to the OSAL unit testing (functional and/or coverage)
Projects
None yet
2 participants