examples/elf: extend nxpkg validation coverage#3531
Conversation
c180ecf to
04e17b4
Compare
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
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 |
968d537 to
781be36
Compare
Extend the examples/elf ROMFS path so nxpkg validation can use generated package fixtures instead of hand-managed metadata. Generate index.json, bad-index.json, pkgtest.nsh, and pkgfail.nsh from the built hello ELF, recording the correct target arch/compat metadata and SHA-256 digest for the valid fixture. Keep mismatched- target and missing-artifact cases alongside the valid fixture so nxpkg target selection and failure handling can be exercised from the same example tree. Group the paired fixture outputs in one make step so parallel builds do not re-enter the generator independently. This keeps the fixture metadata tied to the actual built hello artifact instead of relying on manually maintained hashes or ad hoc shell setup, making follow-up review and later test reruns more predictable. There is no intended loader or board-behavior change; this is limited to fixture generation inside examples/elf. Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
14f6e92 to
8ef5065
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: