-
Notifications
You must be signed in to change notification settings - Fork 39
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
fail_point! does nothing unless a FailScenario exists #77
Comments
Looking at the code, I think the problem is that the environment variable is only read by the I guess I would have expected that you could just embed Maybe the macro could lazily load the environment variable? I got the idea that At least, maybe this could be more clear in the docs. But, perhaps the division of responsibility between them could be reconsidered... The reason I hit this is that I want to exercise failpoints in code run as a subprocess of a test. I thought setting the variable would do it, but it seems that the code under test needs to do It seems like it would be better to separate
|
Perhaps I'm doing something wrong, but I have code that looks very similar to the examples, and I can't get it to panic or otherwise respond to failpoints in the environment:
The full code is in https://github.com/sourcefrog/fail-repro
main.rs
isWhen I run this:
In case this was broken by a later Cargo change, I tried it on both 1.76 and 1.63 and they both show the same behavior.
This is on x86_64 Linux.
The text was updated successfully, but these errors were encountered: