Changeset ac81b6ca in rtems


Ignore:
Timestamp:
08/14/96 19:41:47 (26 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
fb7d080
Parents:
ff53a6d4
Message:

added test cases for NULL being passed to pthread attribute get routines

Files:
2 edited

Legend:

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

    rff53a6d4 rac81b6ca  
    217217  assert( status == EINVAL );
    218218 
     219  puts( "Init: pthread_attr_getinheritsched - EINVAL (NULL inheritsched)" );
     220  status = pthread_attr_getinheritsched( &attr, NULL );
     221  assert( status == EINVAL );
     222 
    219223  puts( "Init: pthread_attr_getinheritsched - EINVAL (not initialized attr)" );
    220224  status = pthread_attr_getinheritsched( &destroyed_attr, &inheritsched );
     
    251255  assert( status == EINVAL );
    252256 
     257  puts( "Init: pthread_attr_getschedpolicy - EINVAL (NULL schedpolicy)" );
     258  status = pthread_attr_getschedpolicy( &attr, NULL );
     259  assert( status == EINVAL );
     260 
    253261  puts( "Init: pthread_attr_getschedpolicy - EINVAL (not initialized attr)" );
    254262  status = pthread_attr_getschedpolicy( &destroyed_attr, &schedpolicy );
     
    285293  assert( status == EINVAL );
    286294 
     295  puts( "Init: pthread_attr_getstacksize - EINVAL (NULL stacksize)" );
     296  status = pthread_attr_getstacksize( &attr, NULL );
     297  assert( status == EINVAL );
     298 
    287299  puts( "Init: pthread_attr_getstacksize - EINVAL (not initialized attr)" );
    288300  status = pthread_attr_getstacksize( &destroyed_attr, &stacksize );
     
    315327  assert( status == EINVAL );
    316328 
     329  puts( "Init: pthread_attr_getstackaddr - EINVAL (NULL stackaddr)" );
     330  status = pthread_attr_getstackaddr( &attr, NULL );
     331  assert( status == EINVAL );
     332 
    317333  puts( "Init: pthread_attr_getstackaddr - EINVAL (not initialized attr)" );
    318334  status = pthread_attr_getstackaddr( &destroyed_attr, &stackaddr );
     
    347363  puts( "Init: pthread_attr_getdetachstate - EINVAL (NULL attr)" );
    348364  status = pthread_attr_getdetachstate( NULL, &detachstate );
     365  assert( status == EINVAL );
     366 
     367  puts( "Init: pthread_attr_getdetachstate - EINVAL (NULL detatchstate)" );
     368  status = pthread_attr_getdetachstate( &attr, NULL );
    349369  assert( status == EINVAL );
    350370 
  • testsuites/psxtests/psx07/init.c

    rff53a6d4 rac81b6ca  
    217217  assert( status == EINVAL );
    218218 
     219  puts( "Init: pthread_attr_getinheritsched - EINVAL (NULL inheritsched)" );
     220  status = pthread_attr_getinheritsched( &attr, NULL );
     221  assert( status == EINVAL );
     222 
    219223  puts( "Init: pthread_attr_getinheritsched - EINVAL (not initialized attr)" );
    220224  status = pthread_attr_getinheritsched( &destroyed_attr, &inheritsched );
     
    251255  assert( status == EINVAL );
    252256 
     257  puts( "Init: pthread_attr_getschedpolicy - EINVAL (NULL schedpolicy)" );
     258  status = pthread_attr_getschedpolicy( &attr, NULL );
     259  assert( status == EINVAL );
     260 
    253261  puts( "Init: pthread_attr_getschedpolicy - EINVAL (not initialized attr)" );
    254262  status = pthread_attr_getschedpolicy( &destroyed_attr, &schedpolicy );
     
    285293  assert( status == EINVAL );
    286294 
     295  puts( "Init: pthread_attr_getstacksize - EINVAL (NULL stacksize)" );
     296  status = pthread_attr_getstacksize( &attr, NULL );
     297  assert( status == EINVAL );
     298 
    287299  puts( "Init: pthread_attr_getstacksize - EINVAL (not initialized attr)" );
    288300  status = pthread_attr_getstacksize( &destroyed_attr, &stacksize );
     
    315327  assert( status == EINVAL );
    316328 
     329  puts( "Init: pthread_attr_getstackaddr - EINVAL (NULL stackaddr)" );
     330  status = pthread_attr_getstackaddr( &attr, NULL );
     331  assert( status == EINVAL );
     332 
    317333  puts( "Init: pthread_attr_getstackaddr - EINVAL (not initialized attr)" );
    318334  status = pthread_attr_getstackaddr( &destroyed_attr, &stackaddr );
     
    347363  puts( "Init: pthread_attr_getdetachstate - EINVAL (NULL attr)" );
    348364  status = pthread_attr_getdetachstate( NULL, &detachstate );
     365  assert( status == EINVAL );
     366 
     367  puts( "Init: pthread_attr_getdetachstate - EINVAL (NULL detatchstate)" );
     368  status = pthread_attr_getdetachstate( &attr, NULL );
    349369  assert( status == EINVAL );
    350370 
Note: See TracChangeset for help on using the changeset viewer.