Changeset fba809c in rtems


Ignore:
Timestamp:
Aug 6, 2009, 8:35:41 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
684e243d
Parents:
53afba12
Message:

2009-08-06 Joel Sherrill <joel.sherrill@…>

  • sp64/init.c, sp64/sp64.scn: Chris ensured that nothing is moved until all memory is successfully allocated. This means the test can validate the heap is unchanged on extend failure.
Location:
testsuites/sptests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • testsuites/sptests/ChangeLog

    r53afba12 rfba809c  
     12009-08-06      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * sp64/init.c, sp64/sp64.scn: Chris ensured that nothing is moved until
     4        all memory is successfully allocated. This means the test can
     5        validate the heap is unchanged on extend failure.
     6
    172009-08-06      Joel Sherrill <joel.sherrill@OARcorp.com>
    28
  • testsuites/sptests/sp64/init.c

    r53afba12 rfba809c  
    2929
    3030  puts( "\n\n*** TEST 64 ***" );
    31  
     31
    3232  puts( "Allocate one region -- so second auto extends" );
    3333  sc = rtems_region_create(
     
    7676  puts( "Init - rtems_region_create - auto-extend - RTEMS_UNSATISFIED" );
    7777  while (1) {
    78    
     78
    7979    sb = rtems_workspace_allocate( to_alloc, &alloced );
    8080    assert( sb );
    81    
     81
    8282    sc = rtems_region_create(
    8383      rtems_build_name( 'R', 'N', '2', ' ' ),
     
    100100    }
    101101
    102 /*
    103  *  Extending the object structure can fail after it has extended one
    104  *  part of the object management information but not another.  Chris
    105  *  needs to think about this. XXX TBD
    106  */
    107 #if 0
    108102    /*
    109      * Verify heap is still in same shape if we couldn't allocate a task
     103     * Verify heap is still in same shape if we couldn't allocate a region
    110104     */
    111105    sb = rtems_workspace_get_information( &info );
     
    117111    assert( info.Free.largest == start.Free.largest );
    118112    assert( info.Free.number  == start.Free.number  );
    119 #endif
    120113
    121114    to_alloc -= 8;
     
    127120    rtems_test_exit(0);
    128121
    129   /* another Chris thinking case .. will this shrink back to exactly
    130    * the same? TBD XXX
    131    */
    132 #if 0
    133122  /*
    134123   * Verify heap is still in same shape after we free the region
     
    138127  assert( sc == 0 );
    139128
    140   puts( "Init - verify workspace has same memory" );
    141   sb = rtems_workspace_get_information( &info );
     129  /*
     130   *  Although it is intuitive that after deleting the region the
     131   *  object space would shrink and go back to its original shape,
     132   *  we could end up with fragmentation which prevents a simple
     133   *  check from verifying this.
     134   */
    142135  #if 0
    143     printf( "Init - workspace free/blocks = %d/%d\n",
     136    puts( "Init - verify workspace has same memory" );
     137    sb = rtems_workspace_get_information( &info );
     138    #if 0
     139        printf( "Init - workspace free/blocks = %d/%d\n",
    144140      info.Free.largest, info.Free.number );
     141    #endif
     142    assert( sb );
     143    assert( info.Free.largest == start.Free.largest );
     144    assert( info.Free.number  == start.Free.number  );
    145145  #endif
    146   assert( sb );
    147   assert( info.Free.largest == start.Free.largest );
    148   assert( info.Free.number  == start.Free.number  );
    149 #endif
    150146
    151147  puts( "*** END OF TEST 63 ***" );
  • testsuites/sptests/sp64/sp64.scn

    r53afba12 rfba809c  
    33Init - rtems_workspace_get_information - OK
    44Init - rtems_region_create - auto-extend - RTEMS_UNSATISFIED
     5Init - rtems_region_delete - OK
    56*** END OF TEST 63 ***
Note: See TracChangeset for help on using the changeset viewer.