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

Feature request: integration with proptest and/or quickcheck #58

Open
danwallach opened this issue Feb 24, 2020 · 2 comments
Open

Feature request: integration with proptest and/or quickcheck #58

danwallach opened this issue Feb 24, 2020 · 2 comments

Comments

@danwallach
Copy link

The idea: if a project already has property-based tests, whether using proptest or quickcheck (or maybe something else?), it's useful to do fuzz testing with those APIs. That way, cargo test will still run quickly, while cargo fuzz will reuse all the same property-testing code, generators, etc., and run for as long as you want to see if it can find anything.

@Manishearth
Copy link
Member

I've kinda wanted this for a while, however there's an important thing to note: Arbitrary works differently from quickcheck and proptest because those operate on an unlimited pool of entropy, and Arbitrary operates on a limited byte string (and has to try and not introduce too much obfuscation). Without this, fuzzing will be very slow and ineffective.

That said, the opposite direction is less of a problem: We can probably write a wrapper that takes anything that implements Arbitrary and gives you something that implements quickcheck::Arbitrary, and maybe something similar for proptest.

@danwallach
Copy link
Author

It's also possible that you could reimplement the various macros used by proptest to generate "proptest-native" code vs. "libfuzzer-native" code at compile time, depending on your build target.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants