RTEMS | bsps/i386/pc386: printk output goes to VGA in tests that run before bsp_start() (#5818)
Vasu binwal (@Vaibhav805)
gitlab at rtems.org
Wed Nov 11 18:00:01 UTC 2026
Issue created by Vasu binwal: https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5818
## Summary
On pc686 under QEMU with `--console=/dev/com1` (as passed by the `pc-qemu` tester configuration), `ts-validation-io-kernel` and four `ts-fatal-*` tests (`ts-fatal-idle-thread-create-failed`, `ts-fatal-idle-thread-stack-too-small`, `ts-fatal-init-task-construct-failed`, `ts-fatal-too-large-tls-size`) print to VGA instead of COM1, so `rtems-test --rtems-bsp=pc-qemu` sees no test output and reports them as invalid. I see this on main at 5be22160f3 (after !1572 was merged), and I saw it earlier with !1572 and !1573 applied. Before !1572, `ts-validation-io-kernel` was reported as a timeout instead, because `getchark()` blocked.
The console and printk ports are selected from the command line in `pc386_parse_console_arguments()`, called from `bsp_start()` (bsps/i386/pc386/start/bspstart.c). Before that, `BSPPrintkPort` keeps its build-time default, which is VGA unless `USE_COM1_AS_CONSOLE` is enabled (bsps/i386/pc386/console/printk_support.c).
- `ts-validation-io-kernel` provides its own `boot_card()`, so `bsp_start()` never runs. It also does not store the command line, so `bsp_boot_cmdline` stays NULL.
- The `ts-fatal-*` tests above run at `RTEMS_SYSINIT_BSP_EARLY` (0x140), before `RTEMS_SYSINIT_BSP_START` (0x300), the system initialization step that calls `bsp_start()` (bsps/shared/start/bootcard.c).
Possible fixes: build the pc-qemu test configuration with `USE_COM1_AS_CONSOLE` (option in spec/build/bsps/i386/pc386/optconcom1.yml), or select the printk port from the command line on first use of `BSP_output_char`. The second would not cover `ts-validation-io-kernel` by itself, because that test's `boot_card()` does not set `bsp_boot_cmdline`. I'd be happy to work on this if one of these approaches is acceptable.
## Steps to reproduce
1. Build main (5be22160f3) for `i386/pc686` with `BUILD_TESTS = True`.
2. Run `rtems-test --rtems-bsp=pc-qemu` on `ts-validation-io-kernel.exe` and the four `ts-fatal-*` tests above: all five are reported as invalid.
3. Rebuild with `USE_COM1_AS_CONSOLE = True` in the `[i386/pc686]` section and run them again: all five print to COM1 and pass.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5818
You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/namespace/49/sent_notifications/6-8z5y5ols0sts50lc9v36sq299-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/20261111/13ecab4d/attachment-0001.htm>
More information about the bugs
mailing list