Changeset a611d80 in rtems


Ignore:
Timestamp:
Sep 28, 2009, 6:10:52 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
8d8c1f1
Parents:
2e43e6c
Message:

2009-09-28 Joel Sherrill <joel.sherrill@…>

  • sp33/init.c, sp33/sp33.scn: Add some barrier error cases uncovered by uC5282 coverage runs.
Location:
testsuites/sptests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • testsuites/sptests/ChangeLog

    r2e43e6c ra611d80  
     12009-09-28      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * sp33/init.c, sp33/sp33.scn: Add some barrier error cases uncovered by
     4        uC5282 coverage runs.
     5
    162009-09-27      Joel Sherrill <joel.sherrill@oarcorp.com>
    27
  • testsuites/sptests/sp33/init.c

    r2e43e6c ra611d80  
    11/*
    2  *  spmonotonic -- sanity check the rate monotonic manager
    3  *
    42 *  COPYRIGHT (c) 1989-2009.
    53 *  On-Line Applications Research Corporation (OAR).
     
    7674
    7775  /* Check bad argument cases */
    78   puts( "Delete barrier with bad id" );
     76  puts( "rtems_barrier_delete - bad id - INVALID_ID" );
    7977  status = rtems_barrier_delete( 100 );
    8078  fatal_directive_status(
     
    8482  );
    8583
    86   puts( "Release barrier with bad id" );
     84  puts( "rtems_barrier_release - bad id - INVALID_ID" );
    8785  status = rtems_barrier_release( 100, &released );
    8886  fatal_directive_status(
     
    9290  );
    9391
    94   puts( "Wait on barrier with bad id" );
     92  puts( "rtems_barrier_wait - bad id - INVALID_ID" );
    9593  status = rtems_barrier_wait( 100, 10 );
    9694  fatal_directive_status(
     
    111109  );
    112110
     111  /* create barrier with bad name */
     112  puts( "rtems_barrier_create - bad name - INVALID_NAME" );
     113  status = rtems_barrier_create(
     114    0, RTEMS_BARRIER_AUTOMATIC_RELEASE, 1, &Barrier);
     115  fatal_directive_status(
     116    status,
     117    RTEMS_INVALID_NAME,
     118    "rtems_barrier_create did not return RTEMS_INVALID_NAME"
     119  );
     120
     121  /* create barrier with bad id return address */
     122  puts( "rtems_barrier_create - NULL barrier ID - INVALID_ADDRESS" );
     123  status = rtems_barrier_create(name, RTEMS_BARRIER_AUTOMATIC_RELEASE, 1, NULL);
     124  fatal_directive_status(
     125    status,
     126    RTEMS_INVALID_ADDRESS,
     127    "rtems_barrier_create did not return RTEMS_INVALID_ADDRESS"
     128  );
     129
    113130  /* Create barrier */
    114   puts( "Create barrier" );
     131  puts( "rtems_barrier_create - OK" );
    115132  status = rtems_barrier_create( name, RTEMS_DEFAULT_ATTRIBUTES, 0, &Barrier );
    116133  directive_failed(status, "rtems_barrier_create");
    117134
    118135  /* Check for creating too many */
    119   puts( "Create too many barriers" );
     136  puts( "rtems_barrier_create - too many" );
    120137  status = rtems_barrier_create( name, RTEMS_DEFAULT_ATTRIBUTES, 0, &Barrier );
    121138  fatal_directive_status(
     
    139156    RTEMS_TIMEOUT,
    140157    "rtems_barrier_wait did not timeout"
     158  );
     159
     160  /* Release with bad return pointer */
     161  puts( "rtems_barrier_release - NULL return count - INVALID_ADDRESS" );
     162  status = rtems_barrier_release( Barrier, NULL );
     163  fatal_directive_status(
     164    status,
     165    RTEMS_INVALID_ADDRESS,
     166    "rtems_barrier_release bad return pointer"
    141167  );
    142168
     
    209235  directive_failed(status, "rtems_task_wake_after");
    210236
    211   puts( "Delete barrier" );
     237  puts( "rtems_barrier_delete - OK" );
    212238  status = rtems_barrier_delete( Barrier );
    213239  directive_failed(status, "rtems_barrier_delete");
     
    218244
    219245  /* Create barrier with automatic release */
    220   puts( "Create barrier" );
     246  puts( "rtems_barrier_create - OK" );
    221247  status = rtems_barrier_create(
    222248    name, RTEMS_BARRIER_AUTOMATIC_RELEASE, CONFIGURE_MAXIMUM_TASKS-1, &Barrier
  • testsuites/sptests/sp33/sp33.scn

    r2e43e6c ra611d80  
    11*** TEST 33 ***
    2 Delete barrier with bad id
    3 Release barrier with bad id
    4 Wait on barrier with bad id
     2rtems_barrier_delete - bad id - INVALID_ID
     3rtems_barrier_release - bad id - INVALID_ID
     4rtems_barrier_wait - bad id - INVALID_ID
    55Create barrier with automatic release and 0 max waiters
    6 Create barrier
    7 Create too many barriers
     6rtems_barrier_create - bad name - INVALID_NAME
     7rtems_barrier_create - NULL barrier ID - INVALID_ADDRESS
     8rtems_barrier_create - OK
     9rtems_barrier_create - too many
    810Check barrier ident
    911Wait on barrier w/timeout and TIMEOUT
     12rtems_barrier_release - NULL return count - INVALID_ADDRESS
    1013
    1114*** Testing manual release of barrier ***
     
    2831Waiter 2 waiting on barrier
    2932Waiter 3 waiting on barrier
    30 Delete barrier
     33rtems_barrier_delete - OK
    3134Delay to let Waiters print a message
    3235Waiter 0 back from barrier
     
    3437Waiter 2 back from barrier
    3538Waiter 3 back from barrier
    36 Create barrier
     39rtems_barrier_create - OK
    3740
    3841*** Testing automatic release of barrier ***
Note: See TracChangeset for help on using the changeset viewer.