summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/sp30
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-12-14 17:44:15 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-12-14 17:44:15 +0000
commit6bc19a148a3ea5306c21f71a63b3c4b7d91077c9 (patch)
tree842a5c159e836ed7e4db607cfbbfc742d7bd36b3 /testsuites/sptests/sp30
parent2007-12-14 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-6bc19a148a3ea5306c21f71a63b3c4b7d91077c9.tar.bz2
2007-12-14 Joel Sherrill <joel.sherrill@OARcorp.com>
* sp09/screen07.c, sp09/sp09.scn: Add test for rtems_message_queue_broadcast for bad buffer and count pointers. * sp30/init.c, sp30/sp30.scn: Add test for initiating timer server with bad priority or initiating twice. * sp37/sp37.scn, sp37/system.h: Add test for rtems_clock_tick when it forces a dispatch. * sp37/init.c: New file.
Diffstat (limited to 'testsuites/sptests/sp30')
-rw-r--r--testsuites/sptests/sp30/init.c30
-rw-r--r--testsuites/sptests/sp30/sp30.scn7
2 files changed, 35 insertions, 2 deletions
diff --git a/testsuites/sptests/sp30/init.c b/testsuites/sptests/sp30/init.c
index 525ac4301e..03eda41dfa 100644
--- a/testsuites/sptests/sp30/init.c
+++ b/testsuites/sptests/sp30/init.c
@@ -39,6 +39,20 @@ rtems_task Init(
status = rtems_clock_set( &time );
directive_failed( status, "rtems_clock_set" );
+ /* initiate with bad priority */
+ puts( "timer_initiate_server -- INVALID_PRIORITY" );
+ status = rtems_timer_initiate_server(
+ 1000,
+ RTEMS_MINIMUM_STACK_SIZE,
+ RTEMS_DEFAULT_ATTRIBUTES
+ );
+ fatal_directive_status(
+ status,
+ RTEMS_INVALID_PRIORITY,
+ "rtems_timer_initiate_server bad priority"
+ );
+
+ puts( "timer_initiate_server -- OK" );
status = rtems_timer_initiate_server(
RTEMS_TIMER_SERVER_DEFAULT_PRIORITY,
RTEMS_MINIMUM_STACK_SIZE,
@@ -46,6 +60,22 @@ rtems_task Init(
);
directive_failed( status, "rtems_timer_initiate_server" );
+ puts( "timer_initiate_server -- already started" );
+ status = rtems_timer_initiate_server(
+ RTEMS_TIMER_SERVER_DEFAULT_PRIORITY,
+ RTEMS_MINIMUM_STACK_SIZE,
+ RTEMS_DEFAULT_ATTRIBUTES
+ );
+ fatal_directive_status(
+ status,
+ RTEMS_INCORRECT_STATE,
+ "rtems_timer_initiate_server already started"
+ );
+
+ /*
+ * Create test tasks
+ */
+
Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' );
diff --git a/testsuites/sptests/sp30/sp30.scn b/testsuites/sptests/sp30/sp30.scn
index 9a7ac23124..5950d890c7 100644
--- a/testsuites/sptests/sp30/sp30.scn
+++ b/testsuites/sptests/sp30/sp30.scn
@@ -1,16 +1,19 @@
*** TEST 30 ***
+timer_initiate_server -- INVALID_PRIORITY
+timer_initiate_server -- OK
+timer_initiate_server -- already started
TA1 - rtems_clock_get - 09:00:00 12/31/1988
TA2 - rtems_clock_get - 09:00:00 12/31/1988
TA3 - rtems_clock_get - 09:00:00 12/31/1988
TA1 - rtems_clock_get - 09:00:05 12/31/1988
TA2 - rtems_clock_get - 09:00:10 12/31/1988
TA1 - rtems_clock_get - 09:00:10 12/31/1988
-TA3 - rtems_clock_get - 09:00:15 12/31/1988
TA1 - rtems_clock_get - 09:00:15 12/31/1988
+TA3 - rtems_clock_get - 09:00:15 12/31/1988
TA2 - rtems_clock_get - 09:00:20 12/31/1988
TA1 - rtems_clock_get - 09:00:20 12/31/1988
TA1 - rtems_clock_get - 09:00:25 12/31/1988
-TA3 - rtems_clock_get - 09:00:30 12/31/1988
TA2 - rtems_clock_get - 09:00:30 12/31/1988
TA1 - rtems_clock_get - 09:00:30 12/31/1988
+TA3 - rtems_clock_get - 09:00:30 12/31/1988
*** END OF TEST 30 ***