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

test: add fuzzing set up #1497

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DavidKorczynski
Copy link

This is an effort to migrate fuzzers from OSS-Fuzz to upstream.

I've added it such that it's also a unit test that is run by way of pytest. The reason for doing so is to make it easier to test that the fuzzers won't break during development.

If you are interested in this addition, then I can refine the build script on the OSS-Fuzz side (https://github.com/google/oss-fuzz/blob/master/projects/coveragepy/build.sh) such that it builds all files prefixed test_fuzz in the tests/ directory as fuzzers and will run them on OSS-Fuzz accodingly. This will make it trivial to add new fuzzers to the continuous fuzzing set up.

Ref:

Signed-off-by: David Korczynski [email protected]

Signed-off-by: David Korczynski <[email protected]>
"data",
[
b"random_data",
b"more random data"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand how atheris works. What does it do with these two data strings?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only added these strings just to make it such that the fuzzer could be tested with pytest -- to e.g. check that the fuzzer won't break.

The data from pytest.mark.parametrize( is not used in the actual fuzzing runs.

@ProsperousHeart
Copy link
Contributor

Are this and #1490 still valid?

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

Successfully merging this pull request may close these issues.

3 participants