From f470594809b4a58c3533ac20dafd0266725681f3 Mon Sep 17 00:00:00 2001 From: p-szafonimateusz Date: Mon, 2 Mar 2026 14:11:08 +0100 Subject: [PATCH 1/3] CI: enable NTFC tests for qemu-armv8a (arm64) Enable NTFC for qemu-armv8a (arm64). QEMU for aarch64 architecture should be already on Docker image, so it should work. Signed-off-by: p-szafonimateusz --- Documentation/testing/citests.rst | 2 + .../qemu-armv8a/configs/citest/config.yaml | 16 ++++++ .../qemu/qemu-armv8a/configs/citest/defconfig | 2 + .../qemu/qemu-armv8a/configs/citest/run.sh | 55 +++++++++++++++++++ .../qemu-armv8a/configs/citest/session.json | 13 +++++ .../configs/citest_smp/config.yaml | 16 ++++++ .../qemu-armv8a/configs/citest_smp/defconfig | 2 + .../qemu-armv8a/configs/citest_smp/run.sh | 55 +++++++++++++++++++ .../configs/citest_smp/session.json | 13 +++++ 9 files changed, 174 insertions(+) create mode 100644 boards/arm64/qemu/qemu-armv8a/configs/citest/config.yaml create mode 100755 boards/arm64/qemu/qemu-armv8a/configs/citest/run.sh create mode 100644 boards/arm64/qemu/qemu-armv8a/configs/citest/session.json create mode 100644 boards/arm64/qemu/qemu-armv8a/configs/citest_smp/config.yaml create mode 100755 boards/arm64/qemu/qemu-armv8a/configs/citest_smp/run.sh create mode 100644 boards/arm64/qemu/qemu-armv8a/configs/citest_smp/session.json diff --git a/Documentation/testing/citests.rst b/Documentation/testing/citests.rst index 8fcc79d7201af..22d2ed1dc6d7b 100644 --- a/Documentation/testing/citests.rst +++ b/Documentation/testing/citests.rst @@ -79,6 +79,8 @@ CI migration to NTFC is in progress. Configurations currently using NTFC: - risc-v/qemu-rv: ``rv-virt/citest`` - sim/sim: ``sim/citest`` - arm/imx6: ``sabre-6quad/citest`` +- arm64/qemu: ``qemu-armv8a/citest`` +- arm64/qemu: ``qemu-armv8a/citest_smp`` NTFC exports test logs as CI artifacts. This allows test logs (including ``ostest`` output) to be downloaded directly from the CI for all targets where the ``citest`` diff --git a/boards/arm64/qemu/qemu-armv8a/configs/citest/config.yaml b/boards/arm64/qemu/qemu-armv8a/configs/citest/config.yaml new file mode 100644 index 0000000000000..59ea992f725c8 --- /dev/null +++ b/boards/arm64/qemu/qemu-armv8a/configs/citest/config.yaml @@ -0,0 +1,16 @@ +config: + cwd: './' + +product: + name: "qemu-armv8a" + cores: + core0: + name: 'main' + device: 'qemu' + exec_path: 'qemu-system-aarch64' + exec_args: '-cpu cortex-a53 -nographic + -machine virt,virtualization=on,gic-version=3 + -net none -chardev stdio,id=con,mux=on + -serial chardev:con -mon chardev=con,mode=readline' + conf_path: './build/.config' + elf_path: './build/nuttx' diff --git a/boards/arm64/qemu/qemu-armv8a/configs/citest/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/citest/defconfig index ca5ea3e870b61..9460e22168275 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/citest/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/citest/defconfig @@ -26,6 +26,7 @@ CONFIG_EXAMPLES_HELLO=y CONFIG_EXPERIMENTAL=y CONFIG_FS_PROCFS=y CONFIG_FS_ROMFS=y +CONFIG_FS_TMPFS=y CONFIG_HAVE_CXX=y CONFIG_HAVE_CXXINITIALIZE=y CONFIG_IDLETHREAD_STACKSIZE=8192 @@ -54,6 +55,7 @@ CONFIG_START_MONTH=3 CONFIG_START_YEAR=2022 CONFIG_SYMTAB_ORDEREDBYNAME=y CONFIG_SYSTEM_NSH=y +CONFIG_SYSTEM_SETLOGMASK=y CONFIG_SYSTEM_SYSTEM=y CONFIG_SYSTEM_TIME64=y CONFIG_TESTING_GETPRIME=y diff --git a/boards/arm64/qemu/qemu-armv8a/configs/citest/run.sh b/boards/arm64/qemu/qemu-armv8a/configs/citest/run.sh new file mode 100755 index 0000000000000..95b1a49d4a658 --- /dev/null +++ b/boards/arm64/qemu/qemu-armv8a/configs/citest/run.sh @@ -0,0 +1,55 @@ +#!/usr/bin/env bash +############################################################################ +# boards/arm64/qemu/qemu-armv8a/configs/citest/run.sh +# +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +############################################################################ + +set -o xtrace + +# start from nuttx dir +olddir=$(pwd) +nuttdir=${CURRENTCONFDIR}/../../../../../../ +cd ${nuttdir} + +# enable venv +source ${NTFCDIR}/venv/bin/activate + +# run NTFC +confpath=${CURRENTCONFDIR}/config.yaml +jsonconf=${CURRENTCONFDIR}/session.json +testpath=${NTFCDIR}/external/nuttx-testing +python3 -m ntfc test --testpath=${testpath} --confpath=${confpath} --jsonconf=${jsonconf} + +ret="$?" +echo $ret + +# disable venv +deactivate + +# export test results +artifacts=${ARTIFACTCONFDIR}/ntfc +mkdir -p ${artifacts} +mv pytest.debug.log ${artifacts} +mv result ${artifacts} + +# restore old dir +cd ${olddir} + +exit $ret diff --git a/boards/arm64/qemu/qemu-armv8a/configs/citest/session.json b/boards/arm64/qemu/qemu-armv8a/configs/citest/session.json new file mode 100644 index 0000000000000..2a8c05d05daae --- /dev/null +++ b/boards/arm64/qemu/qemu-armv8a/configs/citest/session.json @@ -0,0 +1,13 @@ +{ + "module": { + "include_module": [], + "exclude_module": + [ + "Nuttx_System_Fs_Fs" + ], + "order": [] + }, + "args": { + "kv": [] + } +} diff --git a/boards/arm64/qemu/qemu-armv8a/configs/citest_smp/config.yaml b/boards/arm64/qemu/qemu-armv8a/configs/citest_smp/config.yaml new file mode 100644 index 0000000000000..ff79b3917b638 --- /dev/null +++ b/boards/arm64/qemu/qemu-armv8a/configs/citest_smp/config.yaml @@ -0,0 +1,16 @@ +config: + cwd: './' + +product: + name: "qemu-armv8a-smp" + cores: + core0: + name: 'main' + device: 'qemu' + exec_path: 'qemu-system-aarch64' + exec_args: '-cpu cortex-a53 -nographic -smp 4 + -machine virt,virtualization=on,gic-version=3 + -net none -chardev stdio,id=con,mux=on + -serial chardev:con -mon chardev=con,mode=readline' + conf_path: './build/.config' + elf_path: './build/nuttx' diff --git a/boards/arm64/qemu/qemu-armv8a/configs/citest_smp/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/citest_smp/defconfig index 75904c00f184f..f366755c0c71f 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/citest_smp/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/citest_smp/defconfig @@ -26,6 +26,7 @@ CONFIG_EXAMPLES_HELLO=y CONFIG_EXPERIMENTAL=y CONFIG_FS_PROCFS=y CONFIG_FS_ROMFS=y +CONFIG_FS_TMPFS=y CONFIG_IDLETHREAD_STACKSIZE=16384 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y @@ -50,6 +51,7 @@ CONFIG_START_MONTH=3 CONFIG_START_YEAR=2022 CONFIG_SYMTAB_ORDEREDBYNAME=y CONFIG_SYSTEM_NSH=y +CONFIG_SYSTEM_SETLOGMASK=y CONFIG_SYSTEM_SYSTEM=y CONFIG_SYSTEM_TASKSET=y CONFIG_SYSTEM_TIME64=y diff --git a/boards/arm64/qemu/qemu-armv8a/configs/citest_smp/run.sh b/boards/arm64/qemu/qemu-armv8a/configs/citest_smp/run.sh new file mode 100755 index 0000000000000..e417134520ce2 --- /dev/null +++ b/boards/arm64/qemu/qemu-armv8a/configs/citest_smp/run.sh @@ -0,0 +1,55 @@ +#!/usr/bin/env bash +############################################################################ +# boards/arm64/qemu/qemu-armv8a/configs/citest_smp/run.sh +# +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +############################################################################ + +set -o xtrace + +# start from nuttx dir +olddir=$(pwd) +nuttdir=${CURRENTCONFDIR}/../../../../../../ +cd ${nuttdir} + +# enable venv +source ${NTFCDIR}/venv/bin/activate + +# run NTFC +confpath=${CURRENTCONFDIR}/config.yaml +jsonconf=${CURRENTCONFDIR}/session.json +testpath=${NTFCDIR}/external/nuttx-testing +python3 -m ntfc test --testpath=${testpath} --confpath=${confpath} --jsonconf=${jsonconf} + +ret="$?" +echo $ret + +# disable venv +deactivate + +# export test results +artifacts=${ARTIFACTCONFDIR}/ntfc +mkdir -p ${artifacts} +mv pytest.debug.log ${artifacts} +mv result ${artifacts} + +# restore old dir +cd ${olddir} + +exit $ret diff --git a/boards/arm64/qemu/qemu-armv8a/configs/citest_smp/session.json b/boards/arm64/qemu/qemu-armv8a/configs/citest_smp/session.json new file mode 100644 index 0000000000000..2a8c05d05daae --- /dev/null +++ b/boards/arm64/qemu/qemu-armv8a/configs/citest_smp/session.json @@ -0,0 +1,13 @@ +{ + "module": { + "include_module": [], + "exclude_module": + [ + "Nuttx_System_Fs_Fs" + ], + "order": [] + }, + "args": { + "kv": [] + } +} From 19ba82861d5e7773af5920cb7683b2f5f516a5ee Mon Sep 17 00:00:00 2001 From: p-szafonimateusz Date: Mon, 2 Mar 2026 19:37:51 +0100 Subject: [PATCH 2/3] CI: allow ntfc tests for cmake builds allow ntfc tests for cmake builds Signed-off-by: p-szafonimateusz --- tools/testbuild.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testbuild.sh b/tools/testbuild.sh index 0bafcc8981ae9..9317e23a56dad 100755 --- a/tools/testbuild.sh +++ b/tools/testbuild.sh @@ -491,7 +491,7 @@ function refresh { } function run { - if [ ${RUN} -ne 0 ] && [ -z ${cmake} ]; then + if [ ${RUN} -ne 0 ]; then run_script="$path/run.sh" if [ -x $run_script ]; then echo " Running NuttX..." From 4fcbe2da664e54a3a037ae29d0cfa5089898ce4a Mon Sep 17 00:00:00 2001 From: p-szafonimateusz Date: Mon, 2 Mar 2026 19:45:32 +0100 Subject: [PATCH 3/3] CI: update labels for CI scripts all targets should be build if CI-realted tools was changed Signed-off-by: p-szafonimateusz --- .github/labeler.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/labeler.yml b/.github/labeler.yml index 699f48b217f0c..6742f1658df6a 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -182,11 +182,13 @@ - any-glob-to-any-file: 'CMakeLists.txt' - any-glob-to-any-file: 'cmake/**' - any-glob-to-any-file: 'tools/*.mk' + - any-glob-to-any-file: 'tools/*.sh' "Area: CI": - changed-files: - any-glob-to-any-file: '.github/**' - any-glob-to-any-file: 'tools/ci/**' + - any-glob-to-any-file: 'tools/testbuild.sh' "Area: Crypto": - changed-files: