Repository navigation
Description
NTFC is a new testing tool based on test cases for NuttX from Xiaomi that allows you to automate NuttX tests for various targets (sim, qemu, hw with serial port). All features of currently used in CI tool (tools/ci/testrun) are supported (and much more).
Here is a discussion on mailing list: https://lists.apache.org/thread/618konqxrl38oq7049njgks2y0x5mllq
At the moment, the repositories with NTFC and test cases are on my Github account:
- https://github.com/szafonimateusz-mi/nuttx-ntfc
- https://github.com/szafonimateusz-mi/nuttx-testing
They will eventually go to the Apache Foundation account if the proposal is accepted, but at the moment it's easier for me to develop the project in a private repo. Once NTFC is running stably on NuttX CI, I think it will be a good time to move the repositories to Apache.
Roadmap
Tasks that remain:
-
- Enabling more test cases for
citesttargets
The tool automatically detects which tests can be run based on the provided ELF. We just have to enable the appropriate applications in defconfig.
- Enabling more test cases for
-
- Add stable NTFC package to the Docker image.
-
- clean up after old CI tests engine (testrun)
-
- (SOMEDAY) Run test cases depending on GitHub labels. Running all tests in most cases makes no sense. With NTFC, we can ignore individual test modules and save CI resources.
-
- (SOMEDAY) Network tests on CI. We can set up a virtual network (ETH, CAN) in which several nuttx instances communicate with each other and NTFC runs tests.
EDIT: more advanced tests are now located in https://github.com/railab/nuttx-testlab and are run as nightly tests outside of the ASF to save CI resources.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNo status
Activity
raiden00pl commentedon Feb 16, 2026
Apache repositories have been created and are here (thanks @cederom):
I'll probably migrate repositories from my account to the new locations next month. There are a few more features I want to add, and it's easier to do for me when the repo is completely under my control :)
raiden00pl commentedon Mar 2, 2026
adding NTFC for arm64 target is not a problem because the qemu-system-arm package is already installed in Docker image (it covers 32-bit and 64-bit arm in Debian).
For x86-64 target it requires an additional qemu-system-x86 package that needs to be added to Docker image. It will take an additional ~40MB
Brijesh-Thakkar commentedon Oct 22, 2026
Hi @raiden00pl @cederom, I’d like to help finish this. Looking at master (0dcbf44), it seems x86_64 citest (44e3504, 7609a72) and the testrun removal (179bf35) are already merged, so those two checklist items can be ticked.
What still looks open:
Installing ntfc in the Docker image (build.yml still pip-installs 0.0.3 on every run)
Leftover testrun pins (pytest==6.2.5, pexpect==4.8.0, …) in the Dockerfile and tools/ci/platforms/*.sh, which conflict with ntfc’s own deps
Enabling more test cases in citest configs
I can send a PR for (2) now. For (1), would you prefer I take it, and should test cases stay cloned at runtime with only the tool in the image? Happy to take on (3) for a specific target too.
raiden00pl commentedon Oct 22, 2026
Let’s hold off on (1) for now; it should be the final step of this issue
Brijesh-Thakkar commentedon Oct 22, 2026
Thanks I’ll keep the image install for last. I’ll send a PR for (2) that only removes the leftover testrun pins (no ntfc in the image), and then look at enabling more test cases for (3).
Is there a target you’d like covered first, or should I start with rv-virt:citest64?
Brijesh-Thakkar commentedon Oct 22, 2026
Opened #20882 for (2): it removes the leftover testrun pins (pexpect==4.8.0, pytest==6.2.5, pytest-json, pytest-ordering, pytest-repeat) from the CI Dockerfile and tools/ci/platforms/*.sh. The pytest==6.2.5 pin was already being upgraded to 9.1.1 by pip install ntfc at job time. sim:citest gives identical results with and without the pins (1221 passed / 0 failed / 306 skipped).
One related finding, also noted in the PR: the pkill -f pytest watchdog in build.yml never matches the ntfc process, because ntfc runs pytest.main() in-process. It only matches the wrapper shell, so on timeout it kills the whole step. I can send a follow-up if you’d like that changed.
I’ll look at (3), enabling more test cases, next. Is there a target you’d like covered first?
tools/ci/docker: remove legacy testrun Python pins
tools/ci/platforms: remove legacy testrun Python pins
6 remaining items
Brijesh-Thakkar commentedon Oct 25, 2026
Oh, okkk
will keep this in mind and wont add more ci
Thanks @raiden00pl
.github/workflows/build.yml: remove the pytest watchdog
Documentation: fix the outdated NTFC instructions
Brijesh-Thakkar commentedon Oct 30, 2026
Opened apache/nuttx-apps#3943: it syncs the NTFC setup with nuttx (ntfc 0.0.3, fail-fast install, watchdog removed), following #20958. Understood on not adding more tests to CI. While trialling LTP on rv64 I hit a couple of rv64-only bugs (e.g. mq_send() succeeding on an O_RDONLY queue), which I’ll report as separate issues.
[-][FEATURE] Migrate CI test cases to NTFC[/-][+]ci: Migrate CI test cases to NTFC[/+].github/workflows/build.yml: bump NTFC to 0.0.3
.github/workflows/build.yml: fail the job if NTFC cannot be installed
.github/workflows/build.yml: remove the pytest watchdog
.github/workflows/build.yml: bump NTFC to 0.0.3
.github/workflows/build.yml: fail the job if NTFC cannot be installed
.github/workflows/build.yml: remove the pytest watchdog
.github/workflows/build.yml: bump NTFC to 0.0.3
.github/workflows/build.yml: fail the job if NTFC cannot be installed
.github/workflows/build.yml: remove the pytest watchdog
Brijesh-Thakkar commentedon Nov 2, 2026
Status update:
testrun cleanup is done: pins removed (#20882), watchdog replaced by NTFC’s session timeout (#20958), stale citest64 run.sh lines (#21155), and nuttx-apps synced to ntfc 0.0.3 (apache/nuttx-apps#3943). I didn’t find any remaining references to the old harness in either repo.
“Enable more test cases” is on hold, as you said, because of CI load.
That leaves “add stable NTFC package to the Docker image”. @raiden00pl is it time for that now, or are you waiting for another NTFC release first? I can prepare it, keeping the test cases cloned at runtime and putting only the ntfc package in the image.