Use make_initrd for functional tests and update nanvix version#36
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the libxml2 Nanvix build/test integration for Nanvix 0.13.19, whose standalone nanvixd now requires an initrd image bundling the test ELF with system daemons instead of a raw ELF path. Drives initrd creation through the shared make_initrd helper from nanvix-zutil 0.9.0 and reshapes the test pipeline so functional tests actually execute in every deployment mode.
Changes:
- Bump
nanvix-versionto 0.13.19 andnanvix-zutilto v0.9.0 across CI,nanvix.toml, and thez.sh/z.ps1bootstrappers (with auto re-bootstrap on version mismatch). - Refactor
z.pyto drop directsubprocessuse, splittest()into standalone vs. non-standalone paths, add_run_functional_standalone(), and rework_run_tests_windows()to usemake_initrd+self.run. - Update
Makefile.nanvix:test-functionalto dispatch byPROCESS_MODE: standalone delegates back to./z.sh, while Docker/native non-standalone modes runtest_libxml2.elfdirectly viananvixd.elf.
Show a summary per file
| File | Description |
|---|---|
.nanvix/nanvix.toml |
Bumps pinned nanvix-version to 0.13.19. |
.github/workflows/nanvix-ci.yml |
Bumps zutil-version to v0.9.0 in both CI job entries. |
z.sh |
Pins zutil 0.9.0 and re-bootstraps on version mismatch. |
z.ps1 |
PowerShell counterpart: pins 0.9.0 and re-bootstraps with a venv-presence check. |
.nanvix/Makefile.nanvix |
Implements real functional test execution via nanvixd.elf + mkramfs.elf for Docker/native, delegates standalone to ./z.sh. |
.nanvix/z.py |
Routes tests through make_initrd, adds _run_functional_standalone, and replaces subprocess calls with self.run(..., docker=False). |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 6/6 changed files
- Comments generated: 6
…ersion Refactor the build script to fix breaking changes when bumping Nanvix to v0.13.19. In standalone mode, nanvixd now requires an initrd image that bundles the application binary with system daemons, rather than accepting a raw ELF path directly. Changes to z.py: - Remove subprocess usage; use self.run() with docker=False for all tool invocations (mkramfs, nanvixd). - Split test() into standalone vs non-standalone paths: standalone mode honors self.targets to determine which phases to run, delegates functional tests to new _run_functional_standalone() which uses self.make_initrd(); non-standalone modes delegate to the Makefile. - Factor sysroot validation into _get_sysroot() helper for actionable error messages when CFG_SYSROOT is unset. - Refactor _run_tests_windows() to use make_initrd for bundling test binaries with system daemons; each self.run() call is wrapped separately so failure messages distinguish mkramfs vs nanvixd failures. Cleanup of initrd and copied ELFs is handled in finally blocks with FileExistsError guarded explicitly. - Add inline comment clarifying that self.run() raises SystemExit on non-zero exit and nanvixd propagates the guest exit status. Changes to Makefile.nanvix: - test-functional now dispatches by PROCESS_MODE: standalone delegates to ./z.sh (Python handles initrd creation); non-standalone runs test_libxml2.elf via nanvixd.elf directly (Docker and native paths). - Use mktemp -d + trap for robust /tmp cleanup on failure. - This ensures test_libxml2.elf actually executes in all deployment modes, not just on Windows standalone. Other files updated: - nanvix.toml: bump nanvix-version to 0.13.19. - nanvix-ci.yml: bump zutil-version to v0.9.0. - z.sh/z.ps1: add version-mismatch re-bootstrap logic.
ppenna
force-pushed
the
enhancement-update-nanvix
branch
from
May 17, 2026 23:31
1d5b610 to
dd969f7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refactor the build script to fix breaking changes when bumping Nanvix to v0.13.19. In standalone mode,
nanvixdnow requires an initrd image that bundles the application binary with system daemons, rather than accepting a raw ELF path directly.Changes
z.pysubprocessusage; useself.run()withdocker=Falsefor all tool invocations (mkramfs,nanvixd).test()into standalone vs non-standalone paths: standalone mode runs smoke+integration via Makefile then delegates functional tests to new_run_functional_standalone()which usesself.make_initrd()._run_tests_windows()to usemake_initrdfor bundling test binaries with system daemons, catchSystemExitinstead of checking return codes, and clean up initrd artifacts infinallyblocks.Makefile.nanvixtest-functionalnow dispatches byPROCESS_MODE: standalone delegates to./z.sh(Python handles initrd creation); non-standalone runstest_libxml2.elfviananvixd.elfdirectly (Docker and native paths).test_libxml2.elfactually executes in all deployment modes, not just on Windows standalone.Other files
nanvix.toml: bumpnanvix-versionto0.13.19.nanvix-ci.yml: bumpzutil-versiontov0.9.0.z.sh/z.ps1: add version-mismatch re-bootstrap logic.Related PRs