diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-01-07 15:26:46 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-01-07 15:26:46 +0000 |
commit | 14a64dc59e3a8000e8809407075e118e23cbeb61 (patch) | |
tree | 5f989fb4c34b4c185d3900e9cc46e9f2aca767a4 /testsuites/sptests | |
parent | Convert to UNIX CR/LF. (diff) | |
download | rtems-14a64dc59e3a8000e8809407075e118e23cbeb61.tar.bz2 |
2008-01-07 Joel Sherrill <joel.sherrill@oarcorp.com>
* sp09/screen07.c, sp09/screen12.c, sp09/screen14.c, sp09/sp09.scn
Add test cases for:
+ message queue create requesting too many message buffers
for the available memory
+ region extend with address inside existing heap
+ timer server initiate too large a stack, create error
* sp12/pritask.c, sp12/sp12.scn: Add test cases for:
+ task set priority while holding resource
Diffstat (limited to 'testsuites/sptests')
-rw-r--r-- | testsuites/sptests/ChangeLog | 11 | ||||
-rw-r--r-- | testsuites/sptests/sp09/screen07.c | 19 | ||||
-rw-r--r-- | testsuites/sptests/sp09/screen12.c | 14 | ||||
-rw-r--r-- | testsuites/sptests/sp09/screen14.c | 14 | ||||
-rw-r--r-- | testsuites/sptests/sp09/sp09.scn | 5 | ||||
-rw-r--r-- | testsuites/sptests/sp12/pritask.c | 19 | ||||
-rw-r--r-- | testsuites/sptests/sp12/sp12.scn | 3 |
7 files changed, 77 insertions, 8 deletions
diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog index 7bc1154d39..d9e8c376e1 100644 --- a/testsuites/sptests/ChangeLog +++ b/testsuites/sptests/ChangeLog @@ -1,5 +1,16 @@ 2008-01-07 Joel Sherrill <joel.sherrill@oarcorp.com> + * sp09/screen07.c, sp09/screen12.c, sp09/screen14.c, sp09/sp09.scn + Add test cases for: + + message queue create requesting too many message buffers + for the available memory + + region extend with address inside existing heap + + timer server initiate too large a stack, create error + * sp12/pritask.c, sp12/sp12.scn: Add test cases for: + + task set priority while holding resource + +2008-01-07 Joel Sherrill <joel.sherrill@oarcorp.com> + * Makefile.am, configure.ac: Added sp38 and sp39. * sp38/.cvsignore, sp38/Makefile.am, sp38/init.c, sp38/sp38.scn, sp38/system.h, sp39/.cvsignore, sp39/Makefile.am, sp39/init.c, diff --git a/testsuites/sptests/sp09/screen07.c b/testsuites/sptests/sp09/screen07.c index 571108276b..1e2c2ec31c 100644 --- a/testsuites/sptests/sp09/screen07.c +++ b/testsuites/sptests/sp09/screen07.c @@ -70,6 +70,21 @@ void Screen7() #endif puts( "TA1 - rtems_message_queue_create - Q 1 - RTEMS_MP_NOT_CONFIGURED" ); + /* not enough memory for messages */ + status = rtems_message_queue_create( + Queue_name[ 1 ], + 1000000, /* 1 million messages should do it */ + MESSAGE_SIZE, + RTEMS_DEFAULT_ATTRIBUTES, + &Queue_id[ 1 ] + ); + fatal_directive_status( + status, + RTEMS_UNSATISFIED, + "rtems_message_queue_create unsatisfied" + ); + puts( "TA1 - rtems_message_queue_create - Q 2 - RTEMS_UNSATISFIED" ); + status = rtems_message_queue_create( Queue_name[ 1 ], 2, @@ -78,9 +93,7 @@ void Screen7() &Queue_id[ 1 ] ); directive_failed( status, "rtems_message_queue_create successful" ); - puts( - "TA1 - rtems_message_queue_create - Q 1 - 2 DEEP - RTEMS_SUCCESSFUL" - ); + puts( "TA1 - rtems_message_queue_create - Q 1 - 2 DEEP - RTEMS_SUCCESSFUL" ); status = rtems_message_queue_create( Queue_name[ 2 ], diff --git a/testsuites/sptests/sp09/screen12.c b/testsuites/sptests/sp09/screen12.c index 749f56a020..069f578a76 100644 --- a/testsuites/sptests/sp09/screen12.c +++ b/testsuites/sptests/sp09/screen12.c @@ -6,7 +6,7 @@ * * Output parameters: NONE * - * COPYRIGHT (c) 1989-1999. + * COPYRIGHT (c) 1989-2007. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -127,6 +127,18 @@ void Screen12() directive_failed( status, "rtems_region_create" ); puts( "TA1 - rtems_region_create - RTEMS_SUCCESSFUL" ); + status = rtems_region_extend( + Region_id[ 1 ], + &Region_good_area[ REGION_START_OFFSET ], + REGION_LENGTH - 1 + ); + fatal_directive_status( + status, + RTEMS_INVALID_ADDRESS, + "rtems_region_extend with address in heap" + ); + puts( "TA1 - rtems_region_extend - address within - RTEMS_INVALID_ADDRESS" ); + status = rtems_region_create( Region_name[ 1 ], Region_good_area, diff --git a/testsuites/sptests/sp09/screen14.c b/testsuites/sptests/sp09/screen14.c index b53ae326e2..20ffe24093 100644 --- a/testsuites/sptests/sp09/screen14.c +++ b/testsuites/sptests/sp09/screen14.c @@ -187,10 +187,22 @@ void Screen14() ); puts( "TA1 - rtems_timer_initiate_server - RTEMS_INVALID_PRIORITY" ); + status = rtems_timer_initiate_server( + RTEMS_TIMER_SERVER_DEFAULT_PRIORITY, + 0x10000000, + 0 + ); + fatal_directive_status( + status, + RTEMS_UNSATISFIED, + "rtems_timer_initiate_server too much stack " + ); + puts( "TA1 - rtems_timer_initiate_server - RTEMS_UNSATISFIED" ); + status = rtems_timer_initiate_server( RTEMS_TIMER_SERVER_DEFAULT_PRIORITY, 0, 0 ); directive_failed( status, "rtems_timer_initiate_server" ); - puts( "TA1 - rtems_timer_initiate_server" ); + puts( "TA1 - rtems_timer_initiate_server - SUCCESSFUL" ); status = rtems_timer_server_fire_after( 0x010100, diff --git a/testsuites/sptests/sp09/sp09.scn b/testsuites/sptests/sp09/sp09.scn index 8690776a70..2262218734 100644 --- a/testsuites/sptests/sp09/sp09.scn +++ b/testsuites/sptests/sp09/sp09.scn @@ -104,6 +104,7 @@ TA1 - rtems_task_delete TA2 - already deleted RTEMS_INVALID_ID TA1 - rtems_message_queue_broadcast - RTEMS_INVALID_ID TA1 - rtems_message_queue_create - Q 1 - RTEMS_INVALID_NAME TA1 - rtems_message_queue_create - Q 1 - RTEMS_MP_NOT_CONFIGURED +TA1 - rtems_message_queue_create - Q 2 - RTEMS_UNSATISFIED TA1 - rtems_message_queue_create - Q 1 - 2 DEEP - RTEMS_SUCCESSFUL TA1 - rtems_message_queue_create - Q 2 - RTEMS_TOO_MANY TA1 - rtems_message_queue_delete - unknown RTEMS_INVALID_ID @@ -209,6 +210,7 @@ TA1 - rtems_region_create - RTEMS_INVALID_ADDRESS TA1 - rtems_region_create - RTEMS_INVALID_SIZE TA1 - rtems_region_create - RTEMS_INVALID_ADDRESS TA1 - rtems_region_create - RTEMS_SUCCESSFUL +TA1 - rtems_region_extend - address within - RTEMS_INVALID_ADDRESS TA1 - rtems_region_create - RTEMS_TOO_MANY TA1 - rtems_region_delete - unknown RTEMS_INVALID_ID TA1 - rtems_region_delete - local RTEMS_INVALID_ID @@ -278,7 +280,8 @@ TA1 - rtems_timer_get_information - RTEMS_INVALID_ID TA1 - rtems_timer_server_fire_after - RTEMS_INCORRECT_STATE TA1 - rtems_timer_server_fire_when - RTEMS_INCORRECT_STATE TA1 - rtems_timer_initiate_server - RTEMS_INVALID_PRIORITY -TA1 - rtems_timer_initiate_server +TA1 - rtems_timer_initiate_server - RTEMS_UNSATISFIED +TA1 - rtems_timer_initiate_server - SUCCESSFUL TA1 - rtems_timer_server_fire_after - RTEMS_INVALID_ID TA1 - rtems_timer_server_fire_when - RTEMS_INVALID_ID TA1 - rtems_timer_server_fire_after - RTEMS_INVALID_NUMBER diff --git a/testsuites/sptests/sp12/pritask.c b/testsuites/sptests/sp12/pritask.c index 47c74d6e1d..8aa3a0aea4 100644 --- a/testsuites/sptests/sp12/pritask.c +++ b/testsuites/sptests/sp12/pritask.c @@ -7,7 +7,7 @@ * * Output parameters: NONE * - * COPYRIGHT (c) 1989-1999. + * COPYRIGHT (c) 1989-2007. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -51,6 +51,23 @@ rtems_task Priority_task( rtems_test_exit( 0 ); } + /* special case of setting priority while holding a resource */ + { + rtems_task_priority priority; + rtems_task_priority old_priority; + + puts( "Set priority of self while holding resource" ); + status = + rtems_task_set_priority( RTEMS_SELF, RTEMS_CURRENT_PRIORITY, &priority ); + directive_failed( status, "rtems_task_set_priority get current" ); + status = rtems_task_set_priority( RTEMS_SELF, priority, &old_priority ); + directive_failed( status, "rtems_task_set_priority with resource" ); + if ( priority != old_priority ) { + printf( "priority != old_priority (%d != %d)\n", priority, old_priority ); + rtems_test_exit(0); + } + } + if ( its_index == 5 ) puts( "PRI5 - rtems_task_suspend - until all priority tasks blocked" ); status = rtems_task_suspend( RTEMS_SELF ); diff --git a/testsuites/sptests/sp12/sp12.scn b/testsuites/sptests/sp12/sp12.scn index e75a804b0c..180aa04395 100644 --- a/testsuites/sptests/sp12/sp12.scn +++ b/testsuites/sptests/sp12/sp12.scn @@ -17,6 +17,7 @@ INIT - rtems_semaphore_create - allocated binary semaphore INIT - rtems_semaphore_release - allocated binary semaphore INIT - rtems_semaphore_delete - allocated binary semaphore PRI5 - rtems_semaphore_obtain - wait forever on SM2 +Set priority of self while holding resource PRI5 - rtems_task_suspend - until all priority tasks blocked PDRV - priority of PRI5 is 67 PRI4 - rtems_semaphore_obtain - wait forever on SM2 @@ -35,7 +36,7 @@ PRI5 - rtems_semaphore_release - nested PRI5 - rtems_semaphore_release - restore priority PRI5 - priority of PRI5 is 68 <pause> -TA1 - rtems_semaphore_ident - smid => 18010002 +TA1 - rtems_semaphore_ident - smid => 1a010009 TA1 - rtems_semaphore_obtain - wait forever on SM2 TA1 - got SM2 TA1 - rtems_semaphore_obtain - wait forever on SM3 |