From e38bdfef83ab2bd62ebd682433a7c22032eabd6f Mon Sep 17 00:00:00 2001 From: Gaurav Aggarwal Date: Mon, 5 Aug 2024 11:10:04 +0000 Subject: [PATCH] Unit test updates for kernel PR #1111 https://github.com/FreeRTOS/FreeRTOS-Kernel/pull/1111 Signed-off-by: Gaurav Aggarwal --- FreeRTOS/Test/CMock/tasks/tasks_1_utest.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/FreeRTOS/Test/CMock/tasks/tasks_1_utest.c b/FreeRTOS/Test/CMock/tasks/tasks_1_utest.c index ded460d23fe..1c38023f195 100644 --- a/FreeRTOS/Test/CMock/tasks/tasks_1_utest.c +++ b/FreeRTOS/Test/CMock/tasks/tasks_1_utest.c @@ -5377,6 +5377,9 @@ void test_xTaskGenericNotify_success_eIncrement_ISR( void ) /* prvAddTaskToReadyList */ listINSERT_END_Expect( &pxReadyTasksLists[ ptcb->uxPriority ], &ptcb->xStateListItem ); + /* prvResetNextTaskUnblockTime */ + listLIST_IS_EMPTY_ExpectAndReturn( pxDelayedTaskList, pdFALSE ); + listGET_ITEM_VALUE_OF_HEAD_ENTRY_ExpectAndReturn( pxDelayedTaskList, 1000 ); /* API Call */ ret_task_notify = xTaskGenericNotifyFromISR( ptcb, @@ -5415,6 +5418,10 @@ void test_xTaskGenericNotify_success_eSetValueWithOverwrite_ISR( void ) /* prvAddTaskToReadyList */ listINSERT_END_Expect( &pxReadyTasksLists[ ptcb->uxPriority ], &ptcb->xStateListItem ); + /* prvResetNextTaskUnblockTime */ + listLIST_IS_EMPTY_ExpectAndReturn( pxDelayedTaskList, pdFALSE ); + listGET_ITEM_VALUE_OF_HEAD_ENTRY_ExpectAndReturn( pxDelayedTaskList, 1000 ); + /* API Call */ ret_task_notify = xTaskGenericNotifyFromISR( ptcb, uxIndexToNotify, @@ -5452,6 +5459,10 @@ void test_xTaskGenericNotify_success_eSetValueWithoutOverwrite_ISR( void ) /* prvAddTaskToReadyList */ listINSERT_END_Expect( &pxReadyTasksLists[ ptcb->uxPriority ], &ptcb->xStateListItem ); + /* prvResetNextTaskUnblockTime */ + listLIST_IS_EMPTY_ExpectAndReturn( pxDelayedTaskList, pdFALSE ); + listGET_ITEM_VALUE_OF_HEAD_ENTRY_ExpectAndReturn( pxDelayedTaskList, 1000 ); + /* API Call */ ret_task_notify = xTaskGenericNotifyFromISR( ptcb, uxIndexToNotify, @@ -5561,6 +5572,9 @@ void test_xTaskGenericNotify_success_default_ISR( void ) /* prvAddTaskToReadyList */ listINSERT_END_Expect( &pxReadyTasksLists[ ptcb->uxPriority ], &ptcb->xStateListItem ); + /* prvResetNextTaskUnblockTime */ + listLIST_IS_EMPTY_ExpectAndReturn( pxDelayedTaskList, pdTRUE ); + /* API Call */ ret_task_notify = xTaskGenericNotifyFromISR( ptcb, uxIndexToNotify, @@ -5606,6 +5620,9 @@ void test_xTaskGenericNotify_success_default_ISR_task_woken_null( void ) /* prvAddTaskToReadyList */ listINSERT_END_Expect( &pxReadyTasksLists[ ptcb->uxPriority ], &ptcb->xStateListItem ); + /* prvResetNextTaskUnblockTime */ + listLIST_IS_EMPTY_ExpectAndReturn( pxDelayedTaskList, pdTRUE ); + /* API Call */ ret_task_notify = xTaskGenericNotifyFromISR( ptcb, uxIndexToNotify, @@ -5802,6 +5819,9 @@ void test_vTaskGenericNotifyGiveFromISR_success( void ) listREMOVE_ITEM_Expect( &( task_to_notify->xStateListItem ) ); /* prvAddTaskToReadyList */ listINSERT_END_Expect( &( pxReadyTasksLists[ task_to_notify->uxPriority ] ), &task_to_notify->xStateListItem ); + /* prvResetNextTaskUnblockTime */ + listLIST_IS_EMPTY_ExpectAndReturn( pxDelayedTaskList, pdFALSE ); + listGET_ITEM_VALUE_OF_HEAD_ENTRY_ExpectAndReturn( pxDelayedTaskList, 1000 ); /* API Call */ vTaskGenericNotifyGiveFromISR( task_to_notify,