Skip to content
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

Add range to OS_TaskDelay test #1080

Closed
jphickey opened this issue Jun 23, 2021 · 0 comments · Fixed by #1081 or #1098
Closed

Add range to OS_TaskDelay test #1080

jphickey opened this issue Jun 23, 2021 · 0 comments · Fixed by #1081 or #1098
Assignees
Labels
bug RTEMS unit-test Tickets related to the OSAL unit testing (functional and/or coverage)
Milestone

Comments

@jphickey
Copy link
Contributor

Describe the bug
When running cFS in a VM (e.g. QEMU) the timings and the system clock is not as precise/predictable. As a result, I have occasionally seen the newly-added functional test for OS_TaskDelay fail as follows:

[BEGIN] 40 OS_TaskDelay
[ PASS] 40.001 ut_oscore_task_test.c:404 - OS_TaskDelay(100) (0) == OS_SUCCESS (0)
[ FAIL] 40.002 ut_oscore_task_test.c:408 - Elapsed time 98 msec, expected 100
[ PASS] 40.003 ut_oscore_task_test.c:413 - OS_TaskDelay(250) (0) == OS_SUCCESS (0)
[ FAIL] 40.004 ut_oscore_task_test.c:417 - Elapsed time 249 msec, expected 250
[  END] 40 OS_TaskDelay         TOTAL::4     PASS::2     FAIL::2     MIR::0     TSF::0     TTF::0     N/A::0   

To Reproduce
Execute osal_core_UT on a cFS system running in a VM

Expected behavior
Tests should pass reliably.

System observed on:
RTEMS 4.11.3 running in QEMU

Additional context
Likely related to some sloppiness in how the emulated real time clock works under a hypervisor. Suggestion is to just extend the acceptable range a big (i.e. >=95 instead of >=100)

Reporter Info
Joseph Hickey, Vantage Systems, Inc.

@jphickey jphickey self-assigned this Jun 23, 2021
@jphickey jphickey added the bug label Jun 23, 2021
jphickey added a commit to jphickey/osal that referenced this issue Jun 24, 2021
To account for potential of imprecise timing/clock sampling when running
on a VM, allow for a wider range of time values to pass the test.
jphickey added a commit to jphickey/osal that referenced this issue Jun 24, 2021
To account for potential of imprecise timing/clock sampling when running
on a VM, allow for a wider range of time values to pass the test.
@jphickey jphickey added the unit-test Tickets related to the OSAL unit testing (functional and/or coverage) label Jun 25, 2021
@skliper skliper added this to the 6.0.0 milestone Jun 28, 2021
astrogeco added a commit that referenced this issue Jul 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug RTEMS unit-test Tickets related to the OSAL unit testing (functional and/or coverage)
Projects
None yet
3 participants