Navigation


Changeset 751:c7d9c5477d2f in freeDiameter


Ignore:
Timestamp:
Sep 23, 2011, 4:10:00 AM (13 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Add a test for timeout on fifo

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/testfifo.c

    r740 r751  
    188188                CHECK( 0, count);
    189189               
     190                /* Check the timedget actually timesout */
     191                CHECK(0, clock_gettime(CLOCK_REALTIME, &ts));
     192                ts.tv_nsec += 1000000; /* 1 millisecond */
     193                if (ts.tv_nsec >= 1000000000L) {
     194                        ts.tv_nsec -= 1000000000L;
     195                        ts.tv_sec += 1;
     196                }
     197                CHECK( ETIMEDOUT, fd_fifo_timedget(queue, &msg, &ts) );
     198                CHECK( 0, fd_fifo_length(queue, &count) );
     199                CHECK( 0, count);
     200               
    190201                /* We're done for basic tests */
    191202                CHECK( 0, fd_fifo_del(&queue) );
Note: See TracChangeset for help on using the changeset viewer.