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 go fuzzer in preparation for testing. #630

Merged
merged 2 commits into from
Jul 28, 2014

Conversation

lavalamp
Copy link
Member

Also gofmt a few files that needed it.

Upcoming is a PR that uses this to make sure our api.Encode/Decode actually work.

}
switch v.Kind() {
case reflect.Map:
v.Set(reflect.MakeMap(v.Type()))
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any need to try nil maps or slices randomly with this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea. Pointers, too.

@lavalamp
Copy link
Member Author

Implemented @smarterclayton's suggestion plus a few more things I turned out to need.

@lavalamp
Copy link
Member Author

See #571 for a usage of this.

I'm thinking about trying to move this into a separate project and using it as a dependency. It's not 100% full featured yet, but I think it would still be widely useful. Thoughts?

@smarterclayton
Copy link
Contributor

Makes sense - was going to suggest it.

@lavalamp
Copy link
Member Author

Responding to some @smarterclayton comments that got lost when I pushed-- I'll add a TODO to add reproducible randomness to this. Will require more changes so best left to a future PR.

@smarterclayton
Copy link
Contributor

That's fine with me. Wondered where that comment went... :)

@lavalamp
Copy link
Member Author

Yeah, if you leave comments on the revision instead of the PR they go away when I rebase/squash.

@lavalamp
Copy link
Member Author

Hopefully ready to go now.

@smarterclayton
Copy link
Contributor

LGTM

brendandburns added a commit that referenced this pull request Jul 28, 2014
Add go fuzzer in preparation for testing.
@brendandburns brendandburns merged commit b34a3c8 into kubernetes:master Jul 28, 2014
@lavalamp lavalamp deleted the fuzz branch August 26, 2015 20:02
vishh pushed a commit to vishh/kubernetes that referenced this pull request Apr 6, 2016
pointers that reference addresses of the internal circular buffer should not escape
wking pushed a commit to wking/kubernetes that referenced this pull request Jul 21, 2020
fix(docs): Fix typo and command reference
b3atlesfan pushed a commit to b3atlesfan/kubernetes that referenced this pull request Feb 5, 2021
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