diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-12-14 14:52:35 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-02-03 10:00:52 +0100 |
commit | 26335844f484c8cd061444cebba9480b62d165cb (patch) | |
tree | ccfc446db291d329a723c6f1eb22e570216bc63b /testsuites | |
parent | Optional Classic Tasks initialization (diff) | |
download | rtems-26335844f484c8cd061444cebba9480b62d165cb.tar.bz2 |
Optional Classic Timer initialization
Update #2408.
Diffstat (limited to 'testsuites')
-rw-r--r-- | testsuites/sptests/sp43/init.c | 6 | ||||
-rw-r--r-- | testsuites/sptests/sp43/sp43.scn | 10 | ||||
-rw-r--r-- | testsuites/sptests/spsysinit01/init.c | 17 |
3 files changed, 28 insertions, 5 deletions
diff --git a/testsuites/sptests/sp43/init.c b/testsuites/sptests/sp43/init.c index dbea7fa645..03fe5a5958 100644 --- a/testsuites/sptests/sp43/init.c +++ b/testsuites/sptests/sp43/init.c @@ -412,6 +412,12 @@ rtems_task Init( print_class_info( OBJECTS_CLASSIC_API, OBJECTS_RTEMS_TASKS, &info ); puts( "rtems_object_get_class_information - Classic Timers - OK" ); + sc = rtems_timer_create(0, NULL); + fatal_directive_status( + sc, + RTEMS_INVALID_NAME, + "rtems_timer_create" + ); sc = rtems_object_get_class_information( OBJECTS_CLASSIC_API, OBJECTS_RTEMS_TIMERS, &info ); directive_failed( sc, "rtems_object_get_class_information" ); diff --git a/testsuites/sptests/sp43/sp43.scn b/testsuites/sptests/sp43/sp43.scn index f34fc33a78..9594f12772 100644 --- a/testsuites/sptests/sp43/sp43.scn +++ b/testsuites/sptests/sp43/sp43.scn @@ -1,5 +1,5 @@ -*** TEST 43 *** -RTEMS Version: rtems-4.10.99.0(SPARC/w/FPU/sis) +*** BEGIN OF TEST SP 43 *** +RTEMS Version: rtems-4.11.99.0(SPARC/w/FPU/sis) rtems_object_get_classic_name - INVALID_ADDRESS rtems_object_get_classic_name - INVALID_ID (bad index) rtems_object_get_classic_name - INVALID_ID (unallocated index) @@ -29,8 +29,8 @@ rtems_object_set_name - change name of init task to (N) N - name returned by rtems_object_get_classic_name rtems_object_get_name returned (N ) for init task rtems_object_set_name - change name of init task to () -* - name returned by rtems_object_get_classic_name -rtems_object_get_name returned () for init task + - name returned by rtems_object_get_classic_name +rtems_object_get_name returned ( ) for init task rtems_object_set_name - change name of init task to (N-0x07-0x09-1) N**1 - name returned by rtems_object_get_classic_name rtems_object_get_name returned (N**1) for init task @@ -91,4 +91,4 @@ rtems_task_set_priority - use valid Idle thread id again rtems_task_set_priority - restore internal thread class info rtems_semaphore_obtain - good but uncreated ID - INVALID_ID - OK rtems_object_get_classic_name - bad API pointer - INVALID_ID -*** END OF TEST 43 *** +*** END OF TEST SP 43 *** diff --git a/testsuites/sptests/spsysinit01/init.c b/testsuites/sptests/spsysinit01/init.c index 4a707dedba..6d05e0f89d 100644 --- a/testsuites/sptests/spsysinit01/init.c +++ b/testsuites/sptests/spsysinit01/init.c @@ -26,6 +26,7 @@ #include <rtems/extensionimpl.h> #include <rtems/rtems/tasksimpl.h> +#include <rtems/rtems/timerimpl.h> #include <rtems/score/apimutex.h> #include <rtems/score/sysstate.h> #include <rtems/score/userextimpl.h> @@ -46,6 +47,8 @@ typedef enum { USER_EXTENSIONS_POST, CLASSIC_TASKS_PRE, CLASSIC_TASKS_POST, + CLASSIC_TIMER_PRE, + CLASSIC_TIMER_POST, IDLE_THREADS_PRE, IDLE_THREADS_POST, BSP_LIBC_PRE, @@ -163,6 +166,18 @@ LAST(RTEMS_SYSINIT_CLASSIC_TASKS) next_step(CLASSIC_TASKS_POST); } +FIRST(RTEMS_SYSINIT_CLASSIC_TIMER) +{ + assert(_Timer_Information.maximum == 0); + next_step(CLASSIC_TIMER_PRE); +} + +LAST(RTEMS_SYSINIT_CLASSIC_TIMER) +{ + assert(_Timer_Information.maximum != 0); + next_step(CLASSIC_TIMER_POST); +} + FIRST(RTEMS_SYSINIT_IDLE_THREADS) { assert(_System_state_Is_before_initialization(_System_state_Get())); @@ -250,6 +265,8 @@ static void Init(rtems_task_argument arg) #define CONFIGURE_MAXIMUM_TASKS 1 +#define CONFIGURE_MAXIMUM_TIMERS 1 + #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #define CONFIGURE_STACK_CHECKER_ENABLED |