Add CMock test case for vTaskResume (#1111)

* Add Cmock test case for updates in vTaskResume API introduced in Kernel PR#865.

* Update Kernel submodule pointer

---------

Co-authored-by: Rahul Kar <karahulx@amazon.com>
pull/1112/head
Moral-Hao 1 year ago committed by GitHub
parent f60dd88609
commit 55d07daf0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1 +1 @@
Subproject commit 5281427a9942bf12d35240d388fcfe60fa7dd682
Subproject commit 0640b2e4863bfdf628406cc90e29200a9220e088

@ -417,6 +417,7 @@ void setUp( void )
uxSchedulerSuspended = ( UBaseType_t ) 0;
is_first_task = true;
created_tasks = 0;
critical_section_counter = 0;
py_operation = dummy_operation;
}
@ -2546,6 +2547,36 @@ void test_vTaskResume_fail_task_ready( void )
ASSERT_PORT_YIELD_WITHIN_API_NOT_CALLED();
}
void test_vTaskResume_fail_task_waiting_notify( void )
{
UBaseType_t uxIndexToNotify = 2;
TaskHandle_t task_handle;
create_task_priority = 3;
task_handle = create_task();
create_task_priority = 5;
create_task();
ptcb = task_handle;
ptcb->ucNotifyState[ uxIndexToNotify ] = taskWAITING_NOTIFICATION;
/* Expectations */
/* prvTaskIsTaskSuspended */
listIS_CONTAINED_WITHIN_ExpectAndReturn( &xSuspendedTaskList,
&ptcb->xStateListItem,
pdTRUE );
listIS_CONTAINED_WITHIN_ExpectAndReturn( &xPendingReadyList,
&ptcb->xEventListItem,
pdFALSE );
listIS_CONTAINED_WITHIN_ExpectAndReturn( NULL,
&ptcb->xEventListItem,
pdTRUE );
/* API Call */
vTaskResume( task_handle ); /* not current tcb */
/* Validations */
ASSERT_PORT_YIELD_WITHIN_API_NOT_CALLED();
ptcb->ucNotifyState[ uxIndexToNotify ] = taskWAITING_NOTIFICATION;
}
void test_vTaskResume_fail_task_event_list_not_orphan( void )
{
TaskHandle_t task_handle;

@ -5,7 +5,7 @@ license: "MIT"
dependencies:
- name: "FreeRTOS-Kernel"
version: "5281427a9"
version: "0640b2e48"
repository:
type: "git"
url: "https://github.com/FreeRTOS/FreeRTOS-Kernel.git"

Loading…
Cancel
Save