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

Update gofuzz dep #4985

Merged
merged 4 commits into from
Mar 6, 2015
Merged

Update gofuzz dep #4985

merged 4 commits into from
Mar 6, 2015

Conversation

thockin
Copy link
Member

@thockin thockin commented Mar 3, 2015

No description provided.

@thockin
Copy link
Member Author

thockin commented Mar 3, 2015

@lavalamp

Tests fail with a roundtrip error around parsing time. I know you changed that in upstream gofuzz..

--- FAIL: TestRoundTripTypes (5.11s)
serialization_test.go:64: 0: Node: error unmarshaling JSON: parsing time "-136438948280-12-03T08:04:46-08:00" as "2006-01-02T15:04:05Z07:00": cannot parse "-136438948280-12-03T08:04:46-08:00" as "2006"

@lavalamp
Copy link
Member

lavalamp commented Mar 3, 2015

Ah the default fuzz function can generate negative times, which don't roundtrip.

Huh, can't decide if this is a bug in time.Unix (which accepts values that produce an invalid time), if fuzz's time function should be changed, or if we should just add a Fuzz() function to util.Time.

@thockin
Copy link
Member Author

thockin commented Mar 3, 2015

This is what fuzz.Interface is for, I guess...

On Tue, Mar 3, 2015 at 9:55 AM, Daniel Smith notifications@github.com
wrote:

Ah the default fuzz function can generate negative times, which don't
roundtrip.

Huh, can't decide if this is a bug in time.Unix (which accepts values that
produce an invalid time), if fuzz's time function should be changed, or if
we should just add a Fuzz() function to util.Time.


Reply to this email directly or view it on GitHub
#4985 (comment)
.

@thockin
Copy link
Member Author

thockin commented Mar 3, 2015

And why don't negative times roundtrip? That seems valid.

On Tue, Mar 3, 2015 at 12:22 PM, Tim Hockin thockin@google.com wrote:

This is what fuzz.Interface is for, I guess...

On Tue, Mar 3, 2015 at 9:55 AM, Daniel Smith notifications@github.com
wrote:

Ah the default fuzz function can generate negative times, which don't
roundtrip.

Huh, can't decide if this is a bug in time.Unix (which accepts values
that produce an invalid time), if fuzz's time function should be changed,
or if we should just add a Fuzz() function to util.Time.


Reply to this email directly or view it on GitHub
#4985 (comment)
.

@lavalamp
Copy link
Member

lavalamp commented Mar 4, 2015

time.Time internal constraints are getting violated: http://golang.org/src/time/time.go?s=1855:2369#L29

@thockin
Copy link
Member Author

thockin commented Mar 5, 2015

Updated with latest gofuzz which handles time.Time more correctly.

@lavalamp
Copy link
Member

lavalamp commented Mar 5, 2015

Travis disagrees... our time format doesn't marshal nanoseconds. We'll have to write a custom Fuzz() on util.Time().

@thockin
Copy link
Member Author

thockin commented Mar 5, 2015

wierd, it passes locally

On Thu, Mar 5, 2015 at 10:39 AM, Daniel Smith notifications@github.com
wrote:

Travis disagrees... our time format doesn't marshal nanoseconds. We'll
have to write a custom Fuzz() on util.Time().


Reply to this email directly or view it on GitHub
#4985 (comment)
.

@thockin
Copy link
Member Author

thockin commented Mar 5, 2015

I can not fathom how this passes 100% locally but fails on travis

@thockin thockin force-pushed the gofuzz branch 4 times, most recently from 881e7fe to 0b75195 Compare March 6, 2015 06:38
@thockin
Copy link
Member Author

thockin commented Mar 6, 2015

Should pass Travis now

@thockin
Copy link
Member Author

thockin commented Mar 6, 2015

For anyone watching, semantic deep equal was saying that uncomparable private fields were assumed equal, which let it pass on my machine. But on Travis, something about timezones caused it to fail, exposing the time semantic-equal issue. Now we fuzz to leave off nanosecond and semantic compare in UTC always.

@thockin
Copy link
Member Author

thockin commented Mar 6, 2015

rebased now

@lavalamp
Copy link
Member

lavalamp commented Mar 6, 2015

LGTM

lavalamp added a commit that referenced this pull request Mar 6, 2015
@lavalamp lavalamp merged commit b0f4944 into kubernetes:master Mar 6, 2015
@thockin thockin deleted the gofuzz branch March 7, 2015 00:30
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