From a57ee50f67f9297a6ba175a1ec5055e426cfa31d Mon Sep 17 00:00:00 2001 From: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com> Date: Tue, 6 Aug 2024 10:10:45 +0530 Subject: [PATCH] Unit test updates for kernel PR #1111 (#1238) * Unit test updates for kernel PR #1111 https://github.com/FreeRTOS/FreeRTOS-Kernel/pull/1111 Signed-off-by: Gaurav Aggarwal * Fix doxygen check Signed-off-by: Gaurav Aggarwal --------- Signed-off-by: Gaurav Aggarwal --- .github/workflows/ci.yml | 2 +- FreeRTOS/Test/CMock/tasks/tasks_1_utest.c | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99122b7e3e..8c50e56690 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -81,7 +81,7 @@ jobs: # Therefore, we can just download it. mkdir -p freertos/FreeRTOS-Plus/Source/Application-Protocols/coreMQTT-Agent/source/dependency/coreMQTT/docs/doxygen/output wget -O freertos/FreeRTOS-Plus/Source/Application-Protocols/coreMQTT-Agent/source/dependency/coreMQTT/docs/doxygen/output/mqtt.tag \ - "https://freertos.org/Documentation/api-ref/coreMQTT/docs/doxygen/output/mqtt.tag" + "https://freertos.github.io/coreMQTT/main/mqtt.tag" - name: Generate doxygen ZIP uses: FreeRTOS/CI-CD-Github-Actions/doxygen@main diff --git a/FreeRTOS/Test/CMock/tasks/tasks_1_utest.c b/FreeRTOS/Test/CMock/tasks/tasks_1_utest.c index ded460d23f..1c38023f19 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,