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

SB functional test - exercise CFE_SB_ReceiveBuffer CFE_SB_PEND_FOREVER and CFE_SB_POLL options #1829

Closed
skliper opened this issue Aug 17, 2021 · 2 comments · Fixed by #1876 or #1885
Closed
Assignees
Milestone

Comments

@skliper
Copy link
Contributor

skliper commented Aug 17, 2021

Is your feature request related to a problem? Please describe.
SB functional test only calls CFE_SB_ReceiveBuffer with a timeout of 100, requirements include poll and pend forever.

Describe the solution you'd like
Exercise CFE_SB_POLL and CFE_SB_PEND_FOREVER options.

Describe alternatives you've considered
None

Additional context
None

Requester Info
Jacob Hageman - NASA/GSFC

@skliper skliper added this to the 7.0.0 milestone Aug 17, 2021
@jphickey jphickey self-assigned this Aug 17, 2021
@jphickey
Copy link
Contributor

I actually added a couple calls to ReceiveBuffer w/CFE_SB_POLL as part of #1812.

I can add a call w/CFE_SB_PEND_FOREVER - didn't do this at first because if the queue is empty, that would hang the test, but that would also be a failure so probably ok? Obviously won't be able to test the case of PEND_FOREVER + empty queue....

@skliper
Copy link
Contributor Author

skliper commented Aug 17, 2021

Great! Please add a PEND_FOREVER call with a message on the bus so it returns immediately, no need for a test that actually pends forever. It'd also be good for the final test where it does pend for a short timeout to actually confirm at least a minimum amount of time passed.

jphickey added a commit to jphickey/cFE that referenced this issue Aug 24, 2021
Use the CFE_SB_PEND_FOREVER flag on a few of the calls to CFE_SB_ReceiveBuffer
to confirm that this works as expected.  Previously only CFE_SB_POLL and
a nonzero timeout were used.

Note this can only be used when it is known/expected that the message
queue is not empty.  If there is any possiblility that the queue is empty,
then this cannot be used or else the test may block.  This also means that
if the test fails, it may fail by blocking and never finishing the test
rather than an actual FAIL testcase.
astrogeco added a commit that referenced this issue Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants