RTEMS | Add timespec_get() support to RTEMS (!670)
Sebastian Huber (@sebhub)
gitlab at rtems.org
Wed Aug 27 07:54:23 UTC 2025
Sebastian Huber commented on a discussion on testsuites/psxtests/psxtimes01/init.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/670#note_129609
> rtems_test_assert( end_tm.tms_cstime == 0 );
> +}
> +
> +static void test_timespec_functions( void )
> +{
> + struct timespec start_ts;
> + struct timespec end_ts;
> + struct timespec clock_ts;
> + int result;
> + int interval = 5;
> +
> + puts( "\n*** Testing timespec_get() functions ***" );
> +
> + puts( "timespec_get( NULL, TIME_UTC ) -- EINVAL" );
> + result = timespec_get( NULL, TIME_UTC );
> + rtems_test_assert( result == 0 );
According to C11 for the return value: `The value of base if successful, zero otherwise.`. Returning 0 for this case seems to be all right, just the pus() is wrong.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/670#note_129609
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/20250827/a231aa44/attachment-0001.htm>
More information about the bugs
mailing list