RTEMS | add test case to sptchimespec01 which uses a > 32-bit time (!314)
Joel Sherrill (@joel)
gitlab at rtems.org
Wed Jan 8 15:01:38 UTC 2025
Joel Sherrill commented on a discussion on testsuites/sptests/sptimespec01/init.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/314#note_117651
> test_subtract();
> test_convert();
> + test_greaterthan32bits();
>
> TEST_END();
>
> rtems_test_exit(0);
> }
>
> +
> +void test_greaterthan32bits(){
> +/* Basic test to see if addition works with a value greater than 32 bits */
> + rtems_timespec_set(timespec1, 4294967296, 1);
> + rtems_timespec_set(timespec2, 1, 1);
> + rtems_timespec_add_to(timespec1, timespec2);
> + rtems_test_assert( (timespec1->tv_sec==4294967297)&&(timespec1->tv_nsec== 2)) ;
The comment was to make sure constants > 32 bits have LL on them. That still has not been addressed.
Also put spaces around "==" in the rtems_test assert calls.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/314#note_117651
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/20250108/e902cf93/attachment-0001.htm>
More information about the bugs
mailing list