examples/elf: extend nxpkg validation coverage#3531
Conversation
c180ecf to
04e17b4
Compare
Extend the ELF package fixtures with both success and failure repository data so nxpkg validation paths are exercised from the same example flow. Format the helper generator with black so it matches the current apps lint checks. Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
04e17b4 to
4429450
Compare
acassis
left a comment
There was a problem hiding this comment.
@aviralgarg05 please test CMake as well, NuttX used both building systems
40ff725 to
bf8be7a
Compare
Add the matching CMake fixture generation for the ELF nxpkg\nvalidation flow so the example is covered by both supported\nbuild systems.\n\nThis generates the symtab and ROMFS sources in the CMake path\nand keeps the fixture behavior aligned with the existing Makefile\nimplementation. Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
bf8be7a to
7f20e7e
Compare
|
@xiaoxiang781216 PTAL |
|
This PR is ready to merge :) |
linguini1
left a comment
There was a problem hiding this comment.
This change enforces that the user has Python as part of the build system, which I remember was a contentious issue.
Also, is the elf example not different from the nxpkg application? I don't think we should be generating nxpkg test artifacts from the elf example. It would be better to include those under some test/ directory.
|
@aviralgarg05 please convert these tools to C, I think it is safer |
|
I pushed an update for this. The Python generators added by this PR are gone now. The fixture helper is now a small C host tool, and the CMake path uses the existing in-tree tooling style instead of introducing new Python build steps. I kept the fixture under |
Replace the Python-based ELF fixture helper with a small host-side C tool so the generated package fixtures do not depend on Python at build time.\n\nKeep the generated helper and CMake rules formatted to match the current apps lint checks. Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
968d537 to
781be36
Compare
Summary
This patch is another smaller upstream slice being extracted from the ongoing GSoC 2026 Dynamic ELF loading and
nxpkgwork for NuttX.An earlier draft PR (#3474) carries the initial
nxpkgpackage lifecycle helper. This PR is theexamples/elfvalidation-fixture follow-up from the same broader effort.Series order for this PR:
The change extends the
examples/elfROMFS path sonxpkgvalidation can use generated package fixtures instead of hand-managed metadata.Concretely, it:
index.json,bad-index.json,pkgtest.nsh, andpkgfail.nshfrom the builthelloELFarch/compatmetadata and SHA-256 digest for the valid fixturenxpkgtarget selection and failure handling can be exercised from the same example treeImpact
This makes the
examples/elfside of the Dynamic ELF /nxpkgseries easier to validate and reproduce.It keeps the fixture metadata tied to the actual built
helloartifact, instead of relying on manually maintained hashes or ad hoc shell setup. That should make follow-up review and later test reruns more predictable.There is no intended loader or board-behavior change in this patch. It is limited to fixture generation inside
examples/elf.Testing
Host:
arm64)xtensa-esp-elf-gcc (crosstool-NG esp-14.2.0_20241119) 14.2.0esptool.py v4.11.0Focused stacked verification for this PR:
appsworktree at the current#3474head, with this two-file patch appliedapache/nuttxworktree at local294d6d2763(boards/xtensa/esp32s3/xiao:sotest: enable nxpkg fixtures), which carries the matchingesp32s3-xiao:elfconfiguration used for the seriesxtensaesp32s3-xiao:elfBuild steps:
Generated fixture artifacts:
Build result:
Branch sanity build:
apache/nuttxworktree was also paired directly with this PR branch to confirm the slice still builds cleanly outside the stacked#3474setupSanity-build result: