From 03926888d8c9a1d9c092349657da29f439ddbbf4 Mon Sep 17 00:00:00 2001 From: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com> Date: Tue, 17 Oct 2023 09:54:06 +0530 Subject: [PATCH] Fix Unit test for APIs ulTaskNotifyTake and xTaskNotifyWait (#1102) --- FreeRTOS/Test/CMock/tasks/tasks_1_utest.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/FreeRTOS/Test/CMock/tasks/tasks_1_utest.c b/FreeRTOS/Test/CMock/tasks/tasks_1_utest.c index cbfb122b53e..38846abf839 100644 --- a/FreeRTOS/Test/CMock/tasks/tasks_1_utest.c +++ b/FreeRTOS/Test/CMock/tasks/tasks_1_utest.c @@ -4538,6 +4538,7 @@ void test_ulTaskGenericNotifyTake_success_yield( void ) uxListRemove_ExpectAndReturn( &ptcb->xStateListItem, 1 ); listSET_LIST_ITEM_VALUE_Expect( &ptcb->xStateListItem, xTickCount + 9 ); vListInsert_Expect( pxDelayedTaskList, &ptcb->xStateListItem ); + listLIST_IS_EMPTY_ExpectAnyArgsAndReturn( pdTRUE ); /* API Call */ ret_gen_notify_take = ulTaskGenericNotifyTake( uxIndexToWait, pdFALSE, @@ -5160,6 +5161,7 @@ void test_xTaskGenericNotifyWait_success_notif_not_received( void ) listSET_LIST_ITEM_VALUE_Expect( &ptcb->xStateListItem, xTickCount + xTicksToWait ); vListInsert_Expect( pxOverflowDelayedTaskList, &ptcb->xStateListItem ); + listLIST_IS_EMPTY_ExpectAnyArgsAndReturn( pdTRUE ); /* API Call */ ret = xTaskGenericNotifyWait( uxIndexToWait, @@ -5249,6 +5251,7 @@ void test_xTaskGenericNotifyWait_success_notif_received_while_waiting( void ) listSET_LIST_ITEM_VALUE_Expect( &ptcb->xStateListItem, xTickCount + xTicksToWait ); vListInsert_Expect( pxOverflowDelayedTaskList, &ptcb->xStateListItem ); + listLIST_IS_EMPTY_ExpectAnyArgsAndReturn( pdTRUE ); py_operation = ¬if_received; /* API Call */