Skip to content

rh850/qemu-rh850-u2c: Run NTFC on QEMU in CI and check RLIN3 baud rates - #22299

Open
parthitce wants to merge 5 commits into
apache:masterfrom
linumiz:rh850/ntfc-ci
Open

parthitce wants to merge 5 commits into
apache:masterfrom
linumiz:rh850/ntfc-ci

Conversation

@parthitce

Copy link
Copy Markdown
Contributor

Summary

Adds a citest config so CI boots qemu-rh850-u2c and runs NTFC. Needs apache/nuttx-ntfc#39, as v850 GCC prefixes C symbols with "_". run.sh fails unless test_os passed. Also rejects RLIN3 baud rates that do not fit the clock.

Impact

RH850 only. citest stays red until nuttx-ntfc releases the fix.

Testing

GCC 14.3.0 v1.2.0, QEMU rh850-v1.2.0. All commits build with 0 warnings. NTFC with PR 39: 54 pass, 0 fail, 7 skip. With ntfc 0.0.3: run.sh fails. Invalid baud rates fail the build.

The baud divider was written without a check. A rate above clock / 16,
a divider over 16 bits or a large rounding error gave a wrong line rate
without any notice.

Reject a divider outside 1 to 65536 or a rate more than 3 percent off.
The console rate fails the build with an error and u2c_rlin3_setup
returns -EINVAL for any other unit.

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
The NTFC nsh tests create files and directories in /tmp. Mount a tmpfs
there in board_late_initialize when CONFIG_FS_TMPFS is enabled, as the
other QEMU boards do.

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
CI builds qemu-rh850-u2c but never boots it. Add a citest configuration
that runs the NTFC tests on QEMU like qemu-armv8a and rv-virt. It adds
ostest, setlogmask, a tmpfs for /tmp and the high priority work queue
to nsh.

run.sh fails when test_os did not pass. A run where every test is
skipped also exits with 0, and it must not count as a pass.

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
Build citest with CMake like nsh. testbuild.sh then runs its run.sh,
which boots it on QEMU and runs NTFC.

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
Add a section on citest: what it adds to nsh, how run.sh runs NTFC and
why it fails when test_os did not pass.

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
@github-actions github-actions Bot added Area: CI Size: M The size of the change in this PR is medium Arch: rh850 Board: rh850 labels Nov 25, 2026
@github-actions

Copy link
Copy Markdown

@raiden00pl

raiden00pl commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

It won't work right away. The CI uses NTFC from pypi, not from github. I need to make an NTFC release for pypi

@xiaoxiang781216

Copy link
Copy Markdown
Contributor

It won't work right away. The CI uses NTFC from pypi, not from github. I need to make an NTFC release for pypi

@raiden00pl should we merge first or wait you updating pypi?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arch: rh850 Area: CI Board: rh850 Size: M The size of the change in this PR is medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants