summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-12-05 10:03:13 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-12-07 14:22:00 +0100
commit9921ab6973604eff15f1663c0ab6191f137bec32 (patch)
treed504a1b4607621cec7e576c5cc52c95ad5b927a3
parenttests: Fix rtems_test_spin_until_next_tick() (diff)
downloadrtems-9921ab6973604eff15f1663c0ab6191f137bec32.tar.bz2
psxtimes01: Fix sporadic failures
It is not enough to just wait for at least the first clock tick to get non-zero times. In _times() we round down, so the uptime must be greater than or equal to the clock tick interval. We do not know when the timecounter is started during the system initialization. We have to wait until at least two ticks happened.
-rw-r--r--testsuites/psxtests/psxtimes01/init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/testsuites/psxtests/psxtimes01/init.c b/testsuites/psxtests/psxtimes01/init.c
index 7e191d0a15..d5b573bf15 100644
--- a/testsuites/psxtests/psxtimes01/init.c
+++ b/testsuites/psxtests/psxtimes01/init.c
@@ -48,7 +48,7 @@ rtems_task Init(
rtems_test_assert( sc == -1 );
rtems_test_assert( errno == EFAULT );
- while ( rtems_clock_get_ticks_since_boot() == 0 )
+ while ( rtems_clock_get_ticks_since_boot() <= 2 )
;
puts( "_times( &start_tm ) -- OK" );