change log for rtems (2011-09-20)
rtems-vc at rtems.org
rtems-vc at rtems.org
Tue Sep 20 13:10:34 UTC 2011
*joel*:
2011-09-20 Petr Benes <benesp16 at fel.cvut.cz>
PR 1916/testing
* rtems/src/ratemondelete.c, score/src/schedulercbsreleasejob.c,
score/src/scheduleredfupdate.c, score/src/scheduleredfyield.c: Rework
to improve coverage.
M 1.2924 cpukit/ChangeLog
M 1.12 cpukit/rtems/src/ratemondelete.c
M 1.2 cpukit/score/src/schedulercbsreleasejob.c
M 1.2 cpukit/score/src/scheduleredfupdate.c
M 1.2 cpukit/score/src/scheduleredfyield.c
diff -u rtems/cpukit/ChangeLog:1.2923 rtems/cpukit/ChangeLog:1.2924
--- rtems/cpukit/ChangeLog:1.2923 Fri Sep 16 04:16:31 2011
+++ rtems/cpukit/ChangeLog Tue Sep 20 08:06:41 2011
@@ -1,3 +1,10 @@
+2011-09-20 Petr Benes <benesp16 at fel.cvut.cz>
+
+ PR 1916/testing
+ * rtems/src/ratemondelete.c, score/src/schedulercbsreleasejob.c,
+ score/src/scheduleredfupdate.c, score/src/scheduleredfyield.c: Rework
+ to improve coverage.
+
2011-09-16 Sebastian Huber <sebastian.huber at embedded-brains.de>
* libmisc/shell/shell-wait-for-input.c: New file.
diff -u rtems/cpukit/rtems/src/ratemondelete.c:1.11 rtems/cpukit/rtems/src/ratemondelete.c:1.12
--- rtems/cpukit/rtems/src/ratemondelete.c:1.11 Thu Sep 1 13:13:54 2011
+++ rtems/cpukit/rtems/src/ratemondelete.c Tue Sep 20 08:06:41 2011
@@ -47,11 +47,11 @@
switch ( location ) {
case OBJECTS_LOCAL:
+ _Scheduler_Release_job(the_period->owner, 0);
_Objects_Close( &_Rate_monotonic_Information, &the_period->Object );
(void) _Watchdog_Remove( &the_period->Timer );
the_period->state = RATE_MONOTONIC_INACTIVE;
_Rate_monotonic_Free( the_period );
- _Scheduler_Release_job(the_period->owner, 0);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
diff -u rtems/cpukit/score/src/schedulercbsreleasejob.c:1.1 rtems/cpukit/score/src/schedulercbsreleasejob.c:1.2
--- rtems/cpukit/score/src/schedulercbsreleasejob.c:1.1 Thu Sep 15 10:49:32 2011
+++ rtems/cpukit/score/src/schedulercbsreleasejob.c Tue Sep 20 08:06:41 2011
@@ -31,7 +31,7 @@
if (deadline) {
/* Initializing or shifting deadline. */
- if (serv_info && serv_info->parameters.budget)
+ if (serv_info)
new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline)
& ~SCHEDULER_EDF_PRIO_MSB;
else
@@ -44,7 +44,7 @@
}
/* Budget replenishment for the next job. */
- if (serv_info && serv_info->parameters.budget)
+ if (serv_info)
the_thread->cpu_time_budget = serv_info->parameters.budget;
the_thread->real_priority = new_priority;
diff -u rtems/cpukit/score/src/scheduleredfupdate.c:1.1 rtems/cpukit/score/src/scheduleredfupdate.c:1.2
--- rtems/cpukit/score/src/scheduleredfupdate.c:1.1 Sun Sep 11 15:52:37 2011
+++ rtems/cpukit/score/src/scheduleredfupdate.c Tue Sep 20 08:06:42 2011
@@ -35,16 +35,4 @@
the_thread->current_priority = the_thread->Start.initial_priority;
sched_info->queue_state = SCHEDULER_EDF_QUEUE_STATE_NOT_PRESENTLY;
}
-
- if ( sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_YES ) {
- _RBTree_Extract(&_Scheduler_EDF_Ready_queue, the_node);
- _RBTree_Insert(&_Scheduler_EDF_Ready_queue, the_node);
-
- _Scheduler_EDF_Schedule();
- if ( _Thread_Executing != _Thread_Heir ) {
- if ( _Thread_Executing->is_preemptible ||
- the_thread->current_priority == 0 )
- _Thread_Dispatch_necessary = true;
- }
- }
}
diff -u rtems/cpukit/score/src/scheduleredfyield.c:1.1 rtems/cpukit/score/src/scheduleredfyield.c:1.2
--- rtems/cpukit/score/src/scheduleredfyield.c:1.1 Sun Sep 11 15:52:37 2011
+++ rtems/cpukit/score/src/scheduleredfyield.c Tue Sep 20 08:06:42 2011
@@ -21,8 +21,6 @@
void _Scheduler_EDF_Yield(void)
{
- Scheduler_EDF_Per_thread *first_info;
- RBTree_Node *first_node;
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
@@ -32,26 +30,17 @@
_ISR_Disable( level );
- if ( !_RBTree_Has_only_one_node(&_Scheduler_EDF_Ready_queue) ) {
- /*
- * The RBTree has more than one node, enqueue behind the tasks
- * with the same priority in case there are such ones.
- */
- _RBTree_Extract( &_Scheduler_EDF_Ready_queue, executing_node );
- _RBTree_Insert( &_Scheduler_EDF_Ready_queue, executing_node );
-
- _ISR_Flash( level );
-
- if ( _Thread_Is_heir( executing ) ) {
- first_node = _RBTree_Peek( &_Scheduler_EDF_Ready_queue, RBT_LEFT );
- first_info =
- _RBTree_Container_of(first_node, Scheduler_EDF_Per_thread, Node);
- _Thread_Heir = first_info->thread;
- }
- _Thread_Dispatch_necessary = true;
- }
- else if ( !_Thread_Is_heir( executing ) )
- _Thread_Dispatch_necessary = true;
+ /*
+ * The RBTree has more than one node, enqueue behind the tasks
+ * with the same priority in case there are such ones.
+ */
+ _RBTree_Extract( &_Scheduler_EDF_Ready_queue, executing_node );
+ _RBTree_Insert( &_Scheduler_EDF_Ready_queue, executing_node );
+
+ _ISR_Flash( level );
+
+ _Scheduler_EDF_Schedule();
+ _Thread_Dispatch_necessary = true;
_ISR_Enable( level );
}
*joel*:
2011-09-20 Petr Benes <benesp16 at fel.cvut.cz>
PR 1916/testing
* spcbssched02/init.c, spcbssched02/spcbssched02.scn,
spcbssched02/system.h, spcbssched02/task_periodic.c,
spedfsched03/init.c, spedfsched03/system.h,
spedfsched03/tasks_aperiodic.c: Improve coverage.
M 1.487 testsuites/sptests/ChangeLog
M 1.2 testsuites/sptests/spcbssched02/init.c
M 1.2 testsuites/sptests/spcbssched02/spcbssched02.scn
M 1.2 testsuites/sptests/spcbssched02/system.h
M 1.2 testsuites/sptests/spcbssched02/task_periodic.c
M 1.2 testsuites/sptests/spedfsched03/init.c
M 1.2 testsuites/sptests/spedfsched03/system.h
M 1.2 testsuites/sptests/spedfsched03/tasks_aperiodic.c
diff -u rtems/testsuites/sptests/ChangeLog:1.486 rtems/testsuites/sptests/ChangeLog:1.487
--- rtems/testsuites/sptests/ChangeLog:1.486 Thu Sep 15 10:58:46 2011
+++ rtems/testsuites/sptests/ChangeLog Tue Sep 20 08:06:58 2011
@@ -1,3 +1,11 @@
+2011-09-20 Petr Benes <benesp16 at fel.cvut.cz>
+
+ PR 1916/testing
+ * spcbssched02/init.c, spcbssched02/spcbssched02.scn,
+ spcbssched02/system.h, spcbssched02/task_periodic.c,
+ spedfsched03/init.c, spedfsched03/system.h,
+ spedfsched03/tasks_aperiodic.c: Improve coverage.
+
2011-09-15 Joel Sherrill <joel.sherrill at oarcorp.com>
* spcbssched01/Makefile.am, spcbssched02/Makefile.am,
diff -u rtems/testsuites/sptests/spcbssched02/init.c:1.1 rtems/testsuites/sptests/spcbssched02/init.c:1.2
--- rtems/testsuites/sptests/spcbssched02/init.c:1.1 Thu Sep 15 10:56:01 2011
+++ rtems/testsuites/sptests/spcbssched02/init.c Tue Sep 20 08:06:58 2011
@@ -47,6 +47,7 @@
puts( "\n\n*** TEST CBS SCHEDULER 2 ***" );
Task_name = rtems_build_name( 'P', 'T', '1', ' ' );
+ Task_name2 = rtems_build_name( 'P', 'T', '2', ' ' );
status = rtems_task_create(
Task_name,
@@ -58,6 +59,16 @@
);
directive_failed( status, "rtems_task_create loop" );
+ status = rtems_task_create(
+ Task_name2,
+ Priority,
+ RTEMS_MINIMUM_STACK_SIZE * 4,
+ RTEMS_NO_PREEMPT,
+ RTEMS_DEFAULT_ATTRIBUTES,
+ &Task_id2
+ );
+ directive_failed( status, "rtems_task_create loop" );
+
printf( "Init: Initializing the CBS\n" );
if ( rtems_cbs_initialize() )
printf( "ERROR: CBS INITIALIZATION FAILED\n" );
@@ -88,6 +99,8 @@
printf( "ERROR: CREATE SERVER FAILED\n" );
if ( rtems_cbs_create_server( ¶ms, NULL, &server_id ) )
printf( "ERROR: CREATE SERVER FAILED\n" );
+ if ( rtems_cbs_create_server( ¶ms, NULL, &server_id ) )
+ printf( "ERROR: CREATE SERVER FAILED\n" );
if ( rtems_cbs_create_server( ¶ms, NULL, &server_id ) !=
SCHEDULER_CBS_ERROR_FULL )
printf( "ERROR: CREATE SERVER PASSED UNEXPECTEDLY\n" );
@@ -217,11 +230,25 @@
if ( rtems_cbs_initialize() )
printf( "ERROR: CBS INITIALIZATION FAILED\n" );
- /* Start periodic task */
+ /* Start periodic tasks */
printf( "Init: Starting periodic task\n" );
status = rtems_task_start( Task_id, Task_Periodic, 1 );
directive_failed( status, "rtems_task_start periodic" );
+ status = rtems_task_start( Task_id2, Task_Periodic, 2 );
+ directive_failed( status, "rtems_task_start periodic" );
+
+ rtems_task_wake_after( 130 );
+
+ printf( "Init: Checking server with a deleted task\n" );
+ if ( rtems_cbs_get_execution_time( 0, &exec_time, &abs_time ) )
+ printf( "ERROR: GET EXECUTION TIME FAILED\n" );
+ if ( rtems_cbs_get_remaining_budget( 0, &remaining_budget) )
+ printf( "ERROR: GET REMAINING BUDGET FAILED\n" );
+
+ if ( rtems_cbs_cleanup() )
+ printf( "ERROR: CBS CLEANUP\n" );
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
+ fflush(stdout);
+ puts( "*** END OF TEST CBS SCHEDULER 2 ***" );
+ rtems_test_exit( 0 );
}
diff -u rtems/testsuites/sptests/spcbssched02/spcbssched02.scn:1.1 rtems/testsuites/sptests/spcbssched02/spcbssched02.scn:1.2
--- rtems/testsuites/sptests/spcbssched02/spcbssched02.scn:1.1 Thu Sep 15 10:56:01 2011
+++ rtems/testsuites/sptests/spcbssched02/spcbssched02.scn Tue Sep 20 08:06:58 2011
@@ -27,4 +27,6 @@
P1-S ticks:91
P1-F ticks:101
P1-S ticks:121
+Periodic task: Deleting self
+Init: Checking server with a deleted task
*** END OF TEST CBS SCHEDULER 2 ***
diff -u rtems/testsuites/sptests/spcbssched02/system.h:1.1 rtems/testsuites/sptests/spcbssched02/system.h:1.2
--- rtems/testsuites/sptests/spcbssched02/system.h:1.1 Thu Sep 15 10:56:01 2011
+++ rtems/testsuites/sptests/spcbssched02/system.h Tue Sep 20 08:06:58 2011
@@ -32,7 +32,7 @@
#define CONFIGURE_MICROSECONDS_PER_TICK 100000
-#define CONFIGURE_MAXIMUM_TASKS 2
+#define CONFIGURE_MAXIMUM_TASKS 3
#define CONFIGURE_MAXIMUM_PERIODS 10
#define CONFIGURE_INIT_TASK_PRIORITY 100
@@ -54,6 +54,8 @@
rtems_id Task_id;
rtems_name Task_name;
+rtems_id Task_id2;
+rtems_name Task_name2;
rtems_task_priority Priority;
time_t Period;
time_t Execution;
diff -u rtems/testsuites/sptests/spcbssched02/task_periodic.c:1.1 rtems/testsuites/sptests/spcbssched02/task_periodic.c:1.2
--- rtems/testsuites/sptests/spcbssched02/task_periodic.c:1.1 Thu Sep 15 10:56:01 2011
+++ rtems/testsuites/sptests/spcbssched02/task_periodic.c Tue Sep 20 08:06:58 2011
@@ -34,61 +34,64 @@
params.deadline = Period;
params.budget = Execution+1;
- printf( "Periodic task: Create server and Attach thread\n" );
- if ( rtems_cbs_create_server( ¶ms, NULL, &server_id ) )
- printf( "ERROR: CREATE SERVER FAILED\n" );
- if ( rtems_cbs_attach_thread( server_id, Task_id ) )
- printf( "ERROR: ATTACH THREAD FAILED\n" );
-
- printf( "Periodic task: ID and Get parameters\n" );
- if ( rtems_cbs_get_server_id( Task_id, &tsid ) )
- printf( "ERROR: GET SERVER ID FAILED\n" );
- if ( tsid != server_id )
- printf( "ERROR: SERVER ID MISMATCH\n" );
- if ( rtems_cbs_get_parameters( server_id, &tparams ) )
- printf( "ERROR: GET PARAMETERS FAILED\n" );
- if ( params.deadline != tparams.deadline ||
- params.budget != tparams.budget )
- printf( "ERROR: PARAMETERS MISMATCH\n" );
-
- printf( "Periodic task: Detach thread and Destroy server\n" );
- if ( rtems_cbs_detach_thread( server_id, Task_id ) )
- printf( "ERROR: DETACH THREAD FAILED\n" );
- if ( rtems_cbs_destroy_server( server_id ) )
- printf( "ERROR: DESTROY SERVER FAILED\n" );
- if ( rtems_cbs_create_server( ¶ms, NULL, &server_id ) )
- printf( "ERROR: CREATE SERVER FAILED\n" );
-
- printf( "Periodic task: Remaining budget and Execution time\n" );
- if ( rtems_cbs_get_remaining_budget( server_id, &remaining_budget ) )
- printf( "ERROR: GET REMAINING BUDGET FAILED\n" );
- if ( remaining_budget != params.budget )
- printf( "ERROR: REMAINING BUDGET MISMATCH\n" );
- if ( rtems_cbs_get_execution_time( server_id, &exec_time, &abs_time ) )
- printf( "ERROR: GET EXECUTION TIME FAILED\n" );
-
- printf( "Periodic task: Set parameters\n" );
- if ( rtems_cbs_attach_thread( server_id, Task_id ) )
- printf( "ERROR: ATTACH THREAD FAILED\n" );
- params.deadline = Period * 2;
- params.budget = Execution * 2 +1;
- if ( rtems_cbs_set_parameters( server_id, ¶ms ) )
- printf( "ERROR: SET PARAMS FAILED\n" );
- if ( rtems_cbs_get_parameters( server_id, &tparams ) )
- printf( "ERROR: GET PARAMS FAILED\n" );
- if ( params.deadline != tparams.deadline ||
- params.budget != tparams.budget )
- printf( "ERROR: PARAMS MISMATCH\n" );
- params.deadline = Period;
- params.budget = Execution+1;
- if ( rtems_cbs_set_parameters( server_id, ¶ms ) )
- printf( "ERROR: SET PARAMS FAILED\n" );
- if ( rtems_cbs_get_approved_budget( server_id, &approved_budget ) )
- printf( "ERROR: GET APPROVED BUDGET FAILED\n" );
-
- printf( "Periodic task: Approved budget\n" );
- if ( approved_budget != params.budget )
- printf( "ERROR: APPROVED BUDGET MISMATCH\n" );
+ /* Taks 1 will be attached to a server, task 2 not. */
+ if ( argument == 1 ) {
+ printf( "Periodic task: Create server and Attach thread\n" );
+ if ( rtems_cbs_create_server( ¶ms, NULL, &server_id ) )
+ printf( "ERROR: CREATE SERVER FAILED\n" );
+ if ( rtems_cbs_attach_thread( server_id, Task_id ) )
+ printf( "ERROR: ATTACH THREAD FAILED\n" );
+
+ printf( "Periodic task: ID and Get parameters\n" );
+ if ( rtems_cbs_get_server_id( Task_id, &tsid ) )
+ printf( "ERROR: GET SERVER ID FAILED\n" );
+ if ( tsid != server_id )
+ printf( "ERROR: SERVER ID MISMATCH\n" );
+ if ( rtems_cbs_get_parameters( server_id, &tparams ) )
+ printf( "ERROR: GET PARAMETERS FAILED\n" );
+ if ( params.deadline != tparams.deadline ||
+ params.budget != tparams.budget )
+ printf( "ERROR: PARAMETERS MISMATCH\n" );
+
+ printf( "Periodic task: Detach thread and Destroy server\n" );
+ if ( rtems_cbs_detach_thread( server_id, Task_id ) )
+ printf( "ERROR: DETACH THREAD FAILED\n" );
+ if ( rtems_cbs_destroy_server( server_id ) )
+ printf( "ERROR: DESTROY SERVER FAILED\n" );
+ if ( rtems_cbs_create_server( ¶ms, NULL, &server_id ) )
+ printf( "ERROR: CREATE SERVER FAILED\n" );
+
+ printf( "Periodic task: Remaining budget and Execution time\n" );
+ if ( rtems_cbs_get_remaining_budget( server_id, &remaining_budget ) )
+ printf( "ERROR: GET REMAINING BUDGET FAILED\n" );
+ if ( remaining_budget != params.budget )
+ printf( "ERROR: REMAINING BUDGET MISMATCH\n" );
+ if ( rtems_cbs_get_execution_time( server_id, &exec_time, &abs_time ) )
+ printf( "ERROR: GET EXECUTION TIME FAILED\n" );
+
+ printf( "Periodic task: Set parameters\n" );
+ if ( rtems_cbs_attach_thread( server_id, Task_id ) )
+ printf( "ERROR: ATTACH THREAD FAILED\n" );
+ params.deadline = Period * 2;
+ params.budget = Execution * 2 +1;
+ if ( rtems_cbs_set_parameters( server_id, ¶ms ) )
+ printf( "ERROR: SET PARAMS FAILED\n" );
+ if ( rtems_cbs_get_parameters( server_id, &tparams ) )
+ printf( "ERROR: GET PARAMS FAILED\n" );
+ if ( params.deadline != tparams.deadline ||
+ params.budget != tparams.budget )
+ printf( "ERROR: PARAMS MISMATCH\n" );
+ params.deadline = Period;
+ params.budget = Execution+1;
+ if ( rtems_cbs_set_parameters( server_id, ¶ms ) )
+ printf( "ERROR: SET PARAMS FAILED\n" );
+ if ( rtems_cbs_get_approved_budget( server_id, &approved_budget ) )
+ printf( "ERROR: GET APPROVED BUDGET FAILED\n" );
+
+ printf( "Periodic task: Approved budget\n" );
+ if ( approved_budget != params.budget )
+ printf( "ERROR: APPROVED BUDGET MISMATCH\n" );
+ }
status = rtems_rate_monotonic_create( argument, &rmid );
directive_failed( status, "rtems_rate_monotonic_create" );
@@ -129,10 +132,7 @@
printf("rtems_rate_monotonic_delete failed with status of %d.\n", status);
rtems_test_exit( 0 );
}
- if ( rtems_cbs_cleanup() )
- printf( "ERROR: CBS CLEANUP\n" );
-
- fflush(stdout);
- puts( "*** END OF TEST CBS SCHEDULER 2 ***" );
- rtems_test_exit( 0 );
+ printf( "Periodic task: Deleting self\n" );
+ status = rtems_task_delete( RTEMS_SELF );
+ directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
}
diff -u rtems/testsuites/sptests/spedfsched03/init.c:1.1 rtems/testsuites/sptests/spedfsched03/init.c:1.2
--- rtems/testsuites/sptests/spedfsched03/init.c:1.1 Sun Sep 11 15:56:45 2011
+++ rtems/testsuites/sptests/spedfsched03/init.c Tue Sep 20 08:06:58 2011
@@ -56,6 +56,8 @@
directive_failed( status, "rtems_task_start loop" );
}
+ rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
+
status = rtems_task_delete( RTEMS_SELF );
directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
}
diff -u rtems/testsuites/sptests/spedfsched03/system.h:1.1 rtems/testsuites/sptests/spedfsched03/system.h:1.2
--- rtems/testsuites/sptests/spedfsched03/system.h:1.1 Sun Sep 11 15:56:45 2011
+++ rtems/testsuites/sptests/spedfsched03/system.h Tue Sep 20 08:06:58 2011
@@ -40,7 +40,7 @@
#define CONFIGURE_MAXIMUM_PERIODS 10
#define CONFIGURE_INIT_TASK_PRIORITY 100
-#define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_DEFAULT_MODES
+#define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_NO_PREEMPT
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_EXTRA_TASK_STACKS (6 * 4 * RTEMS_MINIMUM_STACK_SIZE)
diff -u rtems/testsuites/sptests/spedfsched03/tasks_aperiodic.c:1.1 rtems/testsuites/sptests/spedfsched03/tasks_aperiodic.c:1.2
--- rtems/testsuites/sptests/spedfsched03/tasks_aperiodic.c:1.1 Sun Sep 11 15:56:45 2011
+++ rtems/testsuites/sptests/spedfsched03/tasks_aperiodic.c Tue Sep 20 08:06:58 2011
@@ -21,16 +21,21 @@
rtems_task_argument argument
)
{
- rtems_status_code status;
- int start;
- int stop;
- int now;
+ rtems_status_code status;
+ int start;
+ int stop;
+ int now;
put_name( Task_name[ argument ], FALSE );
status = rtems_task_wake_after( 2 + Phases[argument] );
directive_failed( status, "rtems_task_wake_after" );
+ if ( argument == 6 ) {
+ rtems_task_suspend( Task_id[5] );
+ rtems_task_resume( Task_id[5] );
+ }
+
rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start);
printf("AT%" PRIdPTR "-S ticks:%d\n", argument, start);
/* active computing */
--
Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20110920/a6a367bc/attachment.html>
More information about the vc
mailing list