-
Notifications
You must be signed in to change notification settings - Fork 253
Closed
Labels
bugunit-testTickets related to the OSAL unit testing (functional and/or coverage)Tickets related to the OSAL unit testing (functional and/or coverage)
Milestone
Description
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:
osal/src/tests/osal-core-test/osal-core-test.c
Lines 154 to 159 in 3604387
| 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugunit-testTickets related to the OSAL unit testing (functional and/or coverage)Tickets related to the OSAL unit testing (functional and/or coverage)