-
Notifications
You must be signed in to change notification settings - Fork 217
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
OSAL network APIs missing functional tests #373
Comments
No code yet, but would like to discuss at the CCB as to whether to stub out OS functions or otherwise how to test. |
As noted in the CCB, there are two flavors of testing to consider:
In OSAL the "tests" and "unit-tests" are functional tests (type 1). These do NOT use stubs., they use the real OSAL, linked to the real C library We can (and should) write some new tests that exercise the network socket API. We can create two threads, which talk to eachother via IP sockets that are bound to the localhost address (127.0.0.1). OSAL also has coverage tests (type 2) but these are mainly to validate the error checking and other items which cannot typically be reached in the functional test. This links each OSAL unit with stubs, including stubs for the C library calls. Yes we have a framework for doing this, and the "shared" layer (including the network) should be covered by it already. However the "impl" part probably needs better coverage, because only VxWorks is done 100% (that's a separate issue though). |
Concur, definitely need to add functional tests as Joe suggests. |
Missing tests for all of the following: Certification issue. |
CCB 2020-03-25: Will go ahead with this. It is a priority. |
The mutex for the log file write during the WriteLogFileCmd excution was held longer than it should have been. This lock must *NOT* be held during EVS_SendEvent, as this will cause deadlock. This moves the mutex to protect only the area that actually accesses the log data, and it moves all send event calls to be AFTER the mutex is released.
Is your feature request related to a problem? Please describe.
Seems there's not really any unit tests for the OSAL networking code.
Describe the solution you'd like
Should have unit tests.
Describe alternatives you've considered
Not having unit tests?
Additional context
Note that to do unit testing, it's likely we'll need to stub out OS-provided API's (open, select, socket, bind, accept, close().) Do we have a standard framework for stubbing out OS-provided functions?
Requester Info
[email protected]
The text was updated successfully, but these errors were encountered: