-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Tests using resume_unwind fail with -Cpanic=abort and -Zpanic_abort_tests #74301
Comments
I'd be happy to write a patch to resolve this, but I'd need some guidance first as to what a solution might entail. (cc @tmandry ?) |
I don't think this is a bug, with the testing machinery at least. The same thing happens when this code is run outside a test in a binary with
|
That's a reasonable argument. That said, a test suite running with Perhaps a |
I think that'd be reasonable, but as far as I know there isn't a conditional compilation flag for panic behavior (I believe there's an issue for this floating around somewhere). In Fuchsia we manually added a |
…orse Add `#[cfg(panic = '...')]` This PR adds conditional compilation according to the panic strategy. I've come across a need for a flag like this a couple of times while writing tests: rust-lang#74301 , rust-lang#73670 (comment) I'm not sure if I need to add a feature gate for this flag?
Triage: Looks like this was resolved with #74754? I'll go ahead and close. Please re-open if I am mistaken. |
I tried this test code with
RUSTFLAGS="-Cpanic=abort -Zpanic_abort_tests"
:I expected to see this happen: The test result should be "ok".
Instead, this happened: The test fails:
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: