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

Unable to set return code of CFE_ES_CalculateCRC using UT_SetDeferredRetcode #890

Closed
jiajlin opened this issue Sep 17, 2020 · 0 comments · Fixed by #892 or #912
Closed

Unable to set return code of CFE_ES_CalculateCRC using UT_SetDeferredRetcode #890

jiajlin opened this issue Sep 17, 2020 · 0 comments · Fixed by #892 or #912
Milestone

Comments

@jiajlin
Copy link

jiajlin commented Sep 17, 2020

Describe the bug
The CFE_ES_CalculateCRC stub always return the value of 332424 regardless of what deferred return code I set it to.

To Reproduce
Steps to reproduce the behavior:

  1. Create a functionX that calls CFE_ES_CalculateCRC
  2. Write a unit test for the functionX
  3. In UT_functionX, set the return code of CFE_ES_CalculateCRC as below
    UT_SetDeferredRetcode(UT_KEY(CFE_ES_CalculateCRC), 1, 0);
  4. Run the unit test

Expected behavior
I expect the return value of CFE_ES_CalculateCRC to be 0 as I set it to.

Actual behavior
However, the return value of CFE_ES_CalculateCRC will be 332424 instead of 0.

Code snips
N/A

System observed on:

  • Hardware
  • OS: Centos7
  • Versions: cFS Development Build: 6.8.0-rc1+dev28

Additional context
N/A

Reporter Info
N/A

skliper added a commit to skliper/cFE that referenced this issue Sep 21, 2020
yammajamma added a commit that referenced this issue Sep 24, 2020
Fix #890, CFE_ES_CalculateCRC default stub behavior
@astrogeco astrogeco added this to the 7.0.0 milestone Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants