diff options
Diffstat (limited to 'testsuites/psxtests/psx04/init.c')
-rw-r--r-- | testsuites/psxtests/psx04/init.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/testsuites/psxtests/psx04/init.c b/testsuites/psxtests/psx04/init.c index ff3bb96e13..945da76a17 100644 --- a/testsuites/psxtests/psx04/init.c +++ b/testsuites/psxtests/psx04/init.c @@ -281,7 +281,12 @@ void *POSIX_Init( puts( "Init: Wait 4 seconds for alarm" ); remaining = sleep( 4 ); printf( "Init: %d seconds left in sleep\n", remaining ); - rtems_test_assert( remaining == 2 ); + + /* + * sleep() uses nanosleep() internally which discards the nanoseconds part, + * e.g. 1.99s -> 1s + */ + rtems_test_assert( remaining == 1 || remaining == 2 ); /* test SIG_SETMASK case and returning oset of pthread_sigmask */ |