-
Notifications
You must be signed in to change notification settings - Fork 253
Description
Is your feature request related to a problem? Please describe.
I've been frustrated that we don't have unit tests for checking that OSAL properly handles error conditions when calling OS functions (like open, read, socket, accept, etc.) Apparently if we define --wrap=open, then all calls to open() will go to our open() function and the OS-provided open will be renamed as __wrap_open(). I suggest this be used to stub most/all OS calls and we can add unit tests for such things as running out of memory/storage/file descriptors and also support unit testing in sandboxed environments (don't know if Travis CI sandboxes) where such things as network calls are disabled.
Describe the solution you'd like
Stub functions for OS functions.
Describe alternatives you've considered
Been looking around for alternatives and haven't seen any.
Additional context
Add any other context about the feature request here.
Requester Info
[email protected]