-
Notifications
You must be signed in to change notification settings - Fork 253
Description
Describe the bug
There is an issue in bin-sem-flush-test.c. Within the BinSemFlushCheck function - lines 229, 230, 242, and 243 contain the wrong variable name (task_1_work as opposed to task_2_work & task_3_work).
To Reproduce
Run Test.
Expected behavior
Expect "Task 2/3 work = %u" to correspond with task_2/3_work variables.
Code snips
void BinSemFlushCheck(void)
{
int32 status;
/* At first, No task should have done any work yet (all blocked) */
UtAssert_True(task_1_work == 0, "Task 1 work = %u",(unsigned int)task_1_work);
UtAssert_True(task_2_work == 0, "Task 2 work = %u",(unsigned int)task_1_work);
UtAssert_True(task_3_work == 0, "Task 3 work = %u",(unsigned int)task_1_work);
status = OS_BinSemFlush(bin_sem_id);
UtAssert_True(status == OS_SUCCESS, "BinSem1 flush Rc=%d", (int)status);
/* After more delay the work done should be nonzero on all tasks */
/* NOTE - There is a slight race condition here as the task could be blocked
* by something else other than the bin sem.
*/
OS_TaskDelay(4000);
UtAssert_True(task_1_work != 0, "Task 1 work = %u",(unsigned int)task_1_work);
UtAssert_True(task_2_work != 0, "Task 2 work = %u",(unsigned int)task_1_work);
UtAssert_True(task_3_work != 0, "Task 3 work = %u",(unsigned int)task_1_work);
UtAssert_True(task_1_failures == 0, "Task 1 failures = %u",(unsigned int)task_1_failures);
UtAssert_True(task_2_failures == 0, "Task 2 failures = %u",(unsigned int)task_2_failures);
UtAssert_True(task_3_failures == 0, "Task 3 failures = %u",(unsigned int)task_3_failures);
}
System observed on:
NA
Additional context
NA
Reporter Info
Dan Knutsen
NASA Goddard Space Flight Center
Reactions are currently unavailable