mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-12-23 11:09:28 -05:00
Remove no new core added coverage test for coreAffinitySet (#1248)
* Remove this unit test due to implementation change
This commit is contained in:
parent
520fc225eb
commit
4b039b82e9
1 changed files with 0 additions and 56 deletions
|
|
@ -1337,62 +1337,6 @@ void test_coverage_vTaskCoreAffinitySet_null_task_handle( void )
|
||||||
TEST_ASSERT_EQUAL( pdTRUE, xYieldPendings[ 0 ] );
|
TEST_ASSERT_EQUAL( pdTRUE, xYieldPendings[ 0 ] );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief vTaskCoreAffinitySet - no new core for task which is not running.
|
|
||||||
*
|
|
||||||
* Set core mask for a not running task. The new core mask doesn't enable the task
|
|
||||||
* to run on any new core. Verify the core mask set is correct.
|
|
||||||
*
|
|
||||||
* <b>Coverage</b>
|
|
||||||
* @code{c}
|
|
||||||
* if( taskTASK_IS_RUNNING( pxTCB ) == pdTRUE )
|
|
||||||
* {
|
|
||||||
* ...
|
|
||||||
* }
|
|
||||||
* else
|
|
||||||
* {
|
|
||||||
* if( ( uxPrevNotAllowedCores & uxCoreAffinityMask ) != 0U )
|
|
||||||
* {
|
|
||||||
* prvYieldForTask( pxTCB );
|
|
||||||
* }
|
|
||||||
* }
|
|
||||||
* @endcode
|
|
||||||
* ( taskTASK_IS_RUNNING( pxTCB ) == pdTRUE ) is false.
|
|
||||||
* ( ( uxPrevNotAllowedCores & uxCoreAffinityMask ) != 0U ) is false.
|
|
||||||
*/
|
|
||||||
void test_coverage_vTaskCoreAffinitySet_task_not_running_no_new_core( void )
|
|
||||||
{
|
|
||||||
TCB_t xTaskTCB = { NULL };
|
|
||||||
UBaseType_t uxCoreAffinityMask;
|
|
||||||
UBaseType_t uxNewCoreAffinityMask;
|
|
||||||
|
|
||||||
/* Setup the variables and structure. */
|
|
||||||
/* This task is allowed to run on core 0 and core 1 only. */
|
|
||||||
uxCoreAffinityMask = ( 1U << 0 ) | ( 1U << 1 );
|
|
||||||
vCreateStaticTestTaskAffinity( &xTaskTCB,
|
|
||||||
uxCoreAffinityMask,
|
|
||||||
tskIDLE_PRIORITY,
|
|
||||||
configNUMBER_OF_CORES,
|
|
||||||
pdFALSE );
|
|
||||||
xSchedulerRunning = pdTRUE;
|
|
||||||
|
|
||||||
/* Expectations. */
|
|
||||||
vFakePortEnterCriticalSection_StubWithCallback( NULL );
|
|
||||||
vFakePortExitCriticalSection_StubWithCallback( NULL );
|
|
||||||
vFakePortCheckIfInISR_StopIgnore();
|
|
||||||
|
|
||||||
vFakePortEnterCriticalSection_Expect();
|
|
||||||
vFakePortExitCriticalSection_Expect();
|
|
||||||
|
|
||||||
/* API call. */
|
|
||||||
/* No new core is enabled for this task. */
|
|
||||||
uxNewCoreAffinityMask = ( 1U << 0 );
|
|
||||||
vTaskCoreAffinitySet( &xTaskTCB, uxNewCoreAffinityMask );
|
|
||||||
|
|
||||||
/* Validations. */
|
|
||||||
TEST_ASSERT_EQUAL( uxNewCoreAffinityMask, xTaskTCB.uxCoreAffinityMask );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief prvYieldForTask - running task with xTaskRunState equals to configNUMBER_OF_CORES.
|
* @brief prvYieldForTask - running task with xTaskRunState equals to configNUMBER_OF_CORES.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue