Changeset e0c0161 in rtems


Ignore:
Timestamp:
Jan 11, 2000, 3:43:00 PM (21 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
7558283
Parents:
4fa5eae
Message:

This test was enhanced to test for the case in sigtimedwait() where it
must deal with a pending process oriented signal. Prior to the addition
of this testcase, sigtimedwait() did not return properly when a process
oriented signal was pending. The problem was reported by Wayne
Bullaughey <wayneb@…>.

Files:
4 edited

Legend:

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

    r4fa5eae re0c0161  
    167167  assert( siginfo.si_value.sival_int != -1 );   /* rtems does always set this */
    168168 
     169  /* try out a process signal */
     170
     171  empty_line();
     172  puts( "Init: kill with SIGUSR2." );
     173  status = kill( getpid(), SIGUSR2 );
     174  assert( !status );
     175
     176  siginfo.si_code = -1;
     177  siginfo.si_signo = -1;
     178  siginfo.si_value.sival_int = -1;
     179
     180  status = sigemptyset( &waitset );
     181  assert( !status );
     182
     183  status = sigaddset( &waitset, SIGUSR1 );
     184  assert( !status );
     185
     186  status = sigaddset( &waitset, SIGUSR2 );
     187  assert( !status );
     188
     189  puts( "Init: waiting on any signal for 3 seconds." );
     190  signo = sigtimedwait( &waitset, &siginfo, &timeout );
     191  printf( "Init: received (%d) SIGUSR2=%d\n", siginfo.si_signo, SIGUSR2 );
     192  assert( signo == SIGUSR2 );
     193  assert( siginfo.si_signo == SIGUSR2 );
     194  assert( siginfo.si_code == SI_USER );
     195  assert( siginfo.si_value.sival_int != -1 );   /* rtems does always set this */
     196
    169197  /* exit this thread */
    170198
  • c/src/tests/psxtests/psx03/psx03.scn

    r4fa5eae re0c0161  
    1515Signal: 16 caught by 0xc010001 (1)
    1616Init: received (16) SIGUSR1=16
     17
     18Init: kill with SIGUSR2.
     19Init: waiting on any signal for 3 seconds.
     20Init: received (17) SIGUSR2=17
    1721*** END OF POSIX TEST 3 ***
  • testsuites/psxtests/psx03/init.c

    r4fa5eae re0c0161  
    167167  assert( siginfo.si_value.sival_int != -1 );   /* rtems does always set this */
    168168 
     169  /* try out a process signal */
     170
     171  empty_line();
     172  puts( "Init: kill with SIGUSR2." );
     173  status = kill( getpid(), SIGUSR2 );
     174  assert( !status );
     175
     176  siginfo.si_code = -1;
     177  siginfo.si_signo = -1;
     178  siginfo.si_value.sival_int = -1;
     179
     180  status = sigemptyset( &waitset );
     181  assert( !status );
     182
     183  status = sigaddset( &waitset, SIGUSR1 );
     184  assert( !status );
     185
     186  status = sigaddset( &waitset, SIGUSR2 );
     187  assert( !status );
     188
     189  puts( "Init: waiting on any signal for 3 seconds." );
     190  signo = sigtimedwait( &waitset, &siginfo, &timeout );
     191  printf( "Init: received (%d) SIGUSR2=%d\n", siginfo.si_signo, SIGUSR2 );
     192  assert( signo == SIGUSR2 );
     193  assert( siginfo.si_signo == SIGUSR2 );
     194  assert( siginfo.si_code == SI_USER );
     195  assert( siginfo.si_value.sival_int != -1 );   /* rtems does always set this */
     196
    169197  /* exit this thread */
    170198
  • testsuites/psxtests/psx03/psx03.scn

    r4fa5eae re0c0161  
    1515Signal: 16 caught by 0xc010001 (1)
    1616Init: received (16) SIGUSR1=16
     17
     18Init: kill with SIGUSR2.
     19Init: waiting on any signal for 3 seconds.
     20Init: received (17) SIGUSR2=17
    1721*** END OF POSIX TEST 3 ***
Note: See TracChangeset for help on using the changeset viewer.