-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 fuzz tests to multiple receivers and processors #35715
base: main
Are you sure you want to change the base?
Conversation
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
Please reopen. This PR is waiting for a review. |
if err != nil { | ||
t.Fatal(err) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about
if err != nil { | |
t.Fatal(err) | |
} | |
require.NoError(t, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion. This will give some problems for the fuzzers on OSS-Fuzz. Unless it is a hard style requirement, I would prefer to skip this suggestion.
Reviewed. The PR is hard to review because it spans multiple components. I think you mean to introduce fuzzing as a testing practice, which is great. Can you elaborate to what you're trying to achieve further please? |
Please review the CI as well, lint fails. |
@atoulme Thank you for reviewing. Yes, this introduces a set of fuzz tests for several components. This is part of the work carried out during the Collectors fuzzing audit. |
These fuzz tests are already running continuously via the Collectors OSS-Fuzz integration. |
Signed-off-by: Adam Korczynski <[email protected]>
Signed-off-by: Adam Korczynski <[email protected]>
Description
Adds fuzz tests for receiver handlers and processing of metrics, logs and traces. For receivers, the fuzz test will create an HTTP request with the fuzzers testcase as its body. For processors, the fuzzer will create random logs, metrics or traces and pass it to a routine that processes the data - for the most part either a
processLogs
/processMetrics
/processTraces
method orConsumeLogs
/ConsumeTraces
which will then invoke the internalprocess
routine.Link to tracking issue
Fixes
Testing
Documentation