RTEMS | testsuites/sptests: Edit spclock_err02 for post-2100 validation (!1103)
SHIVAM DEOLANKAR (@D3athSkulll)
gitlab at rtems.org
Tue Apr 28 22:17:11 UTC 2026
SHIVAM DEOLANKAR commented on a discussion on testsuites/sptests/spclock_err02/init.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1103#note_149199
> - directive_failed( status, "rtems_clock_set" );
> + directive_failed(status, "rtems_clock_set"); // expect SUCCESS
> print_time( "TA1 - rtems_clock_set - ", &time, " - RTEMS_SUCCESSFUL\n" );
> status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() );
> status = rtems_clock_get_tod( &time );
> directive_failed( status, "rtems_clock_get_tod" );
> print_time( "TA1 - rtems_clock_get_tod - ", &time, " - RTEMS_SUCCESSFUL\n" );
>
> + build_time( &time, 3, 1, 2400, 0, 0, 0, 0 );
> + status = rtems_clock_set( &time );
> + directive_failed(status, "rtems_clock_set"); // expect SUCCESS
> + print_time( "TA1 - rtems_clock_set - ", &time, " - RTEMS_SUCCESSFUL\n" );
> + status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() );
> + status = rtems_clock_get_tod( &time );
> + directive_failed( status, "rtems_clock_get_tod" );
> + print_time( "TA1 - rtems_clock_get_tod - ", &time, " - RTEMS_SUCCESSFUL\n" );
I agree that asserting the TOD after waking would make the tests more meaningful. However, from testing I found that relying on `rtems_task_wake_after()` to advance the TOD is not deterministic, so the rollover checks can fail even when the implementation is correct.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1103#note_149199
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260428/c5eb7b1f/attachment-0001.htm>
More information about the bugs
mailing list