summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psx04
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-02-18 08:36:26 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-03-04 13:36:10 +0100
commit03b900d3ed120ea919ea3eded7edbece3488cff3 (patch)
tree182781fc14fe15fd67caeb80e46f1c58495839c2 /testsuites/psxtests/psx04
parentscore: Distribute clock tick to all online CPUs (diff)
downloadrtems-03b900d3ed120ea919ea3eded7edbece3488cff3.tar.bz2
score: Replace watchdog handler implementation
Use a red-black tree instead of delta chains. Close #2344. Update #2554. Update #2555. Close #2606.
Diffstat (limited to 'testsuites/psxtests/psx04')
-rw-r--r--testsuites/psxtests/psx04/init.c7
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 */