Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to expect an exact exit code for a test? #10479

Open
apache-hb opened this issue Jun 10, 2022 · 1 comment
Open

How to expect an exact exit code for a test? #10479

apache-hb opened this issue Jun 10, 2022 · 1 comment

Comments

@apache-hb
Copy link
Contributor

Currently meson has no way to assert that a test returns an exact exit code, this would be useful if a test is expected to fail with a specific failure state. it would also allow tests that should_fail to distinguish between an error code and a segmentation fault or abort. Would this be something meson would be open to allowing or is there a specific reason why this isnt implemented?

@eli-schwartz
Copy link
Member

The problem with should_fail is that it doesn't indicate that the test passes if the exit code indicates failure... rather, should_fail indicates that the test is supposed to be an "expected failure", i.e. a known bug (and if it ever emits a successful exit code, the test runner should report an "unexpected pass" which you're supposed to fix by removing the should_fail keyword).

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

No branches or pull requests

2 participants