Changeset da2e539 in rtems


Ignore:
Timestamp:
08/09/96 21:16:01 (27 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
da4e38d
Parents:
b9444fb9
Message:

added test cases for errors in pthread_mutexattr_getpshared

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/tests/psxtests/psx05/init.c

    rb9444fb9 rda2e539  
    8181  struct timespec      times;
    8282  struct sched_param   param;
     83  int                  pshared;
    8384  int                  policy;
    8485  int                  ceiling;
     
    123124  puts( "Init: pthread_mutexattr_destroy - EINVAL (not initialized)" );
    124125  status = pthread_mutexattr_destroy( &destroyed_attr );
     126  assert( status == EINVAL );
     127
     128  /* error cases for set and get attributes routines */
     129
     130  puts( "Init: pthread_mutexattr_getpshared - EINVAL (NULL attr)" );
     131  status = pthread_mutexattr_getpshared( NULL, &pshared );
     132  assert( status == EINVAL );
     133 
     134  puts( "Init: pthread_mutexattr_getpshared - EINVAL (NULL attr)" );
     135  status = pthread_mutexattr_getpshared( &attr, NULL );
     136  assert( status == EINVAL );
     137 
     138  puts( "Init: pthread_mutexattr_getpshared - EINVAL (not initialized)" );
     139  status = pthread_mutexattr_getpshared( &destroyed_attr, &pshared );
    125140  assert( status == EINVAL );
    126141
     
    393408  puts( "Init: pthread_mutex_lock - EINVAL (priority ceiling violation)" );
    394409  status = pthread_mutex_lock( &Mutex2_id );
    395   if ( status != EDEADLK )
     410  if ( status != EINVAL )
    396411    printf( "status = %d\n", status );
    397412  assert( status == EINVAL );
  • testsuites/psxtests/psx05/init.c

    rb9444fb9 rda2e539  
    8181  struct timespec      times;
    8282  struct sched_param   param;
     83  int                  pshared;
    8384  int                  policy;
    8485  int                  ceiling;
     
    123124  puts( "Init: pthread_mutexattr_destroy - EINVAL (not initialized)" );
    124125  status = pthread_mutexattr_destroy( &destroyed_attr );
     126  assert( status == EINVAL );
     127
     128  /* error cases for set and get attributes routines */
     129
     130  puts( "Init: pthread_mutexattr_getpshared - EINVAL (NULL attr)" );
     131  status = pthread_mutexattr_getpshared( NULL, &pshared );
     132  assert( status == EINVAL );
     133 
     134  puts( "Init: pthread_mutexattr_getpshared - EINVAL (NULL attr)" );
     135  status = pthread_mutexattr_getpshared( &attr, NULL );
     136  assert( status == EINVAL );
     137 
     138  puts( "Init: pthread_mutexattr_getpshared - EINVAL (not initialized)" );
     139  status = pthread_mutexattr_getpshared( &destroyed_attr, &pshared );
    125140  assert( status == EINVAL );
    126141
     
    393408  puts( "Init: pthread_mutex_lock - EINVAL (priority ceiling violation)" );
    394409  status = pthread_mutex_lock( &Mutex2_id );
    395   if ( status != EDEADLK )
     410  if ( status != EINVAL )
    396411    printf( "status = %d\n", status );
    397412  assert( status == EINVAL );
Note: See TracChangeset for help on using the changeset viewer.