You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description above makes it sound like calls to CFE_SB_RcvMsg will return: 0, CFE_SB_TIME_OUT, -1. In practice it returns 0, CFE_SB_TIME_OUT, 0, 0, -1 since each call to UT_SetDeferredRetcode sets up another entry in the table, and each entry is processed until complete before moving on to the next (which restarts the counter).
Turns out nothing actually depended on the 0, CFE_SB_TIME_OUT, -1 behavior, it's just misleading. Alternative solution could be to delete the -1 (if nothing uses it).
skliper
changed the title
UT_SetDefferedRetcode doesn't work as explained in ut_support.c
UT_SetDeferedRetcode doesn't work as explained in ut_support.c
Nov 3, 2020
skliper
changed the title
UT_SetDeferedRetcode doesn't work as explained in ut_support.c
UT_SetDeferredRetcode doesn't work as explained in ut_support.c
Nov 3, 2020
skliper
added a commit
to skliper/cFE
that referenced
this issue
Jan 21, 2021
Describe the bug
cFE/fsw/cfe-core/unit-test/ut_support.c
Lines 153 to 166 in e0d1ce8
Description above makes it sound like calls to CFE_SB_RcvMsg will return: 0, CFE_SB_TIME_OUT, -1. In practice it returns 0, CFE_SB_TIME_OUT, 0, 0, -1 since each call to UT_SetDeferredRetcode sets up another entry in the table, and each entry is processed until complete before moving on to the next (which restarts the counter).
The osal description is clear, it's just not used correctly in cFE:
https://github.com/nasa/osal/blob/5a8f0afa3a6ef6945661d6fc893d4592d9360b5a/ut_assert/inc/utstubs.h#L120-L139
To Reproduce
Set more than one UT_SetDeferredRetcode on the same key, observe response.
Expected behavior
Set up so it will do 0, CFE_SB_TIME_OUT, -1:
Code snips
See above
System observed on:
Additional context
None.
Reporter Info
Jacob Hageman - NASA/GSFC
The text was updated successfully, but these errors were encountered: