diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-08-26 02:13:38 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-08-26 02:13:38 +0000 |
commit | bd039332dd319bb1caf03ae1ecd835e0446d48b7 (patch) | |
tree | bad9598a99e31a9ed6a8d565c8504bd3b70fe308 /testsuites | |
parent | 2009-08-25 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-bd039332dd319bb1caf03ae1ecd835e0446d48b7.tar.bz2 |
2009-08-25 Sebastian Huber <Sebastian.Huber@embedded-brains.de>
* sp59/init.c, sp59/sp59.scn: Added status code assignment. Fixed typos.
* sp63/init.c: Check return value of _Heap_Initialize().
Diffstat (limited to 'testsuites')
-rw-r--r-- | testsuites/sptests/ChangeLog | 5 | ||||
-rw-r--r-- | testsuites/sptests/sp59/init.c | 6 | ||||
-rw-r--r-- | testsuites/sptests/sp59/sp59.scn | 4 | ||||
-rw-r--r-- | testsuites/sptests/sp63/init.c | 10 |
4 files changed, 17 insertions, 8 deletions
diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog index ff7cba32c4..422e89e152 100644 --- a/testsuites/sptests/ChangeLog +++ b/testsuites/sptests/ChangeLog @@ -1,3 +1,8 @@ +2009-08-25 Sebastian Huber <Sebastian.Huber@embedded-brains.de> + + * sp59/init.c, sp59/sp59.scn: Added status code assignment. Fixed typos. + * sp63/init.c: Check return value of _Heap_Initialize(). + 2009-08-19 Joel Sherrill <joel.sherrill@OARcorp.com> * spwatchdog/spwatchdog.scn, spwatchdog/task1.c: Add test for diff --git a/testsuites/sptests/sp59/init.c b/testsuites/sptests/sp59/init.c index fd0bce867f..a0edc327e8 100644 --- a/testsuites/sptests/sp59/init.c +++ b/testsuites/sptests/sp59/init.c @@ -23,7 +23,7 @@ rtems_task Blocking_task( void *address_1; puts( "Blocking_task - wait for memory" ); - rtems_region_get_segment( + status = rtems_region_get_segment( Region, ALLOC_SIZE, RTEMS_DEFAULT_OPTIONS, @@ -79,7 +79,7 @@ rtems_task Init( ); directive_failed( status, "rtems_region_create of RN1" ); - puts( "TA1 - rtems_region_get_segment - get segment to consume memory" ); + puts( "Init - rtems_region_get_segment - get segment to consume memory" ); rtems_region_get_segment( Region, ALLOC_SIZE, @@ -93,7 +93,7 @@ rtems_task Init( status = rtems_task_wake_after( RTEMS_MILLISECONDS_TO_TICKS(1000) ); directive_failed( status, "rtems_task_wake_after" ); - puts( "Init1 - rtems_region_get_segment - return segment" ); + puts( "Init - rtems_region_get_segment - return segment" ); status = rtems_region_return_segment( Region, address_1 ); directive_failed( status, "rtems_region_return_segment" ); diff --git a/testsuites/sptests/sp59/sp59.scn b/testsuites/sptests/sp59/sp59.scn index b67699fbea..3c539dba8d 100644 --- a/testsuites/sptests/sp59/sp59.scn +++ b/testsuites/sptests/sp59/sp59.scn @@ -3,10 +3,10 @@ Init - blocking task priority will be 220 Init - rtems_task_create - delay task - OK Init - rtems_task_start - delay task - OK Init - rtems_region_create - OK -TA1 - rtems_region_get_segment - get segment to consume memory +Init - rtems_region_get_segment - get segment to consume memory Init - rtems_task_wake_after - let other task block - OK Blocking_task - wait for memory -Init1 - rtems_region_get_segment - return segment +Init - rtems_region_get_segment - return segment Init - rtems_task_wake_after - let other task run again - OK Blocking_task - Got memory segment after freed Blocking_task - delete self diff --git a/testsuites/sptests/sp63/init.c b/testsuites/sptests/sp63/init.c index ee551d817a..c0a704caca 100644 --- a/testsuites/sptests/sp63/init.c +++ b/testsuites/sptests/sp63/init.c @@ -30,6 +30,7 @@ void test_case_one(void) puts( "Init - _Heap_Initialize (for test one) - OK" ); heap_size = _Heap_Initialize( &Heap, Memory, sizeof(Memory), 8 ); printf( "Init - Heap size=%d\n", heap_size ); + assert( heap_size ); puts( "Init - _Heap_Allocate - too large size (overflow)- not OK"); ptr1 = _Heap_Allocate( &Heap, 0xffffffff ); @@ -59,6 +60,7 @@ void test_case_two(void) puts( "\nInit - _Heap_Initialize (for test two) - OK" ); heap_size = _Heap_Initialize( &Heap, Memory, sizeof(Memory), 8 ); printf( "Init - Heap size=%d\n", heap_size ); + assert( heap_size ); puts( "Init - _Heap_Allocate_aligned - OK"); ptr1 = _Heap_Allocate_aligned( &Heap, 64, 4 ); @@ -97,9 +99,11 @@ void test_case_three(void) for ( alloc=4 ; alloc < sizeof(Memory)/2 ; alloc+=4 ) { heap_size = _Heap_Initialize( &Heap, &Memory[sz], sizeof(Memory)/2, 1 << pg ); - do { - ptr1 = _Heap_Allocate_aligned( &Heap, alloc, 1 <<al ); - } while ( ptr1 ); + if ( heap_size != 0 ) { + do { + ptr1 = _Heap_Allocate_aligned( &Heap, alloc, 1 <<al ); + } while ( ptr1 ); + } } } } |