CI: assert test-lib exit status in the wolfBoot host-smoke job - #11275
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the wolfBoot integration CI workflow so the host-smoke job correctly captures and asserts test-lib’s exit status (now meaningful on wolfBoot master), preventing set -e from aborting the step before logs and assertions run.
Changes:
- Scope
errexitoff/on aroundtest-libcommand substitutions to safely capture output and$?. - Add explicit exit-status assertions: golden path must exit
0, tamper path must exit non-zero. - Expand step comments to document the behavioral change and why the
set +e/$?pattern is required.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Can one of the admins verify this patch? |
danielinux
approved these changes
Aug 26, 2026
4 tasks
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.
The
host-smokejob has been failing on every branch since wolfBoot2e918de2("propagate the verify result from wolfBoot_start to the exit code") landed on wolfBoot master:test-libnow exits 255 for a rejected image instead of always exiting 0, so the tamper run's$(...)capture tripsset -eand aborts the step at the assignment, before the output is printed or any assertion runs -- which is why the log ends with the golden run's "Firmware Valid" followed by exit 255 and looks like a golden-path failure. This scopeserrexitaround the two deliberately-non-zero invocations using the sameset +e/ capture$?/set -eidiom wolfBoot adopted in its owntest-library.ymlin that same commit, and takes the opportunity to assert the exit status on both paths (golden must exit 0, tamper must exit non-zero) in addition to the existing output checks, so the two workflows stay in step. Verified locally by building wolfBoot master'stest-liband reproducing both cases exactly (golden "Firmware Valid" / exit 0, tamper "Failure -1: Hdr 1, Hash 0, Sig 0" / exit 255), confirming the current step body fails identically to CI against that binary, confirming the new body passes, and negative-testing all four assertions with stubs to prove they actually fail when they should.