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

Don't abort() in assertions if we can avoid it #12

Closed
nemequ opened this issue Jan 19, 2016 · 1 comment
Closed

Don't abort() in assertions if we can avoid it #12

nemequ opened this issue Jan 19, 2016 · 1 comment
Assignees
Labels

Comments

@nemequ
Copy link
Owner

nemequ commented Jan 19, 2016

There are some disadvantages to calling abort() in the assertion macros when not forking… perhaps the most problematic is that, when we're not in a forked child, the contents of stderr will be swallowed since the test runner exits before it can splice it to stderr. Also, the test runner exits and no more tests are run, which is obviously not what we want.

I think the easiest way to address this would be to setjmp with some thread-local storage right before we exec the test case, then longjmp back in the assertion.

@nemequ nemequ added the bug label Jan 19, 2016
@nemequ nemequ self-assigned this Jan 19, 2016
@nemequ
Copy link
Owner Author

nemequ commented Jan 19, 2016

f981192

@nemequ nemequ closed this as completed Jan 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant