diff --git a/testsuites/psxtests/psxtimes01/init.c b/testsuites/psxtests/psxtimes01/init.c index 0e78f497ad..529a0f0f44 100644 --- a/testsuites/psxtests/psxtimes01/init.c +++ b/testsuites/psxtests/psxtimes01/init.c @@ -72,6 +72,8 @@ static void test_times_functions( void ) rtems_test_assert( start != 0 ); rtems_test_assert( now != 0 ); + /* spin for at least interval ticks */ + rtems_test_spin_until_next_tick( ); rtems_test_spin_for_ticks( interval ); puts( "_times( &end_tm ) -- OK" ); diff --git a/testsuites/sptests/sp69/init.c b/testsuites/sptests/sp69/init.c index 863e4b75e0..842f90db75 100644 --- a/testsuites/sptests/sp69/init.c +++ b/testsuites/sptests/sp69/init.c @@ -90,10 +90,10 @@ rtems_task Init( rtems_task_argument argument ) status = rtems_rate_monotonic_period( period_id, 100 ); directive_failed( status, "rate_monotonic_period" ); - /* Do some work */ + /* Do some work: this will execute for just under 10 complete ticks. */ rtems_test_spin_for_ticks( 10 ); - /* Block a little */ + /* Block a little: this will sleep for over 50 complete ticks. */ status = rtems_task_wake_after( 50 ); /* Check the status */ @@ -115,7 +115,7 @@ rtems_task Init( rtems_task_argument argument ) rtems_test_assert( period_status.since_last_period.tv_nsec <= 610000000 ); rtems_test_assert( period_status.executed_since_last_period.tv_sec == 0 ); rtems_test_assert( - period_status.executed_since_last_period.tv_nsec >= 100000000 + period_status.executed_since_last_period.tv_nsec >= 90000000 ); rtems_test_assert( period_status.executed_since_last_period.tv_nsec <= 110000000