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
Is your feature request related to a problem? Please describe.
TestGetTime in time_current_test.c uses OS_GetLocalTime to bound the CFE_TIME_GetTime and related calls here:
The issue is (at least on VxWorks) if clock_gettime resolution is less than vxTimeBaseGet the test may fail since it can show a difference of zero yet the CFE_TIME_Get* calls may show a difference so the TimeInRange test fails.
Describe the solution you'd like
Use the same utilities and stay in the CFE_TIME_SysTime_t domain by bounding with CFE_TIME_GetTime at the start and the end vs using OS_GetLocalTime. The test is really intended to show that the conversions work correctly to the resolution provided by CFE_TIME_SysTime_t, changing resolutions or references only complicates things unnecessarily leading to possible false results.
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:
Is your feature request related to a problem? Please describe.
TestGetTime in time_current_test.c uses OS_GetLocalTime to bound the CFE_TIME_GetTime and related calls here:
cFE/modules/cfe_testcase/src/time_current_test.c
Lines 76 to 87 in 64a6a59
OS_GetLocalTime uses clock_gettime here:
https://github.com/nasa/osal/blob/2a2defbb6b5ecc9a0f6d5af96ff73f88edc27327/src/os/portable/os-impl-posix-gettime.c#L78
but the CFE_TIME_GetTime related calls use CFE_PSP_GetTime which for VxWorks uses vxTimeBaseGet here:
https://github.com/nasa/PSP/blob/1bd7bd9508dbe7e0084fc8ad600479c5831d7660/fsw/modules/timebase_vxworks/cfe_psp_timebase_vxworks.c#L225
The issue is (at least on VxWorks) if clock_gettime resolution is less than vxTimeBaseGet the test may fail since it can show a
difference
of zero yet the CFE_TIME_Get* calls may show a difference so the TimeInRange test fails.Describe the solution you'd like
Use the same utilities and stay in the CFE_TIME_SysTime_t domain by bounding with CFE_TIME_GetTime at the start and the end vs using OS_GetLocalTime. The test is really intended to show that the conversions work correctly to the resolution provided by CFE_TIME_SysTime_t, changing resolutions or references only complicates things unnecessarily leading to possible false results.
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: