Fix unit tests for Kernel PR 1206 (#1312)

PR - https://github.com/FreeRTOS/FreeRTOS-Kernel/pull/1206

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
pull/1292/head
Gaurav-Aggarwal-AWS 1 month ago committed by GitHub
parent e62f73927b
commit f6672f99df
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -278,13 +278,7 @@ void test_prvYieldForTask_assert_yieldpending_core_is_false( void )
vFakePortEnterCriticalSection_Expect(); vFakePortEnterCriticalSection_Expect();
/* back */ /* back */
/* prvYieldForTask */ /* prvYieldForTask */
vFakePortGetCoreID_ExpectAndReturn( 0 );
vFakePortGetCoreID_ExpectAndReturn( 1 );
vFakePortGetCoreID_ExpectAndReturn( 1 );
vFakePortGetCoreID_ExpectAndReturn( 1 ); vFakePortGetCoreID_ExpectAndReturn( 1 );
vFakePortGetCoreID_ExpectAndReturn( 0 );
vFakePortGetCoreID_ExpectAndReturn( 0 );
vFakePortGetCoreID_ExpectAndReturn( 0 );
EXPECT_ASSERT_BREAK( vTaskRemoveFromUnorderedEventList( &xEventListItem, EXPECT_ASSERT_BREAK( vTaskRemoveFromUnorderedEventList( &xEventListItem,
xItemValue ) ); xItemValue ) );
@ -319,7 +313,6 @@ void test_prvSelectHighestPriorityTask_assert_scheduler_running_false( void )
vFakePortGetTaskLock_Expect(); vFakePortGetTaskLock_Expect();
vFakePortGetISRLock_Expect(); vFakePortGetISRLock_Expect();
vFakePortGetCoreID_ExpectAndReturn( 0 );
EXPECT_ASSERT_BREAK( vTaskSwitchContext( 1 ) ); EXPECT_ASSERT_BREAK( vTaskSwitchContext( 1 ) );
validate_and_clear_assertions(); validate_and_clear_assertions();
@ -353,7 +346,6 @@ void test_prvSelectHighestPriorityTask_assert_coreid_ne_runstate( void )
vFakePortGetTaskLock_Expect(); vFakePortGetTaskLock_Expect();
vFakePortGetISRLock_Expect(); vFakePortGetISRLock_Expect();
vFakePortGetCoreID_ExpectAndReturn( 0 );
listIS_CONTAINED_WITHIN_ExpectAnyArgsAndReturn( pdFALSE ); listIS_CONTAINED_WITHIN_ExpectAnyArgsAndReturn( pdFALSE );
listLIST_IS_EMPTY_ExpectAnyArgsAndReturn( pdFALSE ); listLIST_IS_EMPTY_ExpectAnyArgsAndReturn( pdFALSE );
@ -477,7 +469,6 @@ void test_vTaskSwitchContext_assert_nexting_count_ne_zero( void )
vFakePortGetTaskLock_Expect(); vFakePortGetTaskLock_Expect();
vFakePortGetISRLock_Expect(); vFakePortGetISRLock_Expect();
vFakePortGetCoreID_ExpectAndReturn( 1 );
EXPECT_ASSERT_BREAK( vTaskSwitchContext( 1 ) ); EXPECT_ASSERT_BREAK( vTaskSwitchContext( 1 ) );

@ -804,8 +804,8 @@ void test_coverage_prvGetExpectedIdleTime_ready_list_eq_1( void )
vFakePortGetCoreID_ExpectAndReturn( 0 ); vFakePortGetCoreID_ExpectAndReturn( 0 );
vFakePortGetTaskLock_Expect(); vFakePortGetTaskLock_Expect();
/* prvCheckForRunStateChange */ /* prvCheckForRunStateChange */
vFakePortAssertIfISR_Expect();
vFakePortGetCoreID_ExpectAndReturn( 0 ); vFakePortGetCoreID_ExpectAndReturn( 0 );
vFakePortAssertIfISR_Expect();
/* End of prvCheckForRunStateChange */ /* End of prvCheckForRunStateChange */
vFakePortGetISRLock_Expect(); vFakePortGetISRLock_Expect();
vFakePortReleaseISRLock_Expect(); vFakePortReleaseISRLock_Expect();

Loading…
Cancel
Save