RTEMS | iospace: Add iospace driver (!1243)
Aaron Nyholm (@eagleirony)
gitlab at rtems.org
Thu Jun 18 06:56:38 UTC 2026
Aaron Nyholm commented on a discussion on testsuites/libtests/iodev01/init.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1243#note_152720
> + /* Test 5 second event */
> + event_args.index = 0;
> + event_args.timeout.tv_sec = 0;
> + event_args.timeout.tv_nsec = 0;
> + event_args.args = NULL;
> +
> + clock_gettime( CLOCK_REALTIME, &start_time );
> +
> + status = ioctl( fd, RTEMS_IODEV_IOCTL_EVENT_WAIT, &event_args );
> +
> + clock_gettime( CLOCK_REALTIME, &end_time );
> + _Timespec_Subtract( &start_time, &end_time, &duration );
> + rtems_test_assert( !status );
> + rtems_test_assert( event_args.timedout == false );
> + rtems_test_assert( duration.tv_sec >= 4 );
> + rtems_test_assert( duration.tv_sec <= 5 );
Moved into a function.
The test is setup that for event 0 an event occurs 5 seconds after a wait ioctl. This is testing that events cause the return and not the timeout. I've added a define from the `test_iodev` for this time to make the connection clearer.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1243#note_152720
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/20260618/dae66b78/attachment-0001.htm>
More information about the bugs
mailing list