Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd reproducible sources of panic to tests #10144
Comments
|
I also played around with a chaos mode idea that involved randomly simulating channel send/receive failure with some measure of probability. I tried to make the ChaosSender/ChaosReceiver interface identical to Sender/Receiver but got burned by our use of |
|
As discussed on IRC, we need to make sure we're not adding an attack surface by doing this, perhaps by putting the injected panics behind a build flag? |
|
It would be super-nifty if we could create a fuzzing tool that randomly instrumented the binary with If there's some way to make a generally-usable tool for Rust that would do this, I'd probably be willing to help find and fund a graduate student for a summer to work on it. |
|
Ah yeah unfortunately I don't know of any great way to inject a panic into already-compiled code (it would probably be unsound though?). |
|
Could we add a "chaos" cfg, which components could use to add random failure, with the idea that if we compile servo with chaos enabled, the resulting binary shouldn't panic? |
|
I started on a patch which would add randomly closing pipelines: asajeffrey@a9fb350 |
|
The patch is now PR #10179, which has been r+d. This doesn't inject panic directly, but it does randomly kill pipelines without the usual clean-up, which results in panic. |
|
Is this still something we want? |
|
I still believe that it's a good idea. |
Ideas:
-servo-panicproperty for CSS parsing/layoutabout:panicURL for network fetches