Skip to content

Check the results of two model tests without assert() - #7723

Open
GitPaean wants to merge 2 commits into
OPM:masterfrom
GitPaean:tasklets-failure-test-release
Open

GitPaean wants to merge 2 commits into
OPM:masterfrom
GitPaean:tasklets-failure-test-release

Conversation

@GitPaean

Copy link
Copy Markdown
Member

test_tasklets_failure and test_quadrature checked their results only with assert(). With -DWITH_NDEBUG=ON those checks are compiled out, so both tests passed whatever happened. They now report a failed check through their exit code, and test_tasklets_failure also makes sure waitpid() reported the child.

The parent checked the child's exit status with assert(), so a build
with -DWITH_NDEBUG=ON passed the test whatever the child did. It also
read the status without checking that waitpid() had reported the child.
With -DWITH_NDEBUG=ON the assert() was compiled out and the test checked
nothing. A failed check now throws, which main() reports as a failure.
@GitPaean GitPaean added the manual:irrelevant This PR is a minor fix and should not appear in the manual label Nov 23, 2026
@GitPaean
GitPaean marked this pull request as ready for review November 23, 2026 13:13
@GitPaean

Copy link
Copy Markdown
Member Author

jenkins build this please

@bska bska 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.

Much appreciated. Please merge when green.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

manual:irrelevant This PR is a minor fix and should not appear in the manual

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants