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 #604, Add ut_assert address equal macro #605

Merged

Conversation

skliper
Copy link
Contributor

@skliper skliper commented Sep 23, 2020

Describe the contribution
Fix #604 - adds the macro

Testing performed
Used the macro in work related to nasa/cFE#903 (built and ran unit tests locally using it)

Expected behavior changes
Additional macro available

System(s) tested on

  • Hardware: cFS Dev Server
  • OS: Ubuntu 18.04
  • Versions: main bundle + this commit

Additional context
None.

Third party code
None.

Contributor Info - All information REQUIRED for consideration of pull request
Jacob Hageman - NASA/GSFC

@skliper skliper added CCB:FastTrack CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) enhancement unit-test Tickets related to the OSAL unit testing (functional and/or coverage) labels Sep 23, 2020
@skliper skliper added this to the 6.0.0 milestone Sep 23, 2020
Copy link
Contributor

@CDKnightNASA CDKnightNASA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should use cpuaddr instead of void *? I duno the diff.

Copy link
Contributor

@jphickey jphickey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think void* is fine but I just want to confirm/check if this has been used/tested with a const pointer? I think it should be fine as C does allow you to cast a const void* back to a void* as long as you are explicit about it, and this is.

@yammajamma yammajamma added CCB-20200923 and removed CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) labels Sep 24, 2020
@yammajamma yammajamma changed the base branch from main to integration-candidate September 24, 2020 12:28
@yammajamma yammajamma merged commit 32e4f72 into nasa:integration-candidate Sep 24, 2020
@skliper
Copy link
Contributor Author

skliper commented Sep 28, 2020

I think void* is fine but I just want to confirm/check if this has been used/tested with a const pointer? I think it should be fine as C does allow you to cast a const void* back to a void* as long as you are explicit about it, and this is.

Just tested w:

    const void *addr1 = &msg;
    void *addr2 = &msg;
    /* Test address with const *void */
    UtAssert_ADDRESS_EQ(addr1, addr2);

and it compiled/ran/passed.

On Ubuntu 18.04.

@skliper skliper deleted the fix604-utassert-addreq branch February 1, 2021 21:36
jphickey pushed a commit to jphickey/osal that referenced this pull request Aug 10, 2022
Fix nasa#494, Updates CFE_SB_GetLastSenderID to check if message has been sent on pipe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CCB:FastTrack enhancement unit-test Tickets related to the OSAL unit testing (functional and/or coverage)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ut_assert address equal macro
4 participants