Ignore:
Timestamp:
Jul 24, 2008, 8:43:58 PM (12 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Children:
9b4f75e
Parents:
d17c114
Message:

2008-07-24 Joel Sherrill <joel.sherrill@…>

PR 1291/cpukit

  • psx05/init.c, psxmsgq01/init.c, psxmsgq01/system.h, psxsem01/init.c, psxsem01/psxsem01.scn: Update tests to reflect changes required by problem.
File:
1 edited

Legend:

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

    rd17c114 r1750f5a6  
    751751  char            *msg;
    752752
    753   timeout.tv_sec  = 1;
    754   timeout.tv_nsec = 0;
    755 
    756753  printf( "Init: mq_timedsend - on queue %s ", Test_q[que].name);
    757754  len = Predefined_Msgs[MAXMSG].size;
    758755  msg = Predefined_Msgs[MAXMSG].msg;
     756
    759757  gettimeofday( &tv1, &tz1 );
     758  timeout.tv_sec  = tv1.tv_sec + 1;
     759  timeout.tv_nsec = tv1.tv_usec * 1000;
     760
    760761  status = mq_timedsend( Test_q[que].mq, msg, len , 0, &timeout );
     762
    761763  gettimeofday( &tv2, &tz2 );
    762764  tv3.tv_sec  = tv2.tv_sec - tv1.tv_sec;
     
    764766
    765767  if ( is_blocking ) { /* Don't verify the non-blocking queue */
    766     fatal_int_service_status( status, -1, "mq_timedsend status");
    767     fatal_posix_service_status( errno, ETIMEDOUT,  "errno ETIMEDOUT");
    768   }
    769 
    770   printf("Init: %ld sec %ld us\n", (long)tv3.tv_sec, (long)tv3.tv_usec );
    771 
    772   if ( is_blocking ) /* non-blocking queue */
    773     assert( tv3.tv_sec == 1 );
    774   else
    775     assert( tv3.tv_sec == 0 );
     768    fatal_int_service_status( status, -1, "mq_timedsend status" );
     769    fatal_posix_service_status( errno, ETIMEDOUT,  "errno ETIMEDOUT" );
     770  }
     771
     772  printf( "Init: %ld sec %ld us\n", (long)tv3.tv_sec, (long)tv3.tv_usec );
    776773
    777774  if ( que == DEFAULT_RW )
     
    806803  int              status;
    807804
    808   tm.tv_sec  = 1;
    809   tm.tv_nsec = 0;
    810 
    811   printf( "Init: %s mq_timedreceive - on queue %s ", task_name, Test_q[que].name);
     805  printf(
     806    "Init: %s mq_timedreceive - on queue %s ",
     807    task_name,
     808    Test_q[que].name
     809  );
    812810
    813811  gettimeofday( &tv1, &tz1 );
     812  tm.tv_sec  = tv1.tv_sec + 1;
     813  tm.tv_nsec = tv1.tv_usec * 1000;
     814
    814815  status = mq_timedreceive( Test_q[ que ].mq, message, 100, &priority, &tm );
     816
    815817  gettimeofday( &tv2, &tz2 );
    816818  tv3.tv_sec  = tv2.tv_sec - tv1.tv_sec;
     
    822824  printf( "Init: %ld sec %ld us\n", (long)tv3.tv_sec, (long)tv3.tv_usec );
    823825
    824   if ( is_blocking )
    825     assert( tv3.tv_sec == 1 );
    826   else
    827     assert( tv3.tv_sec == 0 );
    828 }
    829 
    830 
     826}
    831827
    832828void verify_timed_receive()
Note: See TracChangeset for help on using the changeset viewer.