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
@jphickey - you aware of the logic behind why it was done this way?
This was an ugly backdoor from long ago to mimic some logic in the SB test that would confirm that all OSAL queues were indeed cleaned up by the test case. Basically it just flags anything still open.
There is no need to close the open sockets in the current implementation. In a very old implementation, this was required because the sockets were quasi-real entities even in UT and not closing them would interfere with future tests. In the modern OSAL stubs just by resetting the UT state (which is done every test) you start with a clean slate every time.
Ideally there should be a better way to do this locally and only on tests that are related to cleanup. I can investigate.
Is your feature request related to a problem? Please describe.
Prototype defined in both cFE and OSAL.
cFE/fsw/cfe-core/unit-test/ut_support.h
Lines 656 to 671 in 983157d
https://github.com/nasa/osal/blob/f12d42ba58837a645d05eda3479d5f613ebad6c4/src/ut-stubs/utstub-helpers.h#L111-L115
Implemented here:
https://github.com/nasa/osal/blob/f12d42ba58837a645d05eda3479d5f613ebad6c4/src/ut-stubs/utstub-helpers.c#L195-L217
Also violation of magic number use in the implementation, and doesn't seem to actually do what it says (I don't see the close).
Describe the solution you'd like
Maybe remove if not useful? If not, at least use the correctly scoped prototype and remove the second definition.
Describe alternatives you've considered
None.
Additional context
None
Requester Info
Jacob Hageman - NASA/GSFC
The text was updated successfully, but these errors were encountered: