Open skliper opened 3 years ago
Actually I think the issue/error lies here:
It should be using ReturnCode
instead of Result
to hold the value. The former is the OSAL status code, the latter is the VxWorks status code. It's just coincidence that OK and OS_SUCCESS are the same value (0) so it works and this mismatch was not noticed.
Is your feature request related to a problem? Please describe. Coverage test highlights somewhat unexpected behavior in the VxWorks
OS_ShellOutputToFile_impl
where it will still return success ifOS_ObjectIdGetById
doesn't return OS_SUCCESS. There isn't a real case whereOS_ObjectIdGetById
would fail that I know of, but the logic is a bit strange. https://github.com/nasa/osal/blob/cb95655f1743890835a10847439380b5ef7e31a0/src/os/vxworks/src/os-impl-shell.c#L79-L102Describe the solution you'd like Return OS_ERROR if there is an error.
Describe alternatives you've considered None
Additional context None
Requester Info Jacob Hageman - NASA/GSFC