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

Add OSS-Fuzz support to the Bazel fuzzing rules. #96

Merged
merged 2 commits into from
Jan 6, 2021

Conversation

stefanbucur
Copy link
Collaborator

The support includes (a) a repository rule that extracts OSS-Fuzz environment information and makes it available hermetically in a @rules_fuzzing_oss_fuzz repo, and (b) a new target in the cc_fuzz_test macro that packages a fuzz test and its dependencies in the OSS-Fuzz format.

@stefanbucur
Copy link
Collaborator Author

I still need to update the documentation, but I wanted to first validate with you the implementation, to make sure it properly observes OSS-Fuzz's contracts @inferno-chromium @oliverchang

@stefanbucur
Copy link
Collaborator Author

Starting another thread to discuss testing: IMO, it would be nice if there was a way to make sure the code works correctly end-to-end on the latest versions of these rules and OSS-Fuzz.

@inferno-chromium @oliverchang do you think we should have tests inside the OSS-Fuzz repo, here, or both? If so, any thoughts on how to best test these? My own (manual) testing resorted to create a dummy project (like this) and then making sure the examples in this repo build under that project. Is there a better way to do this during CI?

Copy link
Collaborator

@oliverchang oliverchang left a comment

Choose a reason for hiding this comment

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

nice!

fuzzing/private/oss_fuzz/package.bzl Show resolved Hide resolved
fuzzing/private/oss_fuzz/package.bzl Show resolved Hide resolved
fuzzing/private/oss_fuzz/BUILD.tpl Show resolved Hide resolved
fuzzing/private/oss_fuzz/repository.bzl Show resolved Hide resolved
fuzzing/private/oss_fuzz/package.bzl Show resolved Hide resolved
Copy link
Collaborator Author

@stefanbucur stefanbucur left a comment

Choose a reason for hiding this comment

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

Thanks for all the feedback! PTAL.

fuzzing/private/oss_fuzz/BUILD.tpl Show resolved Hide resolved
fuzzing/private/oss_fuzz/package.bzl Show resolved Hide resolved
fuzzing/private/oss_fuzz/package.bzl Show resolved Hide resolved
fuzzing/private/oss_fuzz/package.bzl Show resolved Hide resolved
fuzzing/private/oss_fuzz/repository.bzl Show resolved Hide resolved
fuzzing/private/oss_fuzz/repository.bzl Show resolved Hide resolved
@stefanbucur
Copy link
Collaborator Author

Starting another thread to discuss testing: IMO, it would be nice if there was a way to make sure the code works correctly end-to-end on the latest versions of these rules and OSS-Fuzz.

@inferno-chromium @oliverchang do you think we should have tests inside the OSS-Fuzz repo, here, or both? If so, any thoughts on how to best test these? My own (manual) testing resorted to create a dummy project (like this) and then making sure the examples in this repo build under that project. Is there a better way to do this during CI?

Bumping this up, in case you have any suggestion.

Copy link
Collaborator

@oliverchang oliverchang left a comment

Choose a reason for hiding this comment

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

Starting another thread to discuss testing: IMO, it would be nice if there was a way to make sure the code works correctly end-to-end on the latest versions of these rules and OSS-Fuzz.
@inferno-chromium @oliverchang do you think we should have tests inside the OSS-Fuzz repo, here, or both? If so, any thoughts on how to best test these? My own (manual) testing resorted to create a dummy project (like this) and then making sure the examples in this repo build under that project. Is there a better way to do this during CI?

Bumping this up, in case you have any suggestion.

Perhaps we can have a GitHub action for this repo which checks out OSS-Fuzz at the latest revision and builds the test project? Seems like something that would fit better in this repo.

fuzzing/private/oss_fuzz/package.bzl Show resolved Hide resolved
fuzzing/private/oss_fuzz/package.bzl Show resolved Hide resolved
fuzzing/private/oss_fuzz/BUILD.tpl Show resolved Hide resolved
@stefanbucur
Copy link
Collaborator Author

Starting another thread to discuss testing: IMO, it would be nice if there was a way to make sure the code works correctly end-to-end on the latest versions of these rules and OSS-Fuzz.
@inferno-chromium @oliverchang do you think we should have tests inside the OSS-Fuzz repo, here, or both? If so, any thoughts on how to best test these? My own (manual) testing resorted to create a dummy project (like this) and then making sure the examples in this repo build under that project. Is there a better way to do this during CI?

Bumping this up, in case you have any suggestion.

Perhaps we can have a GitHub action for this repo which checks out OSS-Fuzz at the latest revision and builds the test project? Seems like something that would fit better in this repo.

Sounds great - let's move the conversation to #105. There are a few details to figure out I think.

@stefanbucur stefanbucur merged commit 5471279 into master Jan 6, 2021
@stefanbucur stefanbucur deleted the oss-fuzz-support branch January 6, 2021 14:41
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.

4 participants