Describe the bug
The idmap-api-test routine occasionally fails, because it creates one of its semaphores in a sub task, but does not actually wait for that sub task to run.
To Reproduce
Run idmap test, in particular a single core machine seems to reproduce it more reliably.
Expected behavior
Need to add a wait loop of some type in main task to make sure child task has executed.
Code snips
Task started here:
|
OS_TaskCreate( &task_id, "Task", Test_Void_Fn, 0, 0, 0, 0); |
Might want to employ a loop similar to what is done here to make sure the child task has executed:
|
loopcnt = 0; |
|
while ((OS_TaskGetInfo(TaskData[tasknum].task_id, &taskprop) == OS_SUCCESS) && (loopcnt < UT_EXIT_LOOP_MAX)) |
|
{ |
|
OS_TaskDelay(10); |
|
loopcnt++; |
|
} |
System observed on:
CentOS 6.9 VM (single core)
Reporter Info
Joseph Hickey, Vantage Systems, Inc.
Describe the bug
The
idmap-api-testroutine occasionally fails, because it creates one of its semaphores in a sub task, but does not actually wait for that sub task to run.To Reproduce
Run idmap test, in particular a single core machine seems to reproduce it more reliably.
Expected behavior
Need to add a wait loop of some type in main task to make sure child task has executed.
Code snips
Task started here:
osal/src/tests/idmap-api-test/idmap-api-test.c
Line 106 in 3604387
Might want to employ a loop similar to what is done here to make sure the child task has executed:
osal/src/tests/osal-core-test/osal-core-test.c
Lines 154 to 159 in 3604387
System observed on:
CentOS 6.9 VM (single core)
Reporter Info
Joseph Hickey, Vantage Systems, Inc.