Skip to content

better error message when test unexpectedly pasess#1176

Merged
davidlattimore merged 1 commit intowild-linker:mainfrom
karolzwolak:better-test-error
Oct 9, 2025
Merged

better error message when test unexpectedly pasess#1176
davidlattimore merged 1 commit intowild-linker:mainfrom
karolzwolak:better-test-error

Conversation

@karolzwolak
Copy link
Copy Markdown
Contributor

@karolzwolak karolzwolak commented Oct 9, 2025

Currently when test expects error and fails (so linking/building succeeds) the error message is confusing.

Before:

Error: Failed to build program `relocation-overflow.c` with linker `wild` config `default`
  Caused by:
    Linker returned exit status of 0, when an error was expected. Command:... // irrelevant

After this PR:

Error: Unexpectedly succeeded to build program `relocation-overflow.c` with linker `wild` config `default`
  Caused by:
    Linker returned exit status of 0, when an error was expected. Command:...// irrelevant

Copy link
Copy Markdown
Member

@mati865 mati865 left a comment

Choose a reason for hiding this comment

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

I was typing the suggestion to create a variable as you pushed 😉

@davidlattimore davidlattimore merged commit 95bc0bb into wild-linker:main Oct 9, 2025
20 checks passed
@karolzwolak karolzwolak deleted the better-test-error branch November 25, 2025 20:42
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.

3 participants