RTEMS | Draft: termios01: Cover the rates set_best_baud's test skips (!1445)
Sam Price (@TheSamPrice)
gitlab at rtems.org
Fri Aug 21 17:03:17 UTC 2026
Sam Price created a merge request: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1445
Project:Branches: TheSamPrice/rtems:demo/termios-setbestbaud-gap to rtems/rtos/rtems:main
Author: Sam Price
## Summary
termios01: Cover the rates set_best_baud's test skips
test_set_best_baud() probes 9600, 19200, 38400, 57600 and up, and
skips every extension rate. That region is where
rtems_termios_baud_table is not in the ascending numeric order that
rtems_termios_set_best_baud()'s search assumes: the table lists B28800
after B38400.
Add the skipped exact rates and one midpoint. Two of the new cases
fail today, and the failure is the point: it shows the coverage gap
hid a real defect. Requesting exactly 28800 returns B19200, because
the search stops at B38400 with a midpoint of 28800 and rounds down to
the entry before it, which the out-of-place B28800 row is not. And
40000 selects B28800, reached through that same out-of-place row. The
test exits at the first of these, the 28800 case.
The fix belongs to the table, not to this test; this commit only makes
the defect visible.
Signed-off-by: Samuel Price <thesamprice at gmail.com>
Assisted-by: Claude Fable 5 <noreply at anthropic.com>
## Generative AI
<!-- If you have used AI please use the "AI Contribution" template otherwise leave this blank see our fulls statement at https://www.rtems.org/generative-ai/-->
<!-- Default settings, if it is a dropdown it will set after submission -->
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1445
You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/sent_notifications/5-304gtqj0amdgtmoq162key8if-1d/unsubscribe | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | Help: https://gitlab.rtems.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260821/55a1bae5/attachment.htm>
More information about the bugs
mailing list