RTEMS | testsuites/sptests: Add spcan02 POSIX functional test for virtual CAN bus (!1113)
MITHILESH MATTAPALLI (@mithileshm)
gitlab at rtems.org
Fri Mar 13 13:05:59 UTC 2026
MITHILESH MATTAPALLI commented on a discussion on testsuites/sptests/spcan02/init.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1113#note_145321
> + );
> + rtems_test_assert( rv == RTEMS_SUCCESSFUL );
> +
> + rv = rtems_task_start( can1_tx_id, can_sender, (rtems_task_argument) can1 );
> + rtems_test_assert( rv == RTEMS_SUCCESSFUL );
> +
> + while (
> + ( atomic_load( &can1->active_tasks ) > 0 ||
> + atomic_load( &can2->active_tasks ) > 0 ) &&
> + timeout_ms > 0
> + ) {
> + rtems_task_wake_after( RTEMS_MILLISECONDS_TO_TICKS( 10 ) );
> + timeout_ms -= 10;
> + }
> +
> + rtems_test_assert( timeout_ms > 0 );
Fixed it by using `rtems_barrier_wait` with a defined timeout tick that eliminates this race condition
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1113#note_145321
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/20260313/5e2d530c/attachment-0001.htm>
More information about the bugs
mailing list