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

[Fuzzing] Add fuzz testing #448

Merged
merged 3 commits into from
Aug 5, 2023
Merged

[Fuzzing] Add fuzz testing #448

merged 3 commits into from
Aug 5, 2023

Conversation

0x34d
Copy link
Contributor

@0x34d 0x34d commented Jul 21, 2023

using go-fuzz for fuzz testing of ldap

Error:

"PR / Go 1.16.x PR Validate . (Modules) (pull_request) Failing after 17s:"

vet: ./dn_test.go:294:29: F not declared by package testing
Error: Process completed with exit code 2.

Go-fuzz was introduce in Go 1.18.

@cpuschma
Copy link
Member

Thank you for your PR. I've been keeping an eye on fuzzing for some time but didn't bring myself to do it yet 😄 I'm not very familar with Github Actions, cause this would break any checks for older Go versions.

If anyone can jump in and update the Github Actions to only run fuzzing on Go versions >1.18, I would very much appreciate that ❤️

Comment on lines +1 to +2
//go:build go1.18
// +build go1.18
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Review this hack.

@0x34d
Copy link
Contributor Author

0x34d commented Aug 1, 2023

fuzz_test.go why a different file?

  • It will prevent running tests on versions lower than go1.18 in this file.
  • The filter_test.go file contains Benchmark tests, ClusterFuzz doesn't compile when Benchmark tests and Fuzzing tests are in the same file.

Signed-off-by: Arjun Singh <[email protected]>
@cpuschma cpuschma merged commit 3646355 into go-ldap:master Aug 5, 2023
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.

2 participants