Skip to content

CI: assert test-lib exit status in the wolfBoot host-smoke job - #11275

Merged
danielinux merged 1 commit into
wolfSSL:masterfrom
dgarske:host_smoke_exit_code
Aug 26, 2026
Merged

CI: assert test-lib exit status in the wolfBoot host-smoke job#11275
danielinux merged 1 commit into
wolfSSL:masterfrom
dgarske:host_smoke_exit_code

Conversation

@dgarske

@dgarske dgarske commented Aug 25, 2026

Copy link
Copy Markdown
Member

The host-smoke job has been failing on every branch since wolfBoot 2e918de2 ("propagate the verify result from wolfBoot_start to the exit code") landed on wolfBoot master: test-lib now exits 255 for a rejected image instead of always exiting 0, so the tamper run's $(...) capture trips set -e and 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 scopes errexit around the two deliberately-non-zero invocations using the same set +e / capture $? / set -e idiom wolfBoot adopted in its own test-library.yml in 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's test-lib and 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.

Copilot AI lite review requested due to automatic review settings August 25, 2026 22:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 errexit off/on around test-lib command 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.

@wolfSSL-Bot

Copy link
Copy Markdown

Can one of the admins verify this patch?

@danielinux
danielinux merged commit 63b02a1 into wolfSSL:master Aug 26, 2026
368 of 370 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants