casaroli opened a new pull request, #21974:
URL: https://github.com/apache/nuttx/pull/21974

   ## Summary
   
   CI runs one 32-bit ARM configuration in QEMU with NTFC: `sabre-6quad:citest` 
(i.MX6, flat build). CI builds the ARMv7-A kernel build configurations 
(`qemu-armv7a:knsh`, `sabre-6quad:knsh`, ...), but it runs none of them, and it 
runs no kernel build configuration of any architecture. This PR adds two 
configurations for the Cortex-A7 (ARMv7-A) on the QEMU `virt` machine that CI 
runs with NTFC: `qemu-armv7a:citest` (flat build) and `qemu-armv7a:citest_knsh` 
(kernel build, `CONFIG_BUILD_KERNEL=y`).
   
   `citest` is `qemu-armv7a:nsh` and `citest_knsh` is `qemu-armv7a:knsh`, with 
the programs that the NTFC cases use: `ostest`, `hello`, `helloxx`, `pipe`, 
`getprime`, `setlogmask` and `usrsocktest`. `citest` also has `heap`. Both have 
scheduler error and warning messages. `citest` has no profiling and no coremark.
   
   `usrsocktest` needs the network stack with user sockets 
(`CONFIG_NET_USRSOCK`). The board has no network device, thus both 
configurations set `CONFIG_NETDEV_LATEINIT=y`, as `sabre-6quad:citest` does. 
Without it, the link fails: `undefined reference to 'arm_netinitialize'`.
   
   `heap` is not in `citest_knsh`: `testing/mm/heaptest` includes 
`mm/mm_heap/mm.h` of the NuttX tree (for `MM_ALIGN_UP` and 
`MM_SIZEOF_ALLOCNODE`), and the export of a kernel build does not have this 
file. The build stops with `fatal error: mm.h: No such file or directory`.
   
   For `citest_knsh`, NuttX mounts `../apps` at `/system` with semihosting 
(hostfs), as in `knsh`, thus QEMU has `-semihosting`. `testbuild.sh` installs 
the programs into `../apps/bin` (`make export`, `mkimport.sh`, `make import`). 
NTFC 0.0.3 finds the commands of a kernel build in `app_bindir`: the file names 
in `../apps/bin` and the symbols in `../apps/bin_debug`. With `elf_path: 
'./nuttx'` and no `app_bindir`, NTFC selects 3 of the 933 cases. With 
`elf_path` set to the NSH program (`../apps/bin_debug/init`), it selects 61. 
With `app_bindir: '../apps/bin'`, it selects 67.
   
   `run.sh` is the one of `mps2-an500:citest` (#21972): it moves each NTFC 
result directory into the artifact directory, so that a retry of the 
configuration does not leave `result/` in the tree.
   
   `session.json` excludes `Nuttx_System_Arch_Os_Stability` in both 
configurations. That module runs the heap test 10 times (108 s in the 
`sabre-6quad:citest` run below). `Nuttx_System_Mm_Integration` runs the heap 
test one time. `citest_knsh` has no `heap`, thus these two modules have no case 
there.
   
   The second commit adds both configurations to the board documentation.
   
   ## Impact
   
   CI only. The `Linux (arm-other)` job builds the two new configurations with 
no testlist change (`/arm/qemu` in `tools/ci/testlist/arm-other.dat`), and 
`testbuild.sh -R` runs their `run.sh`. No other testlist matches them. The 
CMake list of `arm-other.dat` has only `qemu-armv7a:full`, thus CI builds both 
with make.
   
   CI time added to the arm-other job (measured, see Testing): 6 to 7 minutes 
for `citest` (368 s and 430 s) and 5.5 to 9 minutes for `citest_knsh` (331 s 
and 541 s).
   
   No change to the kernel, to the board code or to other configurations.
   
   ## Testing
   
   Runs as CI does them, on an x86_64 Linux host in the CI image 
`ghcr.io/apache/nuttx/apache-nuttx-ci-linux` (podman, 4 CPUs): `pip install 
ntfc==0.0.3`, `nuttx-ntfc-testing` tag `release-0.0.2`, then `./cibuild.sh -c 
-A -N -R -S` on a testlist with one line 
(`/arm/qemu/qemu-armv7a/configs/<config>,CONFIG_ARM_TOOLCHAIN_GNU_EABI`), on 
nuttx master 82f3a18861c with this branch and nuttx-apps master 76a5693. Each 
run starts with an empty ccache. The host had other work (load average 20 to 37 
on 12 CPUs), thus the times are high.
   
   | Configuration | Run | NTFC result | NTFC time | Time for the configuration 
(clean, configure, build, NTFC, normalize) |
   |---|---|---|---|---|
   | `qemu-armv7a:citest` | 1 | 61 passed, 7 skipped, 0 failed | 279 s | 368 s |
   | `qemu-armv7a:citest` | 2 | 61 passed, 7 skipped, 0 failed | 308 s | 430 s |
   | `qemu-armv7a:citest_knsh` | 1 | 60 passed, 7 skipped, 0 failed | 179 s | 
331 s |
   | `qemu-armv7a:citest_knsh` | 2 | 60 passed, 7 skipped, 0 failed | 187 s | 
541 s |
   | `sabre-6quad:citest` (no change, for comparison) | 1 | 71 passed, 7 
skipped, 0 failed | 413 s | 504 s |
   | `sabre-6quad:citest` (no change, for comparison) | 2 | 71 passed, 7 
skipped, 0 failed | 455 s | 618 s |
   
   NTFC selects 68 cases in `citest`, 67 in `citest_knsh` and 78 in 
`sabre-6quad:citest`. The difference to `sabre-6quad:citest` is the 10 cases of 
`Nuttx_System_Arch_Os_Stability` and, in `citest_knsh`, the heap case of 
`Nuttx_System_Mm_Integration`. In the second run of `citest_knsh`, the clean 
step took 100 s and the build 186 s (81 s in the first run) because of disk 
load on the host; NTFC took the same time.
   
   The NTFC `ostest` case waits for `Exiting with status` and does not check 
the status. A direct run of `ostest` in QEMU on the images of both 
configurations gives `ostest_main: Exiting with status 0`. The 7 skipped cases 
are the same as in `sabre-6quad:citest` (`ls -s`, `uname -v/-m/-i`, `mw`, 
`exec`, mmleak). The normalize step (`refresh.sh`) passes. Each run passed at 
the first attempt.
   
   `make savedefconfig` gives the committed `defconfig` files. 
`tools/checkpatch.sh -c -u -m -g` passes on the two commits.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to