Ignore:
Timestamp:
Sep 14, 2009, 12:15:55 AM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 5, master
Children:
7c411bd
Parents:
e7de563a
Message:

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

  • psxclock/init.c, psxclock/psxclock.scn, psxenosys/init.c, psxenosys/psxenosys.scn, psxsignal03/Makefile.am, psxsignal03/init.c, psxsignal04/Makefile.am: Move test cases which needed to be executed when POSIX is disabled to psxclock so they will be.
File:
1 edited

Legend:

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

    re7de563a r1e2d7510  
    1010 */
    1111
    12 #if defined(USE_USER_SIGNALS)
     12#if defined(USE_USER_SIGNALS_PROCESS)
    1313  #define TEST_NAME                "03"
    14   #define TEST_STRING              "User Signals"
     14  #define TEST_STRING              "User Signals to Process"
    1515  #define SIGNAL_ONE               SIGUSR1
    1616  #define SIGNAL_TWO               SIGUSR2
    17 
    18 #elif defined(USE_REAL_TIME_SIGNALS)
     17  #define SEND_SIGNAL(_sig)        kill( getpid(), _sig )
     18  #define TO_PROCESS
     19
     20#elif defined(USE_REAL_TIME_SIGNALS_PROCESS)
    1921  #define TEST_NAME                "04"
    20   #define TEST_STRING              "Real-Time Signals"
     22  #define TEST_STRING              "Real-Time Signals to Process"
    2123  #define SIGNAL_ONE               SIGRTMIN
    2224  #define SIGNAL_TWO               SIGRTMAX
     25  #define SEND_SIGNAL(_sig)        kill( getpid(), _sig )
     26  #define TO_PROCESS
     27
     28#elif defined(USE_USER_SIGNALS_THREAD)
     29  #define TEST_NAME                "05"
     30  #define TEST_STRING              "User Signals to Thread"
     31  #define SIGNAL_ONE               SIGUSR1
     32  #define SIGNAL_TWO               SIGUSR2
     33  #define SEND_SIGNAL(_sig)        pthread_kill( id, _sig )
     34  #define TO_THREAD
     35
     36#elif defined(USE_REAL_TIME_SIGNALS_THREAD)
     37  #define TEST_NAME                "05"
     38  #define TEST_STRING              "Real-Time Signals to Thread"
     39  #define SIGNAL_ONE               SIGRTMIN
     40  #define SIGNAL_TWO               SIGRTMAX
     41  #define SEND_SIGNAL(_sig)        pthread_kill( id, _sig )
     42  #define TO_THREAD
    2343
    2444#else
     
    155175  printf( "Init - sending %s - deliver to one thread\n",
    156176          signal_name(SIGNAL_TWO));
    157   sc =  kill( getpid(), SIGNAL_TWO );
     177  sc =  SEND_SIGNAL( SIGNAL_TWO );
    158178  assert( !sc );
    159179
    160180  printf( "Init - sending %s - deliver to other thread\n",
    161181          signal_name(SIGNAL_TWO));
    162   sc =  kill( getpid(), SIGNAL_TWO );
    163   assert( !sc );
    164 
    165   printf( "Init - sending %s - expect EAGAIN\n", signal_name(SIGNAL_TWO) );
    166   sc =  kill( getpid(), SIGNAL_TWO );
    167   assert( sc == -1 );
    168   assert( errno == EAGAIN );
     182  sc =  SEND_SIGNAL( SIGNAL_TWO );
     183  assert( !sc );
     184
     185  #if defined(TO_PROCESS)
     186    printf( "Init - sending %s - expect EAGAIN\n", signal_name(SIGNAL_TWO) );
     187    sc =  SEND_SIGNAL( SIGNAL_TWO );
     188    assert( sc == -1 );
     189    assert( errno == EAGAIN );
     190  #endif
    169191
    170192  puts( "Init - sleep - let thread report if it unblocked - OK" );
Note: See TracChangeset for help on using the changeset viewer.