4 ms·
I spent some time looking at the arbitrary crate in Rust and was left unsatisfied at the shrinking story, which I think is 90% of the value of PBT.
by sunshowers 2y ago
I spent some time looking at the arbitrary crate in Rust and was left unsatisfied at the shrinking story, which I think is 90% of the value of PBT.
- matklad 2y agoDo you have a model problem which is tricky to shrink? I implemented a stupid simple shrinker for arbitrary, and I’d love to know a specific example where it fails to shrink in a good way: https://github.com/matklad/arbtest/blob/0191f93846e9f7e382543bc1ca8526ed04d85795/src/lib.rs#L458 https://github.com/matklad/arbtest/blob/0191f93846e9f7e38254... I know at lest two interesting approaches for making that way smarter, but I don’t yet have a problem where my dumb approach isn’t sufficient.
- sunshowers 2y agoI think I'll have to try it out! I'm just dubious about approaches that don't put shrinking front and center.
- ruuda 2y agoShrinking is built in to libFuzzer! (`-minimize_crash` in libFuzzer, `cargo fuzz tmin` with cargo-fuzz)
- sunshowers 2y agoI remember libFuzzer's shrinking not doing a great job for sophisticated structured inputs, but maybe it's worth another look!