Ignore:
Timestamp:
May 17, 2016, 3:23:44 PM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
e753748
Parents:
8830bfe6
git-author:
Sebastian Huber <sebastian.huber@…> (05/17/16 15:23:44)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/20/16 05:49:36)
Message:

psxclassic01: Assume correct pthread_detach()

Update #2714.

Location:
testsuites/psxtests/psxclassic01
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • testsuites/psxtests/psxclassic01/init.c

    r8830bfe6 r12a1228c  
    100100  }
    101101  puts( "test_task exiting thread" );
    102   pthread_exit( 0 );
     102  pthread_exit( (void *) 123 );
    103103}
    104104
    105 rtems_task Init(rtems_task_argument arg)
     105
     106static rtems_id create_task( void )
    106107{
    107108  rtems_status_code sc;
    108109  rtems_id          task_id;
    109   int               status;
    110   void             *retval;
    111 
    112   TEST_BEGIN();
    113110
    114111  sc = rtems_task_create(
     
    125122  rtems_test_assert( sc == RTEMS_SUCCESSFUL );
    126123
     124  return task_id;
     125}
     126
     127rtems_task Init( rtems_task_argument arg )
     128{
     129  rtems_id  task_id;
     130  int       status;
     131  void     *retval;
     132
     133  TEST_BEGIN();
     134
     135  task_id = create_task();
    127136
    128137  puts( "Init - pthread_equal on Classic Ids" );
     
    137146  rtems_test_assert( status == 0 );
    138147
     148  retval = (void *) 456;
    139149  status = pthread_join( task_id, &retval );
    140   if ( status != EINVAL ) printf( "JOIN %s\n", strerror( status ) );
    141   rtems_test_assert( status == EINVAL );
     150  rtems_test_assert( status == ESRCH );
     151  rtems_test_assert( retval == (void *) 456 );
     152
     153  status = pthread_kill( task_id, SIGUSR1 );
     154  rtems_test_assert( status == ESRCH );
     155
     156  task_id = create_task();
    142157
    143158  status = pthread_kill( task_id, SIGUSR1 );
    144159  rtems_test_assert( status == 0 );
     160
     161  status = pthread_join( task_id, &retval );
     162  rtems_test_assert( status == 0 );
     163  rtems_test_assert( retval == (void *) 123 );
    145164
    146165  TEST_END();
  • testsuites/psxtests/psxclassic01/psxclassic01.scn

    r8830bfe6 r12a1228c  
    1 *** START OF CLASSIC API TEST OF POSIX 01 ***
     1*** BEGIN OF TEST PSXCLASSIC 1 ***
    22test_task starting...
    33test_task waiting for signal...
    44Init - pthread_equal on Classic Ids
    55Init - pthread_cancel on Classic Task
     6test_task starting...
     7test_task waiting for signal...
    68Signal_info: 25 si_signo= 0 si_code= 0 value= 0
    79test_task exiting thread
    8 *** END OF CLASSIC API TEST OF POSIX 01 ***
     10*** END OF TEST PSXCLASSIC 1 ***
Note: See TracChangeset for help on using the changeset viewer.