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 fuzz tests to multiple receivers and processors #35715

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

AdamKorcz
Copy link

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 or ConsumeLogs/ConsumeTraces which will then invoke the internal process routine.

Link to tracking issue

Fixes

Testing

Documentation

Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Oct 24, 2024
Copy link
Contributor

github-actions bot commented Nov 8, 2024

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Nov 8, 2024
@AdamKorcz
Copy link
Author

Please reopen. This PR is waiting for a review.

@atoulme atoulme reopened this Dec 17, 2024
Comment on lines +27 to +29
if err != nil {
t.Fatal(err)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

how about

Suggested change
if err != nil {
t.Fatal(err)
}
require.NoError(t, err)

Copy link
Author

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.

@atoulme atoulme added Skip Changelog PRs that do not require a CHANGELOG.md entry and removed Stale labels Dec 17, 2024
@atoulme
Copy link
Contributor

atoulme commented Dec 17, 2024

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?

@atoulme
Copy link
Contributor

atoulme commented Dec 17, 2024

Please review the CI as well, lint fails.

@AdamKorcz
Copy link
Author

@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.

@AdamKorcz
Copy link
Author

AdamKorcz commented Dec 19, 2024

These fuzz tests are already running continuously via the Collectors OSS-Fuzz integration.

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

Successfully merging this pull request may close these issues.

3 participants