Skip to content

fix broken unit test#801

Merged
dgarske merged 1 commit into
wolfSSL:masterfrom
bigbrett:unit-test-fix
Jun 16, 2026
Merged

fix broken unit test#801
dgarske merged 1 commit into
wolfSSL:masterfrom
bigbrett:unit-test-fix

Conversation

@bigbrett

@bigbrett bigbrett commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Fixes broken unit tests on master causing all current PRs to fail.

Seems that two separate PRs came together to break unit tests on master.

#746 changed the ELF loader's collision guard: when a segment would overwrite program headers that haven't been read yet, the loader after this PR fails with -5 instead of the old behavior of silently skipping the segment and returning 0.

The F-4418 regression test (added in #792 ) still expected the old skip-and-succeed behavior. Neither PR failed individually since they never tested each others changes, but now all PRs are failing.

Fix: update the test to expect the loader to reject the image (ret == -5) rather than return success.

Copilot AI review requested due to automatic review settings June 16, 2026 22:13
@bigbrett bigbrett self-assigned this Jun 16, 2026

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

Note

Copilot was unable to run its full agentic suite in this review.

Updates the ELF BSS guard regression test to align with the loader’s new “fail-on-header-collision” behavior (returning -5) instead of the previous skip-and-succeed behavior.

Changes:

  • Update the test expectation from success (0) to failure (-5) for the header-collision case.
  • Clarify the test comment to reflect that the loader aborts before any write occurs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tools/unit-tests/unit-elf-bss-guard.c

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #801

Scan targets checked: wolfboot-bugs, wolfboot-src

No new issues found in the changed files. ✅

Comment thread tools/unit-tests/unit-elf-bss-guard.c
@bigbrett bigbrett assigned dgarske and unassigned bigbrett Jun 16, 2026

@dgarske dgarske left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! I also fixed here -> 4310c4b
Was getting really annoying and I should have just opened a new PR!

@dgarske dgarske merged commit 1ba037a into wolfSSL:master Jun 16, 2026
385 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.

5 participants