Changeset ef6d53b9 in rtems for testsuites/sptests/sp51


Ignore:
Timestamp:
May 22, 2009, 6:10:07 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
8ef7f20
Parents:
e379e96
Message:

2009-05-22 Joel Sherrill <joel.sherrill@…>

  • sp51/init.c, sp51/sp51.scn: Add more priority ceiling test cases.
Location:
testsuites/sptests/sp51
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • testsuites/sptests/sp51/init.c

    re379e96 ref6d53b9  
    2121  puts( "\n\n*** TEST 51 ***" );
    2222
    23   puts( "Create semaphore" );
     23  puts( "Create semaphore - priority ceiling locked - violate ceiling" );
     24  sc = rtems_semaphore_create(
     25    rtems_build_name( 'S', 'E', 'M', '1' ),
     26    0,
     27    RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY_CEILING | RTEMS_PRIORITY,
     28    (RTEMS_MAXIMUM_PRIORITY - 4u),
     29    &mutex
     30  );
     31  fatal_directive_status(sc, RTEMS_INVALID_PRIORITY, "rtems_semaphore_create");
     32
     33  puts( "Create semaphore - priority ceiling unlocked" );
    2434  sc = rtems_semaphore_create(
    2535    rtems_build_name( 'S', 'E', 'M', '1' ),
     
    3343  puts( "Obtain semaphore -- violate ceiling" );
    3444  sc = rtems_semaphore_obtain( mutex, RTEMS_DEFAULT_OPTIONS, 0 );
    35   fatal_directive_status( sc, RTEMS_INTERNAL_ERROR, "rtems_semaphore_obtain" );
     45  fatal_directive_status(
     46    sc, RTEMS_INVALID_PRIORITY, "rtems_semaphore_obtain" );
    3647
    37   puts( "Release semaphore we did not obtain-- violate ceiling" );
     48  /* This returns successful because RTEMS eats the unneeded unlock */
     49  puts( "Release semaphore we did not obtain" );
    3850  sc = rtems_semaphore_release( mutex );
    3951  fatal_directive_status(
    40     sc, RTEMS_NOT_OWNER_OF_RESOURCE, "rtems_semaphore_release" );
     52    sc, RTEMS_SUCCESSFUL, "rtems_semaphore_release" );
    4153
    4254  puts( "*** END OF TEST 51 ***" );
  • testsuites/sptests/sp51/sp51.scn

    re379e96 ref6d53b9  
     1*** TEST 51 ***
     2Create semaphore - priority ceiling locked - violate ceiling
     3Create semaphore - priority ceiling unlocked
     4Obtain semaphore -- violate ceiling
     5Release semaphore we did not obtain
     6*** END OF TEST 51 ***
Note: See TracChangeset for help on using the changeset viewer.