Repository navigation
fix(runtime): select the top-level kernel during filesystem sync - #18
Open
Hanabi9248 wants to merge 1 commit into
Open
Hanabi9248 wants to merge 1 commit into
Hanabi9248 wants to merge 1 commit into
Conversation
Use the existing jq query to exclude a Buildroot-installed /boot/bzImage from the runtime boot-image replacement. Cover real generated metadata with both kernel layouts and two working directories. Signed-off-by: Hanabi <317387557+Hanabi9248@users.noreply.github.com>
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.
With the documented
menuconfigworkflow, enabling Buildroot 2022.08'sBR2_LINUX_KERNEL_INSTALL_TARGETinstalls the kernel at/boot/bzImage. This project's post-image step also places it at/bzImage. The current global grep matches both filesystem records, producing a newline in the replacement and an unterminated sed command. The default configuration leaves this option disabled.Select the top-level
bzImagerecord with jq, using the same query already present inpackages/runtime/update-img.sh. The normal filename and copy behavior stay the same. #17's missing-source protection is independent and should be retained; #15 changes the build/cache workflow rather than this selection.The regression runs the complete sync script and the unchanged
copy-to-sha256.py/fs2json.pygenerators. It creates genuine generated metadata with the root kernel and an optional/bootcopy, then checks the full HTML replacement, copied files and an outside canary from both the runtime directory and an unrelated working directory. Payloads model the generated layout and are not bootable kernels.Main validation: Windows Python 3.14 with existing Git Bash utilities and the real jq CLI, under one CPU / 768 MiB / 16 processes. Baseline: two installed-kernel cases fail in sed; both default-layout controls pass. Candidate: all four pass. Black/isort and Ruff pass; the test keeps explicit subprocess pipes with a narrow UP022 annotation. Formatting did not require repeating accepted product tests.
The test requires Python 3.9+ and explicit existing tool/private-work paths:
WASM_SOURCE_ROOT,WASM_BASH,WASM_UTILITY_BIN,WASM_JQ,WASM_WORK_ROOT; runpython tests/test_sync_kernel_selection.py -v. The work root must be an owned, non-root temporary directory. The test verifies its cleanup boundary before removing fixtures.No full Buildroot/Docker/kernel build, Linux run, browser/v86 boot, hosted CI or combined state with unmerged #17 was run.