Ticket #1923: cbs_coverage2.diff

File cbs_coverage2.diff, 4.9 KB (added by Petr Benes, on 09/24/11 at 16:35:06)

EDF, CBS and RBTree improve coverage

  • cpukit/score/src/schedulercbsgetexecutiontime.c

    diff --git a/cpukit/score/src/schedulercbsgetexecutiontime.c b/cpukit/score/src/schedulercbsgetexecutiontime.c
    index b7bcab5..709858e 100644
    a b int _Scheduler_CBS_Get_execution_time ( 
    3131    return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
    3232  if ( !_Scheduler_CBS_Server_list[server_id] )
    3333    return SCHEDULER_CBS_ERROR_NOSERVER;
    34   if ( !_Scheduler_CBS_Server_list[server_id]->task_id ) {
     34  if ( _Scheduler_CBS_Server_list[server_id]->task_id == -1 ) {
    3535    *exec_time = 0;
    3636    return SCHEDULER_CBS_OK;
    3737  }
  • testsuites/sptests/spcbssched02/spcbssched02.scn

    diff --git a/testsuites/sptests/spcbssched02/spcbssched02.scn b/testsuites/sptests/spcbssched02/spcbssched02.scn
    index 6f6017b..56173eb 100644
    a b Periodic task: Remaining budget and Execution time 
    1818Periodic task: Set parameters
    1919Periodic task: Approved budget
    2020Periodic task: Starting periodic behavior
     21Periodic task: Starting periodic behavior
    2122P1-S ticks:1
    2223P1-F ticks:11
     24P2-S ticks:11
     25P2-F ticks:21
    2326P1-S ticks:31
    2427P1-F ticks:41
     28P2-S ticks:41
     29P2-F ticks:51
    2530P1-S ticks:61
    2631P1-F ticks:71
     32P2-S ticks:71
     33P2-F ticks:81
    2734P1-S ticks:91
    2835P1-F ticks:101
     36P2-S ticks:101
     37P2-F ticks:111
    2938P1-S ticks:121
    3039Periodic task: Deleting self
    3140Init: Checking server with a deleted task
  • testsuites/sptests/spcbssched02/system.h

    diff --git a/testsuites/sptests/spcbssched02/system.h b/testsuites/sptests/spcbssched02/system.h
    index b61201e..b34ab10 100644
    a b rtems_task Task_Periodic( 
    3030#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
    3131#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
    3232
    33 #define CONFIGURE_MICROSECONDS_PER_TICK 100000
     33#define CONFIGURE_MICROSECONDS_PER_TICK 20000
    3434
    3535#define CONFIGURE_MAXIMUM_TASKS               3
    3636#define CONFIGURE_MAXIMUM_PERIODS             10
  • testsuites/sptests/spcbssched03/init.c

    diff --git a/testsuites/sptests/spcbssched03/init.c b/testsuites/sptests/spcbssched03/init.c
    index 9586595..cb8f9e1 100644
    a b rtems_task Init( 
    5858    directive_failed( status, "rtems_task_start loop" );
    5959  }
    6060
     61  rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
     62
    6163  status = rtems_task_delete( RTEMS_SELF );
    6264  directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
    6365}
  • testsuites/sptests/spcbssched03/system.h

    diff --git a/testsuites/sptests/spcbssched03/system.h b/testsuites/sptests/spcbssched03/system.h
    index 05e6df2..23736a3 100644
    a b rtems_task Tasks_Aperiodic( 
    3434#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
    3535#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
    3636
    37 #define CONFIGURE_MICROSECONDS_PER_TICK 100000
     37#define CONFIGURE_MICROSECONDS_PER_TICK 20000
    3838
    3939#define CONFIGURE_MAXIMUM_TASKS               7
    4040#define CONFIGURE_MAXIMUM_PERIODS             10
    4141
    4242#define CONFIGURE_INIT_TASK_PRIORITY          100
    43 #define CONFIGURE_INIT_TASK_INITIAL_MODES     RTEMS_DEFAULT_MODES
     43#define CONFIGURE_INIT_TASK_INITIAL_MODES     RTEMS_NO_PREEMPT
    4444#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
    4545
    4646#define CONFIGURE_EXTRA_TASK_STACKS         (6 * 4 * RTEMS_MINIMUM_STACK_SIZE)
  • testsuites/sptests/spedfsched02/system.h

    diff --git a/testsuites/sptests/spedfsched02/system.h b/testsuites/sptests/spedfsched02/system.h
    index b69e49d..8007684 100644
    a b void Get_all_counters( void ); 
    3838#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
    3939#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
    4040
    41 #define CONFIGURE_MICROSECONDS_PER_TICK 100000
     41#define CONFIGURE_MICROSECONDS_PER_TICK 20000
    4242
    4343#define CONFIGURE_MAXIMUM_TASKS               7
    4444#define CONFIGURE_MAXIMUM_PERIODS             10
  • testsuites/sptests/spedfsched03/system.h

    diff --git a/testsuites/sptests/spedfsched03/system.h b/testsuites/sptests/spedfsched03/system.h
    index 01edc1c..01f6399 100644
    a b rtems_task Tasks_Aperiodic( 
    3434#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
    3535#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
    3636
    37 #define CONFIGURE_MICROSECONDS_PER_TICK 100000
     37#define CONFIGURE_MICROSECONDS_PER_TICK 20000
    3838
    3939#define CONFIGURE_MAXIMUM_TASKS               7
    4040#define CONFIGURE_MAXIMUM_PERIODS             10
  • testsuites/sptests/sprbtree01/init.c

    diff --git a/testsuites/sptests/sprbtree01/init.c b/testsuites/sptests/sprbtree01/init.c
    index e2147bc..6560b18 100644
    a b rtems_task Init( 
    465465    puts ( "INIT - ERROR ON RBTREE NULL GRANDPARENT MISMATCH" );
    466466  if ( _RBTree_Is_red( NULL ) != 0 )
    467467    puts ( "INIT - ERROR ON RBTREE NULL IS RED MISMATCH" );
     468  if ( _RBTree_Is_red( rbtree1.root ) != 0 )
     469    puts ( "INIT - ERROR ON RBTREE NULL IS RED MISMATCH" );
    468470
    469471  puts( "INIT - Removing 100 nodes" );
    470472